diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-08 21:34:06 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-08 21:34:06 +0000 |
commit | aef1522ba5b465184e64793ae6bdb312d3fa603e (patch) | |
tree | 22643d8a6b0fe2448ca2091a3af86ce93b1a3376 | |
parent | e2c0a9245afb286ee6829762e1fdb53ee1024b06 (diff) | |
download | gcc-aef1522ba5b465184e64793ae6bdb312d3fa603e.zip gcc-aef1522ba5b465184e64793ae6bdb312d3fa603e.tar.gz gcc-aef1522ba5b465184e64793ae6bdb312d3fa603e.tar.bz2 |
(mulsidi3, umulsidi3): Delete the conditions added last time.
(their matchers): Use const_int_operand as predicate, and `n' as constraint.
Fix the extra conditions.
From-SVN: r4389
-rw-r--r-- | gcc/config/m68k/m68k.md | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 0a319fd..419eae4 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -2463,14 +2463,7 @@ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) (zero_extend:DI (match_dup 2))) (const_int 32))))])] - ;; Prevent generating an insn that the immediate pattern below - ;; would refuse to match. - ;; Testing INTVAL in this way is a no-op, both there and here; - ;; but in case on some host is not a no-op, - ;; this test must go with the other. - "TARGET_68020 - && !(GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) > 0x7fffffff)" + "TARGET_68020" "") (define_insn "" @@ -2484,18 +2477,20 @@ "TARGET_68020" "mulu%.l %2,%3:%0") -; Match immediate case. For 2.4 only match things < 2^31. For 2.5 we -; can enhance this and the similar pattern below for signed multiply. +; Match immediate case. For 2.4 only match things < 2^31. +; It's tricky with larger values in these patterns since we need to match +; values between the two parallel multiplies, between a CONST_DOUBLE and +; a CONST_INT. (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") (mult:SI (match_operand:SI 1 "register_operand" "%0") - (match_operand:SI 2 "" "K"))) + (match_operand:SI 2 "const_int_operand" "n"))) (set (match_operand:SI 3 "register_operand" "=d") (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) (match_dup 2)) (const_int 32))))] "TARGET_68020 - && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) <= 0x7fffffff" + && (unsigned) INTVAL (operands[2]) <= 0x7fffffff" "mulu%.l %2,%3:%0") (define_expand "mulsidi3" @@ -2507,14 +2502,7 @@ (truncate:SI (ashift:DI (mult:DI (sign_extend:DI (match_dup 1)) (sign_extend:DI (match_dup 2))) (const_int 32))))])] - ;; Prevent generating an insn that the immediate pattern below - ;; would refuse to match. - ;; Testing INTVAL in this way is a no-op, both there and here; - ;; but in case on some host is not a no-op, - ;; this test must go with the other. - "TARGET_68020 - && !(GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) > 0x7fffffff)" + "TARGET_68020" "") (define_insn "" @@ -2531,13 +2519,16 @@ (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") (mult:SI (match_operand:SI 1 "register_operand" "%0") - (match_operand:SI 2 "" "K"))) + (match_operand:SI 2 "const_int_operand" "n"))) (set (match_operand:SI 3 "register_operand" "=d") (truncate:SI (ashift:DI (mult:DI (sign_extend:DI (match_dup 1)) (match_dup 2)) (const_int 32))))] "TARGET_68020 - && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) <= 0x7fffffff" + /* This test is a noop on 32 bit machines, + but important for a cross-compiler hosted on 64-bit machines. */ + && INTVAL (operands[2]) <= 0x7fffffff + && INTVAL (operands[2]) >= -0x80000000" "muls%.l %2,%3:%0") (define_expand "muldf3" |