Commit 5da0bbf3 authored by danno@chromium.org's avatar danno@chromium.org

Loosen aligned code target requirement on ARM

Fixes crashes when V8 is built as Thumb code.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11343014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 60267da6
...@@ -86,8 +86,7 @@ int RelocInfo::target_address_size() { ...@@ -86,8 +86,7 @@ int RelocInfo::target_address_size() {
void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) { void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) {
ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
Assembler::set_target_address_at(pc_, reinterpret_cast<Address>( Assembler::set_target_address_at(pc_, target);
reinterpret_cast<intptr_t>(target) & ~3));
if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) {
Object* target_code = Code::GetCodeFromTargetAddress(target); Object* target_code = Code::GetCodeFromTargetAddress(target);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
...@@ -473,14 +472,12 @@ void Assembler::set_target_pointer_at(Address pc, Address target) { ...@@ -473,14 +472,12 @@ void Assembler::set_target_pointer_at(Address pc, Address target) {
Address Assembler::target_address_at(Address pc) { Address Assembler::target_address_at(Address pc) {
return reinterpret_cast<Address>( return target_pointer_at(pc);
reinterpret_cast<intptr_t>(target_pointer_at(pc)) & ~3);
} }
void Assembler::set_target_address_at(Address pc, Address target) { void Assembler::set_target_address_at(Address pc, Address target) {
set_target_pointer_at(pc, reinterpret_cast<Address>( set_target_pointer_at(pc, target);
reinterpret_cast<intptr_t>(target) & ~3));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment