[llvm] 2fb9029 - [PowerPC] Support hwsync extended mnemonic
Nemanja Ivanovic via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 20 08:08:39 PST 2021
Author: Nemanja Ivanovic
Date: 2021-12-20T10:08:31-06:00
New Revision: 2fb9029f2678e3698de202fa88150b3b03cf76da
URL: https://github.com/llvm/llvm-project/commit/2fb9029f2678e3698de202fa88150b3b03cf76da
DIFF: https://github.com/llvm/llvm-project/commit/2fb9029f2678e3698de202fa88150b3b03cf76da.diff
LOG: [PowerPC] Support hwsync extended mnemonic
This mnemonic has been supported by GAS for years and
it was added to the PowerPC ISA as of ISA 3.1. We will
support the mnemonic to be compatible with GAS.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/MC/PowerPC/ppc64-encoding-bookII.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index d83ecc699b192..2340be5b59155 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -4780,6 +4780,7 @@ class PPCAsmPseudo<string asm, dag iops>
def : InstAlias<"sc", (SC 0)>;
def : InstAlias<"sync", (SYNC 0)>, Requires<[HasSYNC]>;
+def : InstAlias<"hwsync", (SYNC 0), 0>, Requires<[HasSYNC]>;
def : InstAlias<"msync", (SYNC 0), 0>, Requires<[HasSYNC]>;
def : InstAlias<"lwsync", (SYNC 1)>, Requires<[HasSYNC]>;
def : InstAlias<"ptesync", (SYNC 2)>, Requires<[HasSYNC]>;
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s
index bd50e2321ffdf..70410fa30ae52 100644
--- a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s
+++ b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s
@@ -207,6 +207,9 @@
# CHECK-BE: lwsync # encoding: [0x7c,0x20,0x04,0xac]
# CHECK-LE: lwsync # encoding: [0xac,0x04,0x20,0x7c]
lwsync
+# CHECK-BE: sync # encoding: [0x7c,0x00,0x04,0xac]
+# CHECK-LE: sync # encoding: [0xac,0x04,0x00,0x7c]
+ hwsync
# CHECK-BE: ptesync # encoding: [0x7c,0x40,0x04,0xac]
# CHECK-LE: ptesync # encoding: [0xac,0x04,0x40,0x7c]
ptesync
More information about the llvm-commits
mailing list