summaryrefslogtreecommitdiff
path: root/tcg/ppc/tcg-target.c
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-26 18:21:53 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-26 18:21:53 +0000
commit5db3ee7991ca052e68872de7ef2a0b9300df8d23 (patch)
treebb09d0d6f452e099ae3c80d4103711586e00bac9 /tcg/ppc/tcg-target.c
parent165d9b82eb8c877ee691a7b7bde5930bc2d07037 (diff)
R13 is reserved for small data area pointer by SVR4 PPC ABI
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6450 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/ppc/tcg-target.c')
-rw-r--r--tcg/ppc/tcg-target.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 40cf01c34..60563f736 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -109,7 +109,9 @@ static const int tcg_target_reg_alloc_order[] = {
TCG_REG_R11,
#endif
TCG_REG_R12,
+#ifndef __linux__
TCG_REG_R13,
+#endif
TCG_REG_R0,
TCG_REG_R1,
TCG_REG_R2,
@@ -1528,6 +1530,9 @@ void tcg_target_init(TCGContext *s)
#ifndef __APPLE__
tcg_regset_set_reg(s->reserved_regs, TCG_REG_R2);
#endif
+#ifdef __linux__
+ tcg_regset_set_reg(s->reserved_regs, TCG_REG_R13);
+#endif
tcg_add_target_add_op_defs(ppc_op_defs);
}