[llvm] [M68k] implement move to and from sr (PR #111145)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 06:17:15 PST 2025
================
@@ -434,6 +436,64 @@ foreach AM = MxMoveSupportedAMs in {
def MOV16dc : MxMoveFromCCR_R;
def MOV8dc : MxMoveFromCCRPseudo<MxOp8AddrMode_d.Op>;
+/// Move to SR
+/// --------------------------------------------------
+/// F E D C B A 9 8 7 6 | 5 4 3 | 2 1 0
+/// --------------------------------------------------
+/// | EFFECTIVE ADDRESS
+/// 0 1 0 0 0 1 1 0 1 1 | MODE | REG
+/// --------------------------------------------------
+let Defs = [SR] in {
+class MxMoveToSR<MxOperand MEMOp, MxEncMemOp SRC_ENC>
+ : MxInst<(outs SRC:$dst), (ins MEMOp:$src), "move.w\t$src, $dst", []> {
----------------
s-barannikov wrote:
If this defines SR implicitly, should `outs` be empty? Same for SR uses and CCR uses/defs.
`$dst` in the asm astring should be `SR` then.
https://github.com/llvm/llvm-project/pull/111145
More information about the llvm-commits
mailing list