From 99eeb64cc4b1f9bf23208e2a49e4b6c40dc7aa0e Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Thu, 11 Jan 2018 15:16:21 +0000 Subject: [PATCH] re PR target/81821 ([RX] xchg_mem uses wrong memory operand size) gcc/ PR target/81821 * config/rx/rx.md (BW): New mode attribute. (sync_lock_test_and_setsi): Add mode suffix to insn output. From-SVN: r256536 --- gcc/ChangeLog | 6 ++++++ gcc/config/rx/rx.md | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c8fdd1645f..59b43b42ad3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-11 Oleg Endo + + PR target/81821 + * config/rx/rx.md (BW): New mode attribute. + (sync_lock_test_and_setsi): Add mode suffix to insn output. + 2018-01-11 Richard Biener PR tree-optimization/83435 diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md index 0807213c47c..e642d734a2d 100644 --- a/gcc/config/rx/rx.md +++ b/gcc/config/rx/rx.md @@ -2169,6 +2169,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") @@ -2210,7 +2211,7 @@ (set (match_dup 1) (match_operand:QIHI 2 "register_operand" "0"))] "" - "xchg\t%1, %0" + "xchg\t%1., %0" [(set_attr "length" "6") (set_attr "timings" "22")] ) -- 2.30.2