[webkit-changes] [WebKit/WebKit] 09468e: [JSC] ARM64 Imm should accept -UInt12

Yusuke Suzuki noreply at github.com
Sat May 20 15:16:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09468ef2b3b3474e17c023ad0d02c9fd087bf2ee
      https://github.com/WebKit/WebKit/commit/09468ef2b3b3474e17c023ad0d02c9fd087bf2ee
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-05-20 (Sat, 20 May 2023)

  Changed paths:
    M Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
    M Source/JavaScriptCore/b3/B3MoveConstants.cpp
    M Source/JavaScriptCore/b3/air/AirArg.h

  Log Message:
  -----------
  [JSC] ARM64 Imm should accept -UInt12
https://bugs.webkit.org/show_bug.cgi?id=257074
rdar://109596645

Reviewed by Keith Miller.

If ARM64 instructions is listed in AirOpcodes.opcode with Imm, this instruction supports
-UInt12 and UInt12 forms. We should correctly reflect it in Air::Arg::isValidImmForm.
This avoids unnecessary constant materialization for negative values, and it reduces register
pressures. Also ARM64 instruction selection can select cmn (cmp with negative UInt12) for example
with this change.

* Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branchAdd64):
(JSC::MacroAssemblerARM64::branchSub64):
* Source/JavaScriptCore/b3/B3MoveConstants.cpp:
* Source/JavaScriptCore/b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidImmForm):

Canonical link: https://commits.webkit.org/264296@main




More information about the webkit-changes mailing list