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

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

Issue 160272: X64: Added inline keyed load/store and a bunch of other missing functions. (Closed)
Patch Set: Addressed review comments, and fixed bugs introduced by updating. Created 11 years, 4 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 push(Immediate(smi)); 311 push(Immediate(smi));
312 } 312 }
313 } else { 313 } else {
314 ASSERT(source->IsHeapObject()); 314 ASSERT(source->IsHeapObject());
315 movq(kScratchRegister, source, RelocInfo::EMBEDDED_OBJECT); 315 movq(kScratchRegister, source, RelocInfo::EMBEDDED_OBJECT);
316 push(kScratchRegister); 316 push(kScratchRegister);
317 } 317 }
318 } 318 }
319 319
320 320
321 void MacroAssembler::Push(Smi* source) {
322 if (IsUnsafeSmi(source)) {
323 LoadUnsafeSmi(kScratchRegister, source);
324 push(kScratchRegister);
325 } else {
326 int32_t smi = static_cast<int32_t>(reinterpret_cast<intptr_t>(source));
327 push(Immediate(smi));
328 }
329 }
330
331
321 void MacroAssembler::Jump(ExternalReference ext) { 332 void MacroAssembler::Jump(ExternalReference ext) {
322 movq(kScratchRegister, ext); 333 movq(kScratchRegister, ext);
323 jmp(kScratchRegister); 334 jmp(kScratchRegister);
324 } 335 }
325 336
326 337
327 void MacroAssembler::Jump(Address destination, RelocInfo::Mode rmode) { 338 void MacroAssembler::Jump(Address destination, RelocInfo::Mode rmode) {
328 movq(kScratchRegister, destination, rmode); 339 movq(kScratchRegister, destination, rmode);
329 jmp(kScratchRegister); 340 jmp(kScratchRegister);
330 } 341 }
(...skipping 25 matching lines...) Expand all
356 movq(kScratchRegister, destination, rmode); 367 movq(kScratchRegister, destination, rmode);
357 call(kScratchRegister); 368 call(kScratchRegister);
358 } 369 }
359 370
360 371
361 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) { 372 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
362 WriteRecordedPositions(); 373 WriteRecordedPositions();
363 ASSERT(RelocInfo::IsCodeTarget(rmode)); 374 ASSERT(RelocInfo::IsCodeTarget(rmode));
364 movq(kScratchRegister, code_object, rmode); 375 movq(kScratchRegister, code_object, rmode);
365 #ifdef DEBUG 376 #ifdef DEBUG
377 // Patch target is kPointer size bytes *before* target label.
366 Label target; 378 Label target;
367 bind(&target); 379 bind(&target);
368 #endif 380 #endif
369 call(kScratchRegister); 381 call(kScratchRegister);
370 #ifdef DEBUG 382 #ifdef DEBUG
371 ASSERT_EQ(kTargetAddrToReturnAddrDist, 383 ASSERT_EQ(kTargetAddrToReturnAddrDist,
372 SizeOfCodeGeneratedSince(&target) + kPointerSize); 384 SizeOfCodeGeneratedSince(&target) + kPointerSize);
373 #endif 385 #endif
374 } 386 }
375 387
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 Context::SECURITY_TOKEN_INDEX * kPointerSize; 1045 Context::SECURITY_TOKEN_INDEX * kPointerSize;
1034 movq(scratch, FieldOperand(scratch, token_offset)); 1046 movq(scratch, FieldOperand(scratch, token_offset));
1035 cmpq(scratch, FieldOperand(kScratchRegister, token_offset)); 1047 cmpq(scratch, FieldOperand(kScratchRegister, token_offset));
1036 j(not_equal, miss); 1048 j(not_equal, miss);
1037 1049
1038 bind(&same_contexts); 1050 bind(&same_contexts);
1039 } 1051 }
1040 1052
1041 1053
1042 } } // namespace v8::internal 1054 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698