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

Unified Diff: runtime/vm/instructions_arm.cc

Issue 292433008: Allows unboxed doubles to be disabled. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_arm.cc
===================================================================
--- runtime/vm/instructions_arm.cc (revision 36258)
+++ runtime/vm/instructions_arm.cc (working copy)
@@ -35,10 +35,11 @@
int CallPattern::LengthInBytes() {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
return 5 * Instr::kInstrSize;
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
return 3 * Instr::kInstrSize;
}
}
@@ -80,7 +81,8 @@
uword start = end - Instr::kInstrSize;
int32_t instr = Instr::At(start)->InstructionBits();
intptr_t imm = 0;
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
ASSERT((instr & 0xfff00000) == 0xe3800000); // orr rd, rd, byte0
imm |= (instr & 0x000000ff);
@@ -102,7 +104,7 @@
*reg = static_cast<Register>((instr & 0x0000f000) >> 12);
*value = imm;
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
if ((instr & 0xfff00000) == 0xe3400000) { // movt reg, #imm_hi
imm |= (instr & 0xf0000) << 12;
imm |= (instr & 0xfff) << 16;
@@ -203,7 +205,8 @@
void CallPattern::InsertAt(uword pc, uword target_address) {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
const uint32_t byte0 = (target_address & 0x000000ff);
const uint32_t byte1 = (target_address & 0x0000ff00) >> 8;
const uint32_t byte2 = (target_address & 0x00ff0000) >> 16;
@@ -224,7 +227,7 @@
ASSERT(LengthInBytes() == 5 * Instr::kInstrSize);
CPU::FlushICache(pc, LengthInBytes());
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
const uint16_t target_lo = target_address & 0xffff;
const uint16_t target_hi = target_address >> 16;
@@ -248,17 +251,19 @@
int JumpPattern::pattern_length_in_bytes() {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
return 5 * Instr::kInstrSize;
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
return 3 * Instr::kInstrSize;
}
}
bool JumpPattern::IsValid() const {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
Instr* mov_ip = Instr::At(pc_ + (0 * Instr::kInstrSize));
Instr* or1_ip = Instr::At(pc_ + (1 * Instr::kInstrSize));
Instr* or2_ip = Instr::At(pc_ + (2 * Instr::kInstrSize));
@@ -270,7 +275,7 @@
((or3_ip->InstructionBits() & 0xffffff00) == 0xe38cc000) &&
((bx_ip->InstructionBits() & 0xffffffff) == 0xe12fff1c);
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
Instr* movw_ip = Instr::At(pc_ + (0 * Instr::kInstrSize)); // target_lo
Instr* movt_ip = Instr::At(pc_ + (1 * Instr::kInstrSize)); // target_hi
Instr* bx_ip = Instr::At(pc_ + (2 * Instr::kInstrSize));
@@ -282,7 +287,8 @@
uword JumpPattern::TargetAddress() const {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
Instr* mov_ip = Instr::At(pc_ + (0 * Instr::kInstrSize));
Instr* or1_ip = Instr::At(pc_ + (1 * Instr::kInstrSize));
Instr* or2_ip = Instr::At(pc_ + (2 * Instr::kInstrSize));
@@ -294,7 +300,7 @@
imm |= mov_ip->Immed8Field() << 24;
return imm;
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
Instr* movw_ip = Instr::At(pc_ + (0 * Instr::kInstrSize)); // target_lo
Instr* movt_ip = Instr::At(pc_ + (1 * Instr::kInstrSize)); // target_hi
uint16_t target_lo = movw_ip->MovwField();
@@ -305,7 +311,8 @@
void JumpPattern::SetTargetAddress(uword target_address) const {
- if (TargetCPUFeatures::arm_version() == ARMv6) {
+ const ARMVersion version = TargetCPUFeatures::arm_version();
+ if ((version == ARMv5TE) || (version == ARMv6)) {
const uint32_t byte0 = (target_address & 0x000000ff);
const uint32_t byte1 = (target_address & 0x0000ff00) >> 8;
const uint32_t byte2 = (target_address & 0x00ff0000) >> 16;
@@ -322,7 +329,7 @@
*reinterpret_cast<uword*>(pc_ + (3 * Instr::kInstrSize)) = or3_ip;
CPU::FlushICache(pc_, 4 * Instr::kInstrSize);
} else {
- ASSERT(TargetCPUFeatures::arm_version() == ARMv7);
+ ASSERT(version == ARMv7);
const uint16_t target_lo = target_address & 0xffff;
const uint16_t target_hi = target_address >> 16;
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698