[multiple changes]
authorSebastien Bourdeauducq <lekernel@gcc.gnu.org>
Fri, 25 Feb 2011 19:24:20 +0000 (19:24 +0000)
committerSebastien Bourdeauducq <lekernel@gcc.gnu.org>
Fri, 25 Feb 2011 19:24:20 +0000 (19:24 +0000)
2011-02-25  Sebastien Bourdeauducq <sebastien@milkymist.org>

PR gcc/46898
* config/lm32/lm32.md (ashrsi3): Added needed variable.

2011-02-25  Jon Beniston <jon@beniston.com>

PR gcc/46898
* config/lm32/lm32.h (INCOMING_RETURN_ADDR_RTX): New.
* config/lm32/lm32.md (ashlsi3): Remove unused variable.
* config/lm32/lm32.c (TARGET_EXCEPT_UNWIND_INFO): New.
(lm32_block_move_inline): Add type cast to remove warning.
(lm32_expand_prologue): Generate fp in a way compatible with
dwarf2out.
(gen_int_relational): Move declarations to start of function.

From-SVN: r170502

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

index 030167f9bcde3126f35fa9031b4bfb32f68506d8..81dcb4cb770a28471f3b1c979dc59a4736876fc5 100644 (file)
@@ -1,3 +1,19 @@
+2011-02-25  Sebastien Bourdeauducq <sebastien@milkymist.org>
+
+       PR gcc/46898
+       * config/lm32/lm32.md (ashrsi3): Added needed variable.
+
+2011-02-25  Jon Beniston <jon@beniston.com>
+
+       PR gcc/46898
+       * config/lm32/lm32.h (INCOMING_RETURN_ADDR_RTX): New.
+       * config/lm32/lm32.md (ashlsi3): Remove unused variable.
+       * config/lm32/lm32.c (TARGET_EXCEPT_UNWIND_INFO): New.
+       (lm32_block_move_inline): Add type cast to remove warning.
+       (lm32_expand_prologue): Generate fp in a way compatible with
+       dwarf2out.
+       (gen_int_relational): Move declarations to start of function.
+
 2011-02-25  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR tree-optimization/45470
index 05888ee52898a5030b4ce78796bc4f12b7528e1e..2c7131a5dfc96e9a72a58800a2d19f00c527c504 100644 (file)
@@ -117,6 +117,8 @@ static const struct default_options lm32_option_optimization_table[] =
 #define TARGET_CAN_ELIMINATE lm32_can_eliminate
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P lm32_legitimate_address_p
+#undef TARGET_EXCEPT_UNWIND_INFO
+#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 
@@ -174,6 +176,9 @@ gen_int_relational (enum rtx_code code,
 {
   enum machine_mode mode;
   int branch_p;
+  rtx temp;
+  rtx cond;
+  rtx label;
 
   mode = GET_MODE (cmp0);
   if (mode == VOIDmode)
@@ -389,18 +394,17 @@ lm32_expand_prologue (void)
       /* Setup frame pointer if it's needed.  */
       if (frame_pointer_needed == 1)
        {
-         /* Load offset - Don't use total_size, as that includes pretend_size, 
-             which isn't part of this frame?  */
-         insn =
-           emit_move_insn (frame_pointer_rtx,
-                           GEN_INT (current_frame_info.args_size +
-                                    current_frame_info.callee_size +
-                                    current_frame_info.locals_size));
-         RTX_FRAME_RELATED_P (insn) = 1;
+         /* Move sp to fp.  */
+         insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
+         RTX_FRAME_RELATED_P (insn) = 1; 
 
-         /* Add in sp.  */
-         insn = emit_add (frame_pointer_rtx,
-                          frame_pointer_rtx, stack_pointer_rtx);
+         /* Add offset - Don't use total_size, as that includes pretend_size, 
+             which isn't part of this frame?  */
+         insn = emit_add (frame_pointer_rtx, 
+                          frame_pointer_rtx,
+                          GEN_INT (current_frame_info.args_size +
+                                   current_frame_info.callee_size +
+                                   current_frame_info.locals_size));
          RTX_FRAME_RELATED_P (insn) = 1;
        }
 
index 63f1096b9cfe93185ee0d8d27c883554bff4956a..3141719b4a5a87e93f56f63ace56c8d989b29dfb 100644 (file)
@@ -239,6 +239,8 @@ enum reg_class
 
 #define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
 
+#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RA_REGNUM)
+
 #define RETURN_ADDR_RTX(count, frame)                                   \
   lm32_return_addr_rtx (count, frame)
 
index 7a3769cc4c661c40526cc5dd0a7d66e3e32ba56d..7539cb065c44768d1144656b4421868342cba97e 100644 (file)
         {
           int i;
           int shifts = INTVAL (operands[2]);
+          rtx one = GEN_INT (1);
           
           if (shifts == 0)
             emit_move_insn (operands[0], operands[1]);