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

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

Issue 123018: X64 implementation starts using virtual frame and register allocators. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/frames-x64.cc ('k') | src/x64/register-allocator-x64.h » ('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 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Link this handler. 271 // Link this handler.
272 movq(Operand(kScratchRegister, 0), rsp); 272 movq(Operand(kScratchRegister, 0), rsp);
273 } 273 }
274 274
275 275
276 void MacroAssembler::Ret() { 276 void MacroAssembler::Ret() {
277 ret(0); 277 ret(0);
278 } 278 }
279 279
280 280
281 void MacroAssembler::CmpObjectType(Register heap_object,
282 InstanceType type,
283 Register map) {
284 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset));
285 CmpInstanceType(map, type);
286 }
287
288
289 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
290 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
291 Immediate(static_cast<int8_t>(type)));
292 }
293
294
295
281 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { 296 void MacroAssembler::SetCounter(StatsCounter* counter, int value) {
282 if (FLAG_native_code_counters && counter->Enabled()) { 297 if (FLAG_native_code_counters && counter->Enabled()) {
283 movq(kScratchRegister, ExternalReference(counter)); 298 movq(kScratchRegister, ExternalReference(counter));
284 movl(Operand(kScratchRegister, 0), Immediate(value)); 299 movl(Operand(kScratchRegister, 0), Immediate(value));
285 } 300 }
286 } 301 }
287 302
288 303
289 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { 304 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) {
290 ASSERT(value > 0); 305 ASSERT(value > 0);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 push(rcx); 656 push(rcx);
642 657
643 // Clear the top frame. 658 // Clear the top frame.
644 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); 659 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address);
645 movq(kScratchRegister, c_entry_fp_address); 660 movq(kScratchRegister, c_entry_fp_address);
646 movq(Operand(kScratchRegister, 0), Immediate(0)); 661 movq(Operand(kScratchRegister, 0), Immediate(0));
647 } 662 }
648 663
649 664
650 } } // namespace v8::internal 665 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/frames-x64.cc ('k') | src/x64/register-allocator-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698