]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
authorUros Bizjak <uros@gcc.gnu.org>
Wed, 3 Oct 2018 21:49:11 +0000 (23:49 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 3 Oct 2018 21:49:11 +0000 (23:49 +0200)
Backport from mainline
2018-09-28  Uros Bizjak  <ubizjak@gmail.com>

* config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
(GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.

From-SVN: r264826

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/predicates.md
gcc/config/i386/sse.md

index f742a977ca341f36c7c2969e2053a83add837e38..e84f4936fad1a539dac8bd9e6580223bfc32c528 100644 (file)
@@ -1,3 +1,11 @@
+2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
+       (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
+
 2018-10-03  Jonathan Wakely  <jwakely@redhat.com>
 
        PR other/87353
        2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
 
        * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
-       Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341
-       for default.
+       Disable pc relative literal load irrespective of
+       TARGET_FIX_ERR_A53_84341 for default.
 
 2018-03-06  Denis Chertykov  <chertykov@gmail.com>
 
index f398c1f6c3ff7d788edb6c3ef3d6cfa65c9ac0f0..f3aa1a7c32c8cb0a7e204e09ed7fad05f8170c7e 100644 (file)
@@ -9442,7 +9442,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
       case X86_64_SSEDF_CLASS:
        if (mode != BLKmode)
          return gen_reg_or_parallel (mode, orig_mode,
-                                     SSE_REGNO (sse_regno));
+                                     GET_SSE_REGNO (sse_regno));
        break;
       case X86_64_X87_CLASS:
       case X86_64_COMPLEX_X87_CLASS:
@@ -9458,7 +9458,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
       && regclass[1] == X86_64_SSEUP_CLASS
       && mode != BLKmode)
     return gen_reg_or_parallel (mode, orig_mode,
-                               SSE_REGNO (sse_regno));
+                               GET_SSE_REGNO (sse_regno));
   if (n == 4
       && regclass[0] == X86_64_SSE_CLASS
       && regclass[1] == X86_64_SSEUP_CLASS
@@ -9466,7 +9466,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
       && regclass[3] == X86_64_SSEUP_CLASS
       && mode != BLKmode)
     return gen_reg_or_parallel (mode, orig_mode,
-                               SSE_REGNO (sse_regno));
+                               GET_SSE_REGNO (sse_regno));
   if (n == 8
       && regclass[0] == X86_64_SSE_CLASS
       && regclass[1] == X86_64_SSEUP_CLASS
@@ -9478,7 +9478,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
       && regclass[7] == X86_64_SSEUP_CLASS
       && mode != BLKmode)
     return gen_reg_or_parallel (mode, orig_mode,
-                               SSE_REGNO (sse_regno));
+                               GET_SSE_REGNO (sse_regno));
   if (n == 2
       && regclass[0] == X86_64_X87_CLASS
       && regclass[1] == X86_64_X87UP_CLASS)
@@ -9524,7 +9524,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
            exp [nexps++]
              = gen_rtx_EXPR_LIST (VOIDmode,
                                   gen_rtx_REG (SFmode,
-                                               SSE_REGNO (sse_regno)),
+                                               GET_SSE_REGNO (sse_regno)),
                                   GEN_INT (i*8));
            sse_regno++;
            break;
@@ -9532,7 +9532,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
            exp [nexps++]
              = gen_rtx_EXPR_LIST (VOIDmode,
                                   gen_rtx_REG (DFmode,
-                                               SSE_REGNO (sse_regno)),
+                                               GET_SSE_REGNO (sse_regno)),
                                   GEN_INT (i*8));
            sse_regno++;
            break;
@@ -9578,7 +9578,7 @@ construct_container (machine_mode mode, machine_mode orig_mode,
            exp [nexps++]
              = gen_rtx_EXPR_LIST (VOIDmode,
                                   gen_rtx_REG (tmpmode,
-                                               SSE_REGNO (sse_regno)),
+                                               GET_SSE_REGNO (sse_regno)),
                                   GEN_INT (pos*8));
            sse_regno++;
            break;
@@ -11013,7 +11013,7 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
          set_mem_alias_set (mem, set);
          set_mem_align (mem, GET_MODE_ALIGNMENT (smode));
 
-         emit_move_insn (mem, gen_rtx_REG (smode, SSE_REGNO (i)));
+         emit_move_insn (mem, gen_rtx_REG (smode, GET_SSE_REGNO (i)));
        }
 
       emit_label (label);
index 32a01d030731aa85e41cefb57e9011cecde14ce2..16396fc250bdbea3869da6a6a7dc7f5764468f4f 100644 (file)
@@ -1557,10 +1557,10 @@ enum reg_class
 #define FIRST_FLOAT_REG FIRST_STACK_REG
 #define STACK_TOP_P(X) (REG_P (X) && REGNO (X) == FIRST_FLOAT_REG)
 
-#define SSE_REGNO(N) \
-  ((N) < 8 ? FIRST_SSE_REG + (N) \
-         : (N) <= LAST_REX_SSE_REG ? (FIRST_REX_SSE_REG + (N) - 8) \
-                                   : (FIRST_EXT_REX_SSE_REG + (N) - 16))
+#define GET_SSE_REGNO(N)                       \
+  ((N) < 8 ? FIRST_SSE_REG + (N)               \
+   : (N) < 16 ? FIRST_REX_SSE_REG + (N) - 8    \
+   : FIRST_EXT_REX_SSE_REG + (N) - 16)
 
 /* The class value for index registers, and the one for base regs.  */
 
index 77e97e17f1a38c67147e345080994c44c7c061bc..7d9e601fc62395ebb9f31cbaaf7579f657ce0513 100644 (file)
       if (GET_CODE (elt) != SET
          || GET_CODE (SET_DEST (elt)) != REG
          || GET_MODE (SET_DEST (elt)) != V8SImode
-         || REGNO (SET_DEST (elt)) != SSE_REGNO (i)
+         || REGNO (SET_DEST (elt)) != GET_SSE_REGNO (i)
          || SET_SRC (elt) != CONST0_RTX (V8SImode))
        return false;
     }
index c8c3a5045b76baf5ddea2f43e8e0208b645b5d9a..9c72e6f8b1d3481dd990f79c2024e5f5e8761fe9 100644 (file)
 
   for (regno = 0; regno < nregs; regno++)
     XVECEXP (operands[0], 0, regno + 1)
-      = gen_rtx_SET (gen_rtx_REG (V8SImode, SSE_REGNO (regno)),
+      = gen_rtx_SET (gen_rtx_REG (V8SImode, GET_SSE_REGNO (regno)),
                     CONST0_RTX (V8SImode));
 })