Skip to content
Permalink
Browse files
ARM64 MacroAssembler improperly reuses data temp register in test32()…
… and test8() calls

https://bugs.webkit.org/show_bug.cgi?id=152370

Reviewed by Benjamin Poulain.

Changed the test8/32(Address, Register) flavors to use the memoryTempRegister for loading the value
att Address so that it doesn't collide with the subsequent use of dataTempRegister by the
test32(Register, Register) function.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::test32):
(JSC::MacroAssemblerARM64::test8):


Canonical link: https://commits.webkit.org/170487@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
msaboff committed Dec 17, 2015
1 parent 16b0caf commit 6ff79e0e553835795bc75ba9443609f0a6d0b9a9
Showing with 19 additions and 4 deletions.
  1. +15 −0 Source/JavaScriptCore/ChangeLog
  2. +4 −4 Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
@@ -1,3 +1,18 @@
2015-12-16 Michael Saboff <msaboff@apple.com>

ARM64 MacroAssembler improperly reuses data temp register in test32() and test8() calls
https://bugs.webkit.org/show_bug.cgi?id=152370

Reviewed by Benjamin Poulain.

Changed the test8/32(Address, Register) flavors to use the memoryTempRegister for loading the value
att Address so that it doesn't collide with the subsequent use of dataTempRegister by the
test32(Register, Register) function.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::test32):
(JSC::MacroAssemblerARM64::test8):

2015-12-16 Filip Pizlo <fpizlo@apple.com>

FTL B3 should support switches
@@ -2328,14 +2328,14 @@ class MacroAssemblerARM64 : public AbstractMacroAssembler<ARM64Assembler, MacroA

void test32(ResultCondition cond, Address address, TrustedImm32 mask, RegisterID dest)
{
load32(address, getCachedDataTempRegisterIDAndInvalidate());
test32(cond, dataTempRegister, mask, dest);
load32(address, getCachedMemoryTempRegisterIDAndInvalidate());
test32(cond, memoryTempRegister, mask, dest);
}

void test8(ResultCondition cond, Address address, TrustedImm32 mask, RegisterID dest)
{
load8(address, getCachedDataTempRegisterIDAndInvalidate());
test32(cond, dataTempRegister, mask, dest);
load8(address, getCachedMemoryTempRegisterIDAndInvalidate());
test32(cond, memoryTempRegister, mask, dest);
}

void test64(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest)

0 comments on commit 6ff79e0

Please sign in to comment.