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

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

Issue 317653003: [Arm] Various cleanups to the Arm assembler backend. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/arm/full-codegen-arm.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 } 3610 }
3611 } 3611 }
3612 3612
3613 3613
3614 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, 3614 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location,
3615 Register result) { 3615 Register result) {
3616 const uint32_t kLdrOffsetMask = (1 << 12) - 1; 3616 const uint32_t kLdrOffsetMask = (1 << 12) - 1;
3617 ldr(result, MemOperand(ldr_location)); 3617 ldr(result, MemOperand(ldr_location));
3618 if (emit_debug_code()) { 3618 if (emit_debug_code()) {
3619 // Check that the instruction is a ldr reg, [<pc or pp> + offset] . 3619 // Check that the instruction is a ldr reg, [<pc or pp> + offset] .
3620 if (FLAG_enable_ool_constant_pool) { 3620 and_(result, result, Operand(GetConsantPoolLoadPattern()));
3621 and_(result, result, Operand(kLdrPpPattern)); 3621 cmp(result, Operand(GetConsantPoolLoadPattern()));
3622 cmp(result, Operand(kLdrPpPattern)); 3622 Check(eq, kTheInstructionToPatchShouldBeALoadFromConstantPool);
3623 Check(eq, kTheInstructionToPatchShouldBeALoadFromPp);
3624 } else {
3625 and_(result, result, Operand(kLdrPCPattern));
3626 cmp(result, Operand(kLdrPCPattern));
3627 Check(eq, kTheInstructionToPatchShouldBeALoadFromPc);
3628 }
3629 // Result was clobbered. Restore it. 3623 // Result was clobbered. Restore it.
3630 ldr(result, MemOperand(ldr_location)); 3624 ldr(result, MemOperand(ldr_location));
3631 } 3625 }
3632 // Get the address of the constant. 3626 // Get the address of the constant.
3633 and_(result, result, Operand(kLdrOffsetMask)); 3627 and_(result, result, Operand(kLdrOffsetMask));
3634 if (FLAG_enable_ool_constant_pool) { 3628 if (FLAG_enable_ool_constant_pool) {
3635 add(result, pp, Operand(result)); 3629 add(result, pp, Operand(result));
3636 } else { 3630 } else {
3637 add(result, ldr_location, Operand(result)); 3631 add(result, ldr_location, Operand(result));
3638 add(result, result, Operand(Instruction::kPCReadOffset)); 3632 add(result, result, Operand(Instruction::kPCReadOffset));
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 sub(result, result, Operand(dividend)); 4069 sub(result, result, Operand(dividend));
4076 } 4070 }
4077 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); 4071 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift()));
4078 add(result, result, Operand(dividend, LSR, 31)); 4072 add(result, result, Operand(dividend, LSR, 31));
4079 } 4073 }
4080 4074
4081 4075
4082 } } // namespace v8::internal 4076 } } // namespace v8::internal
4083 4077
4084 #endif // V8_TARGET_ARCH_ARM 4078 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698