The rx port has been failing to build newlib for a bit over a week. I can't remember if it was the late-combine work or the IRA costing twiddle, regardless the real bug is in the rx backend.

Basically dwarf2cfi is blowing up because of inconsistent state caused by the failure to mark a stack adjustment as frame related. This instance in the epilogue looks like a simple goof.

With the port building again, the testsuite would run and it showed a number of regressions, again related to CFI handling. The common thread was a failure to mark a copy from FP to SP in the prologue as frame related. The change which introduced this bug as supposed to just be changing promotions of vector types. It's unclear if Nick included the hunk accidentally or just goof'd on the logic. Regardless it looks quite incorrect.

Reverting that hunk fixes the regressions *and* fixes 94 pre-existing failures.


The net is rx-elf is regression free and has moved forward in terms of its testsuite status.

Pushing to the trunk momentarily.

jeff


gcc/

        * config/rx/rx.cc (rx_expand_prologue): Mark the copy from FP to SP
        as frame related.
        (rx_expand_epilogue): Mark the stack pointer adjustment as frame 
related.

diff --git a/gcc/config/rx/rx.cc b/gcc/config/rx/rx.cc
index 8048cc98708..c84e1398aad 100644
--- a/gcc/config/rx/rx.cc
+++ b/gcc/config/rx/rx.cc
@@ -1845,8 +1845,7 @@ rx_expand_prologue (void)
        gen_safe_add (stack_pointer_rtx, stack_pointer_rtx,
                      GEN_INT (- (HOST_WIDE_INT) frame_size), true);
       else
-       gen_safe_add (stack_pointer_rtx, frame_pointer_rtx, NULL_RTX,
-                     false /* False because the epilogue will use the FP not 
the SP.  */);
+       gen_safe_add (stack_pointer_rtx, frame_pointer_rtx, NULL_RTX, true);
     }
 }
 
@@ -2119,7 +2118,7 @@ rx_expand_epilogue (bool is_sibcall)
       /* Cannot use the special instructions - deconstruct by hand.  */
       if (total_size)
        gen_safe_add (stack_pointer_rtx, stack_pointer_rtx,
-                     GEN_INT (total_size), false);
+                     GEN_INT (total_size), true);
 
       if (MUST_SAVE_ACC_REGISTER)
        {

Reply via email to