| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 XMMRegister xmm8 = { 8 }; | 66 XMMRegister xmm8 = { 8 }; |
| 67 XMMRegister xmm9 = { 9 }; | 67 XMMRegister xmm9 = { 9 }; |
| 68 XMMRegister xmm10 = { 10 }; | 68 XMMRegister xmm10 = { 10 }; |
| 69 XMMRegister xmm11 = { 11 }; | 69 XMMRegister xmm11 = { 11 }; |
| 70 XMMRegister xmm12 = { 12 }; | 70 XMMRegister xmm12 = { 12 }; |
| 71 XMMRegister xmm13 = { 13 }; | 71 XMMRegister xmm13 = { 13 }; |
| 72 XMMRegister xmm14 = { 14 }; | 72 XMMRegister xmm14 = { 14 }; |
| 73 XMMRegister xmm15 = { 15 }; | 73 XMMRegister xmm15 = { 15 }; |
| 74 | 74 |
| 75 | 75 |
| 76 Operand::Operand(Register base, int32_t disp) { | 76 Operand::Operand(Register base, int32_t disp): rex_(0) { |
| 77 len_ = 1; | 77 len_ = 1; |
| 78 if (base.is(rsp) || base.is(r12)) { | 78 if (base.is(rsp) || base.is(r12)) { |
| 79 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). | 79 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). |
| 80 set_sib(kTimes1, rsp, base); | 80 set_sib(kTimes1, rsp, base); |
| 81 } | 81 } |
| 82 | 82 |
| 83 if (disp == 0 && !base.is(rbp) && !base.is(r13)) { | 83 if (disp == 0 && !base.is(rbp) && !base.is(r13)) { |
| 84 set_modrm(0, rsp); | 84 set_modrm(0, rsp); |
| 85 } else if (is_int8(disp)) { | 85 } else if (is_int8(disp)) { |
| 86 set_modrm(1, base); | 86 set_modrm(1, base); |
| 87 set_disp8(disp); | 87 set_disp8(disp); |
| 88 } else { | 88 } else { |
| 89 set_modrm(2, base); | 89 set_modrm(2, base); |
| 90 set_disp32(disp); | 90 set_disp32(disp); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 | 94 |
| 95 Operand::Operand(Register base, | 95 Operand::Operand(Register base, |
| 96 Register index, | 96 Register index, |
| 97 ScaleFactor scale, | 97 ScaleFactor scale, |
| 98 int32_t disp) { | 98 int32_t disp): rex_(0) { |
| 99 ASSERT(!index.is(rsp) && !index.is(r12)); | 99 ASSERT(!index.is(rsp) && !index.is(r12)); |
| 100 len_ = 1; | 100 len_ = 1; |
| 101 set_sib(scale, index, base); | 101 set_sib(scale, index, base); |
| 102 if (disp == 0 && !base.is(rbp) && !base.is(r13)) { | 102 if (disp == 0 && !base.is(rbp) && !base.is(r13)) { |
| 103 // The call to set_modrm doesn't overwrite the REX.B bit possibly set | 103 // The call to set_modrm doesn't overwrite the REX.B bit possibly set |
| 104 // by set_sib. | 104 // by set_sib. |
| 105 set_modrm(0, rsp); | 105 set_modrm(0, rsp); |
| 106 } else if (is_int8(disp)) { | 106 } else if (is_int8(disp)) { |
| 107 set_modrm(1, rsp); | 107 set_modrm(1, rsp); |
| 108 set_disp8(disp); | 108 set_disp8(disp); |
| (...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 UNIMPLEMENTED(); | 1625 UNIMPLEMENTED(); |
| 1626 return NULL; | 1626 return NULL; |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 byte* JavaScriptFrame::GetCallerStackPointer() const { | 1629 byte* JavaScriptFrame::GetCallerStackPointer() const { |
| 1630 UNIMPLEMENTED(); | 1630 UNIMPLEMENTED(); |
| 1631 return NULL; | 1631 return NULL; |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 } } // namespace v8::internal | 1634 } } // namespace v8::internal |
| OLD | NEW |