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

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: Lint. Created 8 years, 10 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
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 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after
4368 4376
4369 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 4377 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
4370 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); 4378 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length);
4371 4379
4372 bind(&done); 4380 bind(&done);
4373 } 4381 }
4374 4382
4375 } } // namespace v8::internal 4383 } } // namespace v8::internal
4376 4384
4377 #endif // V8_TARGET_ARCH_X64 4385 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698