Revision: 22085
Author: [email protected]
Date: Mon Jun 30 11:07:28 2014 UTC
Log: [Arm]: Make Assembler::movw only emit a movw instruction.
Currently Assembler::movw is really the mov macro instruction, leading to
raw
emit calls to generate the real movw instruction. Replace all calls of mow
with the mov macro instruction (which will emit a movw if appropriate) and
make movw always emit movw.
[email protected]
Review URL: https://codereview.chromium.org/329233002
http://code.google.com/p/v8/source/detail?r=22085
Modified:
/branches/bleeding_edge/src/arm/assembler-arm.cc
/branches/bleeding_edge/src/arm/assembler-arm.h
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
=======================================
--- /branches/bleeding_edge/src/arm/assembler-arm.cc Fri Jun 27 08:55:41
2014 UTC
+++ /branches/bleeding_edge/src/arm/assembler-arm.cc Mon Jun 30 11:07:28
2014 UTC
@@ -1092,8 +1092,7 @@
// Make sure the movw/movt doesn't get separated.
BlockConstPoolFor(2);
}
- emit(cond | 0x30*B20 | target.code()*B12 |
- EncodeMovwImmediate(x.imm32_ & 0xffff));
+ movw(target, static_cast<uint32_t>(x.imm32_ & 0xffff), cond);
movt(target, static_cast<uint32_t>(x.imm32_) >> 16, cond);
if (target.code() != rd.code()) {
mov(rd, target, LeaveCC, cond);
@@ -1457,11 +1456,7 @@
void Assembler::movw(Register reg, uint32_t immediate, Condition cond) {
- ASSERT(immediate < 0x10000);
- // May use movw if supported, but on unsupported platforms will try to
use
- // equivalent rotated immed_8 value and other tricks before falling back
to a
- // constant pool load.
- mov(reg, Operand(immediate), LeaveCC, cond);
+ emit(cond | 0x30*B20 | reg.code()*B12 | EncodeMovwImmediate(immediate));
}
=======================================
--- /branches/bleeding_edge/src/arm/assembler-arm.h Fri Jun 27 08:55:41
2014 UTC
+++ /branches/bleeding_edge/src/arm/assembler-arm.h Mon Jun 30 11:07:28
2014 UTC
@@ -888,10 +888,8 @@
void mov_label_offset(Register dst, Label* label);
// ARMv7 instructions for loading a 32 bit immediate in two instructions.
- // This may actually emit a different mov instruction, but on an ARMv7 it
- // is guaranteed to only emit one instruction.
+ // The constant for movw and movt should be in the range 0-0xffff.
void movw(Register reg, uint32_t immediate, Condition cond = al);
- // The constant for movt should be in the range 0-0xffff.
void movt(Register reg, uint32_t immediate, Condition cond = al);
void bic(Register dst, Register src1, const Operand& src2,
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Fri Jun 27
08:55:41 2014 UTC
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Jun 30
11:07:28 2014 UTC
@@ -841,7 +841,7 @@
__ mov(scratch, Operand(count));
__ ldr(r1, MemOperand(scratch));
__ sub(r1, r1, Operand(1), SetCC);
- __ movw(r1, FLAG_deopt_every_n_times, eq);
+ __ mov(r1, Operand(FLAG_deopt_every_n_times), LeaveCC, eq);
__ str(r1, MemOperand(scratch));
__ pop(r1);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.