]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/44757 (lm32.md: In function ‘gen_ashlsi3’:unused variable ‘one’)
authorJoern Rennecke <amylaar@spamcop.net>
Mon, 8 Nov 2010 19:44:42 +0000 (19:44 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Mon, 8 Nov 2010 19:44:42 +0000 (19:44 +0000)
2010-11-08  Joern Rennecke  <amylaar@spamcop.net>
    Richard Henderson <rth@redhat.com>

PR target/44757
* config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Call
lm32_legitimate_constant_p.
* config/lm32/lm32.md (ashlsi3): Remove unused variable.
* config/lm32/lm32.c (gen_int_relational): Make new block for
LE / LT / LEU / LTU case.  Declare variables at start of block.
(lm32_block_move_inline): Use XALLOCAVEC.

Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r166451

gcc/ChangeLog
gcc/config/lm32/lm32.c
gcc/config/lm32/lm32.h
gcc/config/lm32/lm32.md

index 9dafa80cd3b268a9c0506217196f1634a121d36b..49378ae057dc9099d8dfa4d4430958efad17ef6b 100644 (file)
        (bdesc_void3arg, bdesc_voidacc, bdesc_loads, bdesc_stores): Likewise.
        (frv_read_argument): Use expand_normal.
 
+       PR target/44757 
+       * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Call
+       lm32_legitimate_constant_p.
+       * config/lm32/lm32.md (ashlsi3): Remove unused variable.
+       * config/lm32/lm32.c (gen_int_relational): Make new block for
+       LE / LT / LEU / LTU case.  Declare variables at start of block.
+       (lm32_block_move_inline): Use XALLOCAVEC.
+
 2010-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/i386/i386.c (ix86_function_arg_boundary): Fix warning
index 18a4b4403cd585efe59e57ab80db9f5a4982c957..ef09377626dded79a849b9bc3b5f7d5b47d7a412 100644 (file)
@@ -191,18 +191,22 @@ gen_int_relational (enum rtx_code code,
     case LT:
     case LEU:
     case LTU:
-      code = swap_condition (code);
-      rtx temp = cmp0;
-      cmp0 = cmp1;
-      cmp1 = temp;
-      break;
+      {
+       rtx temp;
+
+       code = swap_condition (code);
+       temp = cmp0;
+       cmp0 = cmp1;
+       cmp1 = temp;
+       break;
+      }
     default:
       break;
     }
 
   if (branch_p)
     {
-      rtx insn;
+      rtx insn, cond, label;
 
       /* Operands must be in registers.  */
       if (!register_operand (cmp0, mode))
@@ -211,8 +215,8 @@ gen_int_relational (enum rtx_code code,
        cmp1 = force_reg (mode, cmp1);
 
       /* Generate conditional branch instruction.  */
-      rtx cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1);
-      rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
+      cond = gen_rtx_fmt_ee (code, mode, cmp0, cmp1);
+      label = gen_rtx_LABEL_REF (VOIDmode, destination);
       insn = gen_rtx_SET (VOIDmode, pc_rtx,
                          gen_rtx_IF_THEN_ELSE (VOIDmode,
                                                cond, label, pc_rtx));
@@ -841,7 +845,7 @@ lm32_block_move_inline (rtx dest, rtx src, HOST_WIDE_INT length,
   delta = bits / BITS_PER_UNIT;
 
   /* Allocate a buffer for the temporary registers.  */
-  regs = alloca (sizeof (rtx) * length / delta);
+  regs = XALLOCAVEC (rtx, length / delta);
 
   /* Load as many BITS-sized chunks as possible.  */
   for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
index c87c3bb705a22b381f43c53fb7569cd2172f4026..1c10f16c812d5087fba71a0e87dd3f93c7b92b29 100644 (file)
@@ -350,7 +350,7 @@ enum reg_class
 #define REG_OK_FOR_BASE_P(X) NONSTRICT_REG_OK_FOR_BASE_P(X)
 #endif
 
-#define LEGITIMATE_CONSTANT_P(X) lm32_legitimate_constant_p
+#define LEGITIMATE_CONSTANT_P(X) lm32_legitimate_constant_p (X)
 
 /*-------------------------*/
 /* Condition Code Status.  */
index 6d4305380c0b6e9cc261f8db846720dae54c0dda..72c0d843c0b290031140b9dca3b201598254e6ab 100644 (file)
         {
           int i;
           int shifts = INTVAL (operands[2]);
-          rtx one = GEN_INT (1);
           
           if (shifts == 0)
             emit_move_insn (operands[0], operands[1]);