================
@@ -0,0 +1,98 @@
+//===----------- SparcInstrCrypto.td - cryptographic extensions 
-----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains instruction formats, definitions and patterns needed for
+// cryptographic instructions on SPARC.
+//===----------------------------------------------------------------------===//
+
+
+// Convenience template for 4-operand instructions
+class FourOpImm<string OpcStr, bits<6> op3val, bits<4> op5val,
+        RegisterClass RC>
+      : F3_4<op3val, op5val, (outs RC:$rd), (ins RC:$rs1, RC:$rs2, 
simm5Op:$rs3),
+        !strconcat(OpcStr, " $rs1, $rs2, $rs3, $rd")>;
----------------
s-barannikov wrote:

```suggestion
class FourOpImm<string OpcStr, bits<6> op3val, bits<4> op5val,
                RegisterClass RC>
    : F3_4<op3val, op5val, (outs RC:$rd), (ins RC:$rs1, RC:$rs2, simm5Op:$rs3),
      !strconcat(OpcStr, " $rs1, $rs2, $rs3, $rd")>;
```

https://github.com/llvm/llvm-project/pull/139451
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to