Changeset 195319 in webkit
- Timestamp:
- Jan 19, 2016 3:15:53 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r195317 r195319 1 2016-01-19 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] fixSpillSlotZDef() crashes on ARM64 4 https://bugs.webkit.org/show_bug.cgi?id=153246 5 6 Reviewed by Geoffrey Garen. 7 8 Moving an immediate to memory is not a valid instruction on ARM64. 9 This patch adds a small workaround for this specific case: an instruction 10 to zero a chunk of memory. 11 12 * assembler/MacroAssemblerARM64.h: 13 (JSC::MacroAssemblerARM64::storeZero32): 14 * assembler/MacroAssemblerX86Common.h: 15 (JSC::MacroAssemblerX86Common::storeZero32): 16 * b3/air/AirFixSpillSlotZDef.h: 17 (JSC::B3::Air::fixSpillSlotZDef): 18 * b3/air/AirOpcode.opcodes: 19 1 20 2016-01-19 Enrica Casucci <enrica@apple.com> 2 21 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
r194873 r195319 1232 1232 } 1233 1233 1234 void storeZero32(ImplicitAddress address) 1235 { 1236 store32(ARM64Registers::zr, address); 1237 } 1238 1239 void storeZero32(BaseIndex address) 1240 { 1241 store32(ARM64Registers::zr, address); 1242 } 1243 1234 1244 DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) 1235 1245 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
r195296 r195319 730 730 { 731 731 m_assembler.movl_i32m(imm.m_value, address.offset, address.base, address.index, address.scale); 732 } 733 734 void storeZero32(ImplicitAddress address) 735 { 736 store32(TrustedImm32(0), address); 737 } 738 739 void storeZero32(BaseIndex address) 740 { 741 store32(TrustedImm32(0), address); 732 742 } 733 743 -
trunk/Source/JavaScriptCore/b3/air/AirAllocateStack.cpp
r195298 r195319 297 297 RELEASE_ASSERT(width == Arg::Width32); 298 298 299 // We rely on the fact that there must be some way to move zero to a 300 // memory location without first burning a register. On ARM, we would do 301 // this using zr. 302 RELEASE_ASSERT(isValidForm(Move32, Arg::Imm, Arg::Addr)); 299 RELEASE_ASSERT(isValidForm(StoreZero32, Arg::Stack)); 303 300 insertionSet.insert( 304 instIndex + 1, Move32, inst.origin, Arg::imm(0),301 instIndex + 1, StoreZero32, inst.origin, 305 302 stackAddr(arg.offset() + 4 + slot->offsetFromFP())); 306 303 } -
trunk/Source/JavaScriptCore/b3/air/AirOpcode.opcodes
r195139 r195319 435 435 x86: Imm, Index as store32 436 436 437 StoreZero32 U:G:32 438 Addr 439 Index 440 437 441 SignExtend32ToPtr U:G:32, D:G:Ptr 438 442 Tmp, Tmp
Note: See TracChangeset
for help on using the changeset viewer.