Currently we do the two sign extensions separately.
Created attachment 415079 [details] WIP
Comment on attachment 415079 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=415079&action=review Some early comments. Nice. And I recommend adding tests to testair / testb3 when modifying Air / B3. > Source/JavaScriptCore/b3/air/AirOpcode.opcodes:670 > +SignExtend8To64 U:G:8, D:G:Ptr Let's not use Ptr here, and instead, let's use 64. It is also nice if we can define SignExtend32To64 as well :) > Source/JavaScriptCore/b3/air/AirOpcode.opcodes:673 > +SignExtend16To64 U:G:16, D:G:Ptr Ditto. > Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:-4627 > auto temp = g32(); > append(Move32, arg0, temp); > - append(SignExtend8To32, temp, temp); > - append(SignExtend32ToPtr, temp, result); Let's just make `append(SignExtend8To64, arg0, result);`. We do not need to have temp :) > Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:4635 > auto temp = g32(); > append(Move32, arg0, temp); > - append(SignExtend16To32, temp, temp); > - append(SignExtend32ToPtr, temp, result); > + append(SignExtend16To64, temp, result); Ditto.
Comment on attachment 415079 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=415079&action=review > Source/JavaScriptCore/b3/B3Opcode.cpp:220 > + out.print("SExt8To64"); out.print("SExt16To64");
Created attachment 447968 [details] WIP
<rdar://problem/106574794>
Pull request: https://github.com/WebKit/WebKit/pull/11386
Committed 261660@main (1fac7761b9cd): <https://commits.webkit.org/261660@main> Reviewed commits have been landed. Closing PR #11386 and removing active labels.