- Timestamp:
- Jul 19, 2011 10:08:30 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/tcg/i386/tcg-target.c
r37697 r38064 464 464 the 32-bit-mode absolute addressing encoding. */ 465 465 #ifdef VBOX 466 tcg_target_long pc = (tcg_target_long)s->code_ptr 466 tcg_target_long pc = (tcg_target_long)s->code_ptr 467 467 + tcg_calc_opc_len(s, opc, r, 0, 0) + 1 + 4; 468 468 #else … … 993 993 { 994 994 #ifdef VBOX 995 tcg_target_long disp = dest - (tcg_target_long)s->code_ptr 995 tcg_target_long disp = dest - (tcg_target_long)s->code_ptr 996 996 - tcg_calc_opc_len(s, call ? OPC_CALL_Jz : OPC_JMP_long, 0, 0, 0) 997 997 - 4; … … 1519 1519 } 1520 1520 1521 #if !defined(VBOX) || !defined(REM_PHYS_ADDR_IN_TLB) 1521 # if !defined(VBOX) || !defined(REM_PHYS_ADDR_IN_TLB) 1522 # if defined(VBOX) && defined(RT_OS_DARWIN) && ARCH_BITS == 32 1523 # define VBOX_16_BYTE_STACK_ALIGN 1524 # endif 1522 1525 1523 1526 /* XXX: move that code at the end of the TB */ … … 1531 1534 if (opc == 3) { 1532 1535 tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_ECX, data_reg2); 1536 # ifdef VBOX_16_BYTE_STACK_ALIGN 1537 tcg_out_subi(s, TCG_REG_ESP, 12); 1538 # endif 1533 1539 tcg_out_pushi(s, mem_index); 1534 1540 stack_adjust = 4; … … 1540 1546 if (opc == 3) { 1541 1547 tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_EDX, args[addrlo_idx + 1]); 1548 # ifdef VBOX_16_BYTE_STACK_ALIGN 1549 tcg_out_pushi(s, 0); 1550 # endif 1542 1551 tcg_out_pushi(s, mem_index); 1543 1552 tcg_out_push(s, data_reg2); … … 1557 1566 break; 1558 1567 } 1568 # ifdef VBOX_16_BYTE_STACK_ALIGN 1569 tcg_out_subi(s, TCG_REG_ESP, 12); 1570 # endif 1559 1571 tcg_out_pushi(s, mem_index); 1560 1572 stack_adjust = 4; … … 1564 1576 tcg_out_calli(s, (tcg_target_long)qemu_st_helpers[s_bits]); 1565 1577 1578 # ifdef VBOX_16_BYTE_STACK_ALIGN 1579 if (stack_adjust != 0) { 1580 tcg_out_addi(s, TCG_REG_ESP, RT_ALIGN(stack_adjust, 16)); 1581 } 1582 # else 1566 1583 if (stack_adjust == (TCG_TARGET_REG_BITS / 8)) { 1567 1584 /* Pop and discard. This is 2 bytes smaller than the add. */ … … 1570 1587 tcg_out_addi(s, TCG_REG_ESP, stack_adjust); 1571 1588 } 1572 1573 #else /* VBOX && REM_PHYS_ADDR_IN_TLB */ 1574 # error Borked 1589 # endif 1590 1591 # else /* VBOX && REM_PHYS_ADDR_IN_TLB */ 1592 # error Borked 1575 1593 tcg_out_vbox_phys_write(s, opc, r0, data_reg, data_reg2); 1576 # endif /* VBOX && REM_PHYS_ADDR_IN_TLB */1594 # endif /* VBOX && REM_PHYS_ADDR_IN_TLB */ 1577 1595 1578 1596 /* label2: */
Note:
See TracChangeset
for help on using the changeset viewer.