| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 uint32_t rotate_imm; | 547 uint32_t rotate_imm; |
| 548 uint32_t immed_8; | 548 uint32_t immed_8; |
| 549 if ((x.rmode_ != RelocInfo::NONE && | 549 if ((x.rmode_ != RelocInfo::NONE && |
| 550 x.rmode_ != RelocInfo::EXTERNAL_REFERENCE) || | 550 x.rmode_ != RelocInfo::EXTERNAL_REFERENCE) || |
| 551 !fits_shifter(x.imm32_, &rotate_imm, &immed_8, &instr)) { | 551 !fits_shifter(x.imm32_, &rotate_imm, &immed_8, &instr)) { |
| 552 // The immediate operand cannot be encoded as a shifter operand, so load | 552 // The immediate operand cannot be encoded as a shifter operand, so load |
| 553 // it first to register ip and change the original instruction to use ip. | 553 // it first to register ip and change the original instruction to use ip. |
| 554 // However, if the original instruction is a 'mov rd, x' (not setting the | 554 // However, if the original instruction is a 'mov rd, x' (not setting the |
| 555 // condition code), then replace it with a 'ldr rd, [pc]' | 555 // condition code), then replace it with a 'ldr rd, [pc]' |
| 556 RecordRelocInfo(x.rmode_, x.imm32_); | 556 RecordRelocInfo(x.rmode_, x.imm32_); |
| 557 ASSERT(!rn.is(ip)); // rn should never be ip, or will be trashed | 557 CHECK(!rn.is(ip)); // rn should never be ip, or will be trashed |
| 558 Condition cond = static_cast<Condition>(instr & CondMask); | 558 Condition cond = static_cast<Condition>(instr & CondMask); |
| 559 if ((instr & ~CondMask) == 13*B21) { // mov, S not set | 559 if ((instr & ~CondMask) == 13*B21) { // mov, S not set |
| 560 ldr(rd, MemOperand(pc, 0), cond); | 560 ldr(rd, MemOperand(pc, 0), cond); |
| 561 } else { | 561 } else { |
| 562 ldr(ip, MemOperand(pc, 0), cond); | 562 ldr(ip, MemOperand(pc, 0), cond); |
| 563 addrmod1(instr, rn, rd, Operand(ip)); | 563 addrmod1(instr, rn, rd, Operand(ip)); |
| 564 } | 564 } |
| 565 return; | 565 return; |
| 566 } | 566 } |
| 567 instr |= I | rotate_imm*B8 | immed_8; | 567 instr |= I | rotate_imm*B8 | immed_8; |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 bind(&after_pool); | 1493 bind(&after_pool); |
| 1494 } | 1494 } |
| 1495 | 1495 |
| 1496 // Since a constant pool was just emitted, move the check offset forward by | 1496 // Since a constant pool was just emitted, move the check offset forward by |
| 1497 // the standard interval. | 1497 // the standard interval. |
| 1498 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 1498 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 | 1501 |
| 1502 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
| OLD | NEW |