https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81821

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
A possible fix:

Index: gcc/config/rx/rx.md
===================================================================
--- gcc/config/rx/rx.md (revision 251045)
+++ gcc/config/rx/rx.md (working copy)
@@ -2167,6 +2167,7 @@
   [(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")])

 (define_mode_iterator QIHI [QI HI])
+(define_mode_attr BW [(QI "B") (HI "W")])

 (define_insn "sync_lock_test_and_setsi"
   [(set (match_operand:SI 0 "register_operand"   "=r,r")
@@ -2208,7 +2209,7 @@
    (set (match_dup 1)
        (match_operand:QIHI 2 "register_operand"    "0"))]
   ""
-  "xchg\t%1, %0"
+  "xchg\t%1.<BW>, %0"
   [(set_attr "length" "6")
    (set_attr "timings" "22")]
 )

Reply via email to