[PATCH] D143316: [m68k] Implement absolution long addressing mode for ADDA instruction

Sheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 4 04:01:05 PST 2023


0x59616e created this revision.
0x59616e added reviewers: myhsu, RKSimon, ricky26.
Herald added a subscriber: hiraditya.
Herald added a project: All.
0x59616e requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://reviews.llvm.org/D143316

Files:
  llvm/lib/Target/M68k/M68kInstrArithmetic.td
  llvm/test/MC/M68k/Relocations/arith-abs.s


Index: llvm/test/MC/M68k/Relocations/arith-abs.s
===================================================================
--- /dev/null
+++ llvm/test/MC/M68k/Relocations/arith-abs.s
@@ -0,0 +1,9 @@
+; RUN: llvm-mc -triple m68k -filetype=obj %s -o - | \
+; RUN:          llvm-readobj -r - | FileCheck --check-prefix=RELOC %s
+; RUN: llvm-mc -triple m68k -show-encoding %s -o - | FileCheck %s
+
+; RELOC: 0x2 R_68K_32 dst 0x0
+; CHECK: adda.l dst, %a0
+; CHECK-SAME: encoding: [0xd1,0xf9,A,A,A,A]
+; CHECK-NEXT: fixup A - offset: 2, value: dst, kind: FK_Data_4
+adda.l dst,%a0
Index: llvm/lib/Target/M68k/M68kInstrArithmetic.td
===================================================================
--- llvm/lib/Target/M68k/M68kInstrArithmetic.td
+++ llvm/lib/Target/M68k/M68kInstrArithmetic.td
@@ -293,6 +293,8 @@
                                   CMD, MxEncAddrMode_p<"opd">>;
   def NAME#"32aj" : MxBiArOp_R_RM<MN, NODE, MxType32a, MxType32.JOp, MxType32.JPat,
                                   CMD, MxEncAddrMode_j<"opd">>;
+  def NAME#"32ab" : MxBiArOp_R_RM<MN, NODE, MxType32a, MxType32.BOp, MxType32.BPat,
+                                  CMD, MxEncAddrMode_abs<"opd", 1>>;
   def NAME#"32ai" : MxBiArOp_R_RI_xEA<MN, NODE, MxType32a, CMD>;
 
   def NAME#"32ar" : MxBiArOp_R_RR_xEA<MN, NODE, MxType32a, MxType32r, CMD>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143316.494808.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230204/1ae8a531/attachment.bin>


More information about the llvm-commits mailing list