RESOLVED FIXED 231362
[JSC][32bit] Fix wrong branchAdd32 assembly for ARMv7
https://bugs.webkit.org/show_bug.cgi?id=231362
Summary [JSC][32bit] Fix wrong branchAdd32 assembly for ARMv7
Mikhail R. Gadelha
Reported 2021-10-07 07:39:32 PDT
[JSC][32bit] Fix wrong branchAdd32 assembly for ARMv7
Attachments
Patch (3.09 KB, patch)
2021-10-07 07:45 PDT, Mikhail R. Gadelha
no flags
Patch (4.77 KB, patch)
2021-10-07 13:14 PDT, Mikhail R. Gadelha
no flags
Patch (5.93 KB, patch)
2021-10-13 07:39 PDT, Mikhail R. Gadelha
no flags
Mikhail R. Gadelha
Comment 1 2021-10-07 07:45:23 PDT
Keith Miller
Comment 2 2021-10-07 09:17:46 PDT
Comment on attachment 440502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440502&action=review > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:1859 > + // Do the add. > + ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); > + if (armImm.isValid()) > + m_assembler.add_S(dataTempRegister, dataTempRegister, armImm); > + else { > + move(imm, addressTempRegister); > + m_assembler.add_S(dataTempRegister, dataTempRegister, addressTempRegister); > + } Can we add an add32 with flags helper that is this? It seems like that could be useful elsewhere in this file.
Mikhail R. Gadelha
Comment 3 2021-10-07 13:14:15 PDT
Yusuke Suzuki
Comment 4 2021-10-11 10:43:16 PDT
Comment on attachment 440530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440530&action=review r=me with changes. > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:200 > + void add32(TrustedImm32 imm, Address address, bool updateFlags = false) Let's define it as add32Impl helper private function, and define add32 as void add32(TrustedImm32 imm, Address address) { constexpr bool updateFlags = false; add32Impl(imm, address, updateFlags); } > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:229 > + void add32(TrustedImm32 imm, AbsoluteAddress address, bool updateFlags = false) Let's define it as add32Impl helper private function, and define add32 as void add32(TrustedImm32 imm, AbsoluteAddress address) { constexpr bool updateFlags = false; add32Impl(imm, address, updateFlags); } > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:1861 > + add32(imm, dest, true); Let's make it readable by, constexpr bool updateFlags = true; add32(imm, dest, updateFlags); > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:1867 > + add32(imm, dest, true); Let's make it readable by, constexpr bool updateFlags = true; add32(imm, dest, updateFlags);
Mikhail R. Gadelha
Comment 5 2021-10-13 07:39:03 PDT
EWS
Comment 6 2021-10-13 10:49:20 PDT
Committed r284103 (242931@main): <https://commits.webkit.org/242931@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441077 [details].
Radar WebKit Bug Importer
Comment 7 2021-10-13 10:50:17 PDT
Note You need to log in before you can comment on or make changes to this bug.