[JSC] Add Div/Mod and fix Mul for B3 ARM64
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jan 2016 00:11:25 +0000 (00:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jan 2016 00:11:25 +0000 (00:11 +0000)
commit508d611ea181880c29301810865452ce3daa5862
tree778a2b57a44cc97f5c1dca4cd9f2b5d590ba461f
parent563aa9c77d436526e27a319ca5797871c8aaead0
[JSC] Add Div/Mod and fix Mul for B3 ARM64
https://bugs.webkit.org/show_bug.cgi?id=152978

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-11
Reviewed by Filip Pizlo.

Add the 3 operands forms of Mul.
Remove the form taking immediate on ARM64, there are no such instruction.

Add Div with sdiv.

Unfortunately, I discovered ChillMod's division by zero
makes it non-trivial on ARM64. I just made it into a macro like on x86.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::mul32):
(JSC::MacroAssemblerARM64::mul64):
(JSC::MacroAssemblerARM64::div32):
(JSC::MacroAssemblerARM64::div64):
* b3/B3LowerMacros.cpp:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
Source/JavaScriptCore/b3/B3LowerMacros.cpp
Source/JavaScriptCore/b3/B3LowerToAir.cpp
Source/JavaScriptCore/b3/air/AirOpcode.opcodes