[llvm] [Xtensa] Implement Windowed Register Option. (PR #121118)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 07:04:14 PST 2024
================
@@ -678,3 +678,124 @@ let isReturn = 1, isTerminator = 1,
let t = 0;
}
}
+
+//===----------------------------------------------------------------------===//
+// Windowed instructions
+//===----------------------------------------------------------------------===//
+
+def ENTRY : BRI12_Inst<0x06, 0x3, 0x0, (outs), (ins AR:$s, entry_imm12:$imm),
+ "entry\t$s, $imm", []>, Requires<[HasWindowed]> {
+ bits<15> imm;
+
+ let imm12{11-0} = imm{14-3};
+ let Defs = [SP];
+}
+
+let isCall = 1, Defs = [A0] in {
+ def CALL4 : CALL_Inst<0x05, (outs), (ins pcrel32call:$offset),
+ "call4\t$offset", []>, Requires<[HasWindowed]> {
+ let n = 1;
+ }
+
+ def CALL8 : CALL_Inst<0x05, (outs), (ins pcrel32call:$offset),
+ "call8\t$offset", []>, Requires<[HasWindowed]> {
+ let n = 2;
+ }
+
+ def CALL12 : CALL_Inst<0x05, (outs), (ins pcrel32call:$offset),
+ "call12\t$offset", []>, Requires<[HasWindowed]> {
+ let n = 3;
+ }
----------------
andreisfr wrote:
Thank you very much for advice. I used foreach loop to define CALL operations.
https://github.com/llvm/llvm-project/pull/121118
More information about the llvm-commits
mailing list