Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1281)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 9455088: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Florian's comments. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | tools/check-static-initializers.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 static const Register saved_regs[] = 802 #define REG(Name) { kRegister_ ## Name ## _Code }
803 { rax, rcx, rdx, rbx, rbp, rsi, rdi, r8, r9, r10, r11 }; 803
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
804 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); 811 static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register);
805 812
806 813
807 void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, 814 void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode,
808 Register exclusion1, 815 Register exclusion1,
809 Register exclusion2, 816 Register exclusion2,
810 Register exclusion3) { 817 Register exclusion3) {
811 // We don't allow a GC during a store buffer overflow so there is no need to 818 // We don't allow a GC during a store buffer overflow so there is no need to
812 // store the registers in any particular way, but we do have to store and 819 // store the registers in any particular way, but we do have to store and
813 // restore them. 820 // restore them.
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 } 2418 }
2412 2419
2413 2420
2414 void MacroAssembler::Dropad() { 2421 void MacroAssembler::Dropad() {
2415 addq(rsp, Immediate(kNumSafepointRegisters * kPointerSize)); 2422 addq(rsp, Immediate(kNumSafepointRegisters * kPointerSize));
2416 } 2423 }
2417 2424
2418 2425
2419 // Order general registers are pushed by Pushad: 2426 // Order general registers are pushed by Pushad:
2420 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r14, r15. 2427 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r14, r15.
2421 int MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = { 2428 const int
2429 MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = {
2422 0, 2430 0,
2423 1, 2431 1,
2424 2, 2432 2,
2425 3, 2433 3,
2426 -1, 2434 -1,
2427 -1, 2435 -1,
2428 4, 2436 4,
2429 5, 2437 5,
2430 6, 2438 6,
2431 7, 2439 7,
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 bind(&check_prototype); 4422 bind(&check_prototype);
4415 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4423 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4416 cmpq(rcx, null_value); 4424 cmpq(rcx, null_value);
4417 j(not_equal, &next); 4425 j(not_equal, &next);
4418 } 4426 }
4419 4427
4420 4428
4421 } } // namespace v8::internal 4429 } } // namespace v8::internal
4422 4430
4423 #endif // V8_TARGET_ARCH_X64 4431 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | tools/check-static-initializers.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698