OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 792 |
793 | 793 |
794 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { | 794 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
795 ASSERT(!target.is(rdi)); | 795 ASSERT(!target.is(rdi)); |
796 // Load the JavaScript builtin function from the builtins object. | 796 // Load the JavaScript builtin function from the builtins object. |
797 GetBuiltinFunction(rdi, id); | 797 GetBuiltinFunction(rdi, id); |
798 movq(target, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); | 798 movq(target, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
799 } | 799 } |
800 | 800 |
801 | 801 |
802 #define REG(Name) { kRegister_ ## Name ## _Code } | 802 static const Register saved_regs[] = |
803 | 803 { rax, rcx, rdx, rbx, rbp, rsi, rdi, r8, r9, r10, r11 }; |
804 static const Register saved_regs[] = { | |
805 REG(rax), REG(rcx), REG(rdx), REG(rbx), REG(rbp), REG(rsi), REG(rdi), REG(r8), | |
806 REG(r9), REG(r10), REG(r11) | |
807 }; | |
808 | |
809 #undef REG | |
810 | |
811 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); | 804 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); |
812 | 805 |
813 | 806 |
814 void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, | 807 void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, |
815 Register exclusion1, | 808 Register exclusion1, |
816 Register exclusion2, | 809 Register exclusion2, |
817 Register exclusion3) { | 810 Register exclusion3) { |
818 // We don't allow a GC during a store buffer overflow so there is no need to | 811 // We don't allow a GC during a store buffer overflow so there is no need to |
819 // store the registers in any particular way, but we do have to store and | 812 // store the registers in any particular way, but we do have to store and |
820 // restore them. | 813 // restore them. |
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 } | 2411 } |
2419 | 2412 |
2420 | 2413 |
2421 void MacroAssembler::Dropad() { | 2414 void MacroAssembler::Dropad() { |
2422 addq(rsp, Immediate(kNumSafepointRegisters * kPointerSize)); | 2415 addq(rsp, Immediate(kNumSafepointRegisters * kPointerSize)); |
2423 } | 2416 } |
2424 | 2417 |
2425 | 2418 |
2426 // Order general registers are pushed by Pushad: | 2419 // Order general registers are pushed by Pushad: |
2427 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r14, r15. | 2420 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r14, r15. |
2428 const int | 2421 int MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = { |
2429 MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = { | |
2430 0, | 2422 0, |
2431 1, | 2423 1, |
2432 2, | 2424 2, |
2433 3, | 2425 3, |
2434 -1, | 2426 -1, |
2435 -1, | 2427 -1, |
2436 4, | 2428 4, |
2437 5, | 2429 5, |
2438 6, | 2430 6, |
2439 7, | 2431 7, |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 bind(&check_prototype); | 4414 bind(&check_prototype); |
4423 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4415 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
4424 cmpq(rcx, null_value); | 4416 cmpq(rcx, null_value); |
4425 j(not_equal, &next); | 4417 j(not_equal, &next); |
4426 } | 4418 } |
4427 | 4419 |
4428 | 4420 |
4429 } } // namespace v8::internal | 4421 } } // namespace v8::internal |
4430 | 4422 |
4431 #endif // V8_TARGET_ARCH_X64 | 4423 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |