diff --git a/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md b/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md index 73c4087d9048..174ecf828fe8 100644 --- a/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md +++ b/external/gpl3/gcc/dist/gcc/config/sparc/constraints.md @@ -141,6 +141,10 @@ "Memory reference for 'e' constraint floating-point register" (and (match_code "mem,reg") (match_test "memory_ok_for_ldd (op)"))) + +(define_memory_constraint "w" + "A memory with only a base register" + (match_operand 0 "mem_noofs_operand")) (define_constraint "Y" "The vector zero constant" diff --git a/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md b/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md index f7ec0f354759..76e859624e1e 100644 --- a/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md +++ b/external/gpl3/gcc/dist/gcc/config/sparc/predicates.md @@ -427,6 +427,9 @@ (and (match_code "mem") (match_test "call_address_operand (XEXP (op, 0), mode)"))) +(define_predicate "mem_noofs_operand" + (and (match_code "mem") + (match_code "reg" "0"))) ;; Predicates for operators. diff --git a/external/gpl3/gcc/dist/gcc/config/sparc/sync.md b/external/gpl3/gcc/dist/gcc/config/sparc/sync.md index 6f527edcd4c3..6f62f0d3336d 100644 --- a/external/gpl3/gcc/dist/gcc/config/sparc/sync.md +++ b/external/gpl3/gcc/dist/gcc/config/sparc/sync.md @@ -81,7 +81,7 @@ (define_insn "*sync_compare_and_swap" [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "memory_reg_operand" "+m")) + (match_operand:I48MODE 1 "mem_noofs_operand" "+w")) (set (match_dup 1) (unspec_volatile:I48MODE [(match_operand:I48MODE 2 "register_operand" "r") @@ -93,7 +93,7 @@ (define_insn "*sync_compare_and_swapdi_v8plus" [(set (match_operand:DI 0 "register_operand" "=h") - (match_operand:DI 1 "memory_reg_operand" "+m")) + (match_operand:DI 1 "mem_noofs_operand" "+w")) (set (match_dup 1) (unspec_volatile:DI [(match_operand:DI 2 "register_operand" "h")