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

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

Issue 6366016: ARM: Add support for DoMathAbs with double inputs.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 void MacroAssembler::PopSafepointRegistersAndDoubles() { 479 void MacroAssembler::PopSafepointRegistersAndDoubles() {
480 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; i++) { 480 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; i++) {
481 vldr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize); 481 vldr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize);
482 } 482 }
483 add(sp, sp, Operand(DwVfpRegister::kNumAllocatableRegisters * 483 add(sp, sp, Operand(DwVfpRegister::kNumAllocatableRegisters *
484 kDoubleSize)); 484 kDoubleSize));
485 PopSafepointRegisters(); 485 PopSafepointRegisters();
486 } 486 }
487 487
488 void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register reg) {
489 str(reg, SafepointRegistersAndDoublesSlot(reg));
490 }
491
492
488 void MacroAssembler::StoreToSafepointRegisterSlot(Register reg) { 493 void MacroAssembler::StoreToSafepointRegisterSlot(Register reg) {
489 str(reg, SafepointRegisterSlot(reg)); 494 str(reg, SafepointRegisterSlot(reg));
490 } 495 }
491 496
492 497
498 void MacroAssembler::LoadFromSafepointRegisterSlot(Register reg) {
499 ldr(reg, SafepointRegisterSlot(reg));
500 }
501
502
493 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { 503 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
494 // The registers are pushed starting with the highest encoding, 504 // The registers are pushed starting with the highest encoding,
495 // which means that lowest encodings are closest to the stack pointer. 505 // which means that lowest encodings are closest to the stack pointer.
496 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); 506 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters);
497 return reg_code; 507 return reg_code;
498 } 508 }
499 509
500 510
501 MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) { 511 MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
502 return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize); 512 return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
503 } 513 }
504 514
505 515
516 MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
517 // General purpose registers are pushed last on the stack.
518 return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize +
519 DwVfpRegister::kNumAllocatableRegisters * kDoubleSize);
520 }
521
522
506 void MacroAssembler::Ldrd(Register dst1, Register dst2, 523 void MacroAssembler::Ldrd(Register dst1, Register dst2,
507 const MemOperand& src, Condition cond) { 524 const MemOperand& src, Condition cond) {
508 ASSERT(src.rm().is(no_reg)); 525 ASSERT(src.rm().is(no_reg));
509 ASSERT(!dst1.is(lr)); // r14. 526 ASSERT(!dst1.is(lr)); // r14.
510 ASSERT_EQ(0, dst1.code() % 2); 527 ASSERT_EQ(0, dst1.code() % 2);
511 ASSERT_EQ(dst1.code() + 1, dst2.code()); 528 ASSERT_EQ(dst1.code() + 1, dst2.code());
512 529
513 // Generate two ldr instructions if ldrd is not available. 530 // Generate two ldr instructions if ldrd is not available.
514 if (CpuFeatures::IsSupported(ARMv7)) { 531 if (CpuFeatures::IsSupported(ARMv7)) {
515 CpuFeatures::Scope scope(ARMv7); 532 CpuFeatures::Scope scope(ARMv7);
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 2273
2257 void CodePatcher::Emit(Address addr) { 2274 void CodePatcher::Emit(Address addr) {
2258 masm()->emit(reinterpret_cast<Instr>(addr)); 2275 masm()->emit(reinterpret_cast<Instr>(addr));
2259 } 2276 }
2260 #endif // ENABLE_DEBUGGER_SUPPORT 2277 #endif // ENABLE_DEBUGGER_SUPPORT
2261 2278
2262 2279
2263 } } // namespace v8::internal 2280 } } // namespace v8::internal
2264 2281
2265 #endif // V8_TARGET_ARCH_ARM 2282 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698