ARM: Fix unaligned read/write
Fixed Building the simulator with CAN_USE_UNALIGNED_ACCESSES defined. Fixed a bug in the code generator where it was doing unaliged read and write. Review URL: http://codereview.chromium.org/6598062 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5a9c4aad23
commit
45df23054a
@ -5170,11 +5170,11 @@ class DeferredIsStringWrapperSafeForDefaultValueOf : public DeferredCode {
|
||||
|
||||
// Set the bit in the map to indicate that it has been checked safe for
|
||||
// default valueOf and set true result.
|
||||
__ ldr(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset));
|
||||
__ ldrb(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset));
|
||||
__ orr(scratch1_,
|
||||
scratch1_,
|
||||
Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
|
||||
__ str(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset));
|
||||
__ strb(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset));
|
||||
__ mov(map_result_, Operand(1));
|
||||
__ jmp(exit_label());
|
||||
__ bind(&false_result);
|
||||
|
@ -1005,7 +1005,9 @@ int Simulator::ReadW(int32_t addr, Instruction* instr) {
|
||||
intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
|
||||
return *ptr;
|
||||
}
|
||||
PrintF("Unaligned read at 0x%08x, pc=%p\n", addr, instr);
|
||||
PrintF("Unaligned read at 0x%08x, pc=0x%08" V8PRIxPTR "\n",
|
||||
addr,
|
||||
reinterpret_cast<intptr_t>(instr));
|
||||
UNIMPLEMENTED();
|
||||
return 0;
|
||||
#endif
|
||||
@ -1023,7 +1025,9 @@ void Simulator::WriteW(int32_t addr, int value, Instruction* instr) {
|
||||
*ptr = value;
|
||||
return;
|
||||
}
|
||||
PrintF("Unaligned write at 0x%08x, pc=%p\n", addr, instr);
|
||||
PrintF("Unaligned write at 0x%08x, pc=0x%08" V8PRIxPTR "\n",
|
||||
addr,
|
||||
reinterpret_cast<intptr_t>(instr));
|
||||
UNIMPLEMENTED();
|
||||
#endif
|
||||
}
|
||||
@ -1038,7 +1042,9 @@ uint16_t Simulator::ReadHU(int32_t addr, Instruction* instr) {
|
||||
uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
|
||||
return *ptr;
|
||||
}
|
||||
PrintF("Unaligned unsigned halfword read at 0x%08x, pc=%p\n", addr, instr);
|
||||
PrintF("Unaligned unsigned halfword read at 0x%08x, pc=0x%08" V8PRIxPTR "\n",
|
||||
addr,
|
||||
reinterpret_cast<intptr_t>(instr));
|
||||
UNIMPLEMENTED();
|
||||
return 0;
|
||||
#endif
|
||||
@ -1072,7 +1078,9 @@ void Simulator::WriteH(int32_t addr, uint16_t value, Instruction* instr) {
|
||||
*ptr = value;
|
||||
return;
|
||||
}
|
||||
PrintF("Unaligned unsigned halfword write at 0x%08x, pc=%p\n", addr, instr);
|
||||
PrintF("Unaligned unsigned halfword write at 0x%08x, pc=0x%08" V8PRIxPTR "\n",
|
||||
addr,
|
||||
reinterpret_cast<intptr_t>(instr));
|
||||
UNIMPLEMENTED();
|
||||
#endif
|
||||
}
|
||||
@ -1089,7 +1097,9 @@ void Simulator::WriteH(int32_t addr, int16_t value, Instruction* instr) {
|
||||
*ptr = value;
|
||||
return;
|
||||
}
|
||||
PrintF("Unaligned halfword write at 0x%08x, pc=%p\n", addr, instr);
|
||||
PrintF("Unaligned halfword write at 0x%08x, pc=0x%08" V8PRIxPTR "\n",
|
||||
addr,
|
||||
reinterpret_cast<intptr_t>(instr));
|
||||
UNIMPLEMENTED();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user