Commit 5db3ee7991ca052e68872de7ef2a0b9300df8d23

Authored by malc
1 parent 165d9b82

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
Showing 1 changed file with 5 additions and 0 deletions
tcg/ppc/tcg-target.c
@@ -109,7 +109,9 @@ static const int tcg_target_reg_alloc_order[] = { @@ -109,7 +109,9 @@ static const int tcg_target_reg_alloc_order[] = {
109 TCG_REG_R11, 109 TCG_REG_R11,
110 #endif 110 #endif
111 TCG_REG_R12, 111 TCG_REG_R12,
  112 +#ifndef __linux__
112 TCG_REG_R13, 113 TCG_REG_R13,
  114 +#endif
113 TCG_REG_R0, 115 TCG_REG_R0,
114 TCG_REG_R1, 116 TCG_REG_R1,
115 TCG_REG_R2, 117 TCG_REG_R2,
@@ -1528,6 +1530,9 @@ void tcg_target_init(TCGContext *s) @@ -1528,6 +1530,9 @@ void tcg_target_init(TCGContext *s)
1528 #ifndef __APPLE__ 1530 #ifndef __APPLE__
1529 tcg_regset_set_reg(s->reserved_regs, TCG_REG_R2); 1531 tcg_regset_set_reg(s->reserved_regs, TCG_REG_R2);
1530 #endif 1532 #endif
  1533 +#ifdef __linux__
  1534 + tcg_regset_set_reg(s->reserved_regs, TCG_REG_R13);
  1535 +#endif
1531 1536
1532 tcg_add_target_add_op_defs(ppc_op_defs); 1537 tcg_add_target_add_op_defs(ppc_op_defs);
1533 } 1538 }