From 9c1d1db27d421ab7c5ac1ca9b23cae002f13380e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 15 May 2019 15:28:04 +0000 Subject: [PATCH] i386: Emulate MMX abs2 with SSE Emulate MMX abs2 with SSE. Only SSE register source operand is allowed. PR target/89021 * config/i386/sse.md (abs2): Add SSE emulation. From-SVN: r271248 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/sse.md | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f773f24d623..24babbce66c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-05-15 H.J. Lu + + PR target/89021 + * config/i386/sse.md (abs2): Add SSE emulation. + 2019-05-15 H.J. Lu PR target/89021 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index b68da8ad285..11875adb781 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16420,16 +16420,19 @@ }) (define_insn "abs2" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,Yv") (abs:MMXMODEI - (match_operand:MMXMODEI 1 "nonimmediate_operand" "ym")))] - "TARGET_SSSE3" - "pabs\t{%1, %0|%0, %1}"; - [(set_attr "type" "sselog1") + (match_operand:MMXMODEI 1 "register_mmxmem_operand" "ym,Yv")))] + "(TARGET_MMX || TARGET_MMX_WITH_SSE) && TARGET_SSSE3" + "@ + pabs\t{%1, %0|%0, %1} + %vpabs\t{%1, %0|%0, %1}" + [(set_attr "mmx_isa" "native,x64") + (set_attr "type" "sselog1") (set_attr "prefix_rep" "0") (set_attr "prefix_extra" "1") (set (attr "prefix_rex") (symbol_ref "x86_extended_reg_mentioned_p (insn)")) - (set_attr "mode" "DI")]) + (set_attr "mode" "DI,TI")]) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -- 2.30.2