Changeset 42601 in vbox for trunk/src/recompiler/tcg/i386/tcg-target.c
- Timestamp:
- Aug 5, 2012 4:26:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/tcg/i386/tcg-target.c
r38064 r42601 44 44 TCG_REG_R10, 45 45 TCG_REG_R11, 46 # if !defined(VBOX) || !defined(__MINGW64__) 46 47 TCG_REG_R9, 47 48 TCG_REG_R8, 48 49 TCG_REG_RCX, 49 50 TCG_REG_RDX, 51 # endif 50 52 TCG_REG_RSI, 51 53 TCG_REG_RDI, 54 # if defined(VBOX) && defined(__MINGW64__) 55 TCG_REG_R9, 56 TCG_REG_R8, 57 TCG_REG_RDX, 58 TCG_REG_RCX, 59 # endif 52 60 TCG_REG_RAX, 53 61 #else … … 64 72 static const int tcg_target_call_iarg_regs[] = { 65 73 #if TCG_TARGET_REG_BITS == 64 74 # if defined(VBOX) && defined(__MINGW64__) 75 TCG_REG_RCX, 76 TCG_REG_RDX, 77 # else 66 78 TCG_REG_RDI, 67 79 TCG_REG_RSI, 68 80 TCG_REG_RDX, 69 81 TCG_REG_RCX, 82 # endif 70 83 TCG_REG_R8, 71 84 TCG_REG_R9, … … 197 210 if (TCG_TARGET_REG_BITS == 64) { 198 211 tcg_regset_set32(ct->u.regs, 0, 0xffff); 212 #if defined(VBOX) && defined(__MINGW64__) 213 tcg_regset_reset_reg(ct->u.regs, tcg_target_call_iarg_regs[2]); 214 tcg_regset_reset_reg(ct->u.regs, tcg_target_call_iarg_regs[1]); 215 tcg_regset_reset_reg(ct->u.regs, tcg_target_call_iarg_regs[0]); 216 #else 217 /** @todo figure why RDX isn't mentioned here. */ 199 218 tcg_regset_reset_reg(ct->u.regs, TCG_REG_RSI); 200 219 tcg_regset_reset_reg(ct->u.regs, TCG_REG_RDI); 220 #endif 201 221 } else { 202 222 tcg_regset_set32(ct->u.regs, 0, 0xff); … … 759 779 } 760 780 761 #ifdef VBOX 781 #ifdef VBOX_16_BYTE_STACK_ALIGN 762 782 static void tcg_out_subi(TCGContext *s, int reg, tcg_target_long val) 763 783 { … … 1390 1410 *label_ptr[2] = s->code_ptr - label_ptr[2] - 1; 1391 1411 #else 1412 # if defined(VBOX) && defined(__MINGW64__) 1413 # error port me 1414 # endif 1392 1415 { 1393 1416 int32_t offset = GUEST_BASE; … … 1526 1549 /* XXX: move that code at the end of the TB */ 1527 1550 if (TCG_TARGET_REG_BITS == 64) { 1551 # if defined(VBOX) && defined(__MINGW64__) 1552 tcg_out_mov(s, (opc == 3 ? TCG_TYPE_I64 : TCG_TYPE_I32), 1553 tcg_target_call_iarg_regs[1], data_reg); 1554 tcg_out_movi(s, TCG_TYPE_I32, tcg_target_call_iarg_regs[2], mem_index); 1555 # else 1528 1556 tcg_out_mov(s, (opc == 3 ? TCG_TYPE_I64 : TCG_TYPE_I32), 1529 1557 TCG_REG_RSI, data_reg); 1530 1558 tcg_out_movi(s, TCG_TYPE_I32, TCG_REG_RDX, mem_index); 1559 # endif 1531 1560 stack_adjust = 0; 1532 1561 } else if (TARGET_LONG_BITS == 32) { … … 1597 1626 *label_ptr[2] = s->code_ptr - label_ptr[2] - 1; 1598 1627 #else 1628 # if defined(VBOX) && defined(__MINGW64__) 1629 # error port me 1630 # endif 1599 1631 { 1600 1632 int32_t offset = GUEST_BASE; … … 2092 2124 TCG_REG_RBP, 2093 2125 TCG_REG_RBX, 2126 # if defined(VBOX) && defined(__MINGW64__) 2127 TCG_REG_RSI, 2128 TCG_REG_RDI, 2129 # endif 2094 2130 TCG_REG_R12, 2095 2131 TCG_REG_R13, … … 2132 2168 2133 2169 frame_size = push_size + TCG_STATIC_CALL_ARGS_SIZE; 2170 #if defined(VBOX) && defined(__MINGW64__) 2171 frame_size += TCG_TARGET_CALL_STACK_OFFSET; 2172 #endif 2134 2173 frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) & 2135 2174 ~(TCG_TARGET_STACK_ALIGN - 1); … … 2176 2215 tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_ECX); 2177 2216 if (TCG_TARGET_REG_BITS == 64) { 2217 # if !defined(VBOX) || !defined(__MINGW64__) 2178 2218 tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_RDI); 2179 2219 tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_RSI); 2220 # endif 2180 2221 tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R8); 2181 2222 tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_R9);
Note:
See TracChangeset
for help on using the changeset viewer.