mirror of git://gcc.gnu.org/git/gcc.git
re PR target/33388 (fr30: ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:983)
PR target/33388 PR target/33397 * config/fr30/fr30.md (addsi3): Check REG_P() before calling REGNO(). (addsi_small_int): Likewise. (addsi_big_int): Use rtx_equal_p() instead of REGNO() comparison. (one_cmplsi2): Likewise. (negsi2): Delete. (enter_func): Expand insn using hard_frame_pointer_rtx and stack_pointer_rtx. (*enter_func): New. * config/fr30/fr30.c (fr30_expand_prologue): Check for hard_frame_pointer_rtx instead of using REGNO() check. Properly sign extend GEN_INT() argument. From-SVN: r128577
This commit is contained in:
parent
da398bb590
commit
e2972de537
|
@ -1,3 +1,19 @@
|
||||||
|
2007-09-18 Rask Ingemann Lambertsen <rask@sygehus.dk>
|
||||||
|
|
||||||
|
PR target/33388
|
||||||
|
PR target/33397
|
||||||
|
* config/fr30/fr30.md (addsi3): Check REG_P() before calling REGNO().
|
||||||
|
(addsi_small_int): Likewise.
|
||||||
|
(addsi_big_int): Use rtx_equal_p() instead of REGNO() comparison.
|
||||||
|
(one_cmplsi2): Likewise.
|
||||||
|
(negsi2): Delete.
|
||||||
|
(enter_func): Expand insn using hard_frame_pointer_rtx and
|
||||||
|
stack_pointer_rtx.
|
||||||
|
(*enter_func): New.
|
||||||
|
* config/fr30/fr30.c (fr30_expand_prologue): Check for
|
||||||
|
hard_frame_pointer_rtx instead of using REGNO() check.
|
||||||
|
Properly sign extend GEN_INT() argument.
|
||||||
|
|
||||||
2007-09-18 Roman Zippel <zippel@linux-m68k.org>
|
2007-09-18 Roman Zippel <zippel@linux-m68k.org>
|
||||||
|
|
||||||
* config/m68k/m68k.c (override_options): Remove USE_GAS,
|
* config/m68k/m68k.c (override_options): Remove USE_GAS,
|
||||||
|
|
|
@ -308,7 +308,7 @@ fr30_expand_prologue (void)
|
||||||
G++ testsuite. */
|
G++ testsuite. */
|
||||||
if (! frame_pointer_needed
|
if (! frame_pointer_needed
|
||||||
&& GET_CODE (part) == SET
|
&& GET_CODE (part) == SET
|
||||||
&& REGNO (SET_DEST (part)) == HARD_FRAME_POINTER_REGNUM)
|
&& SET_DEST (part) == hard_frame_pointer_rtx)
|
||||||
RTX_FRAME_RELATED_P (part) = 0;
|
RTX_FRAME_RELATED_P (part) = 0;
|
||||||
else
|
else
|
||||||
RTX_FRAME_RELATED_P (part) = 1;
|
RTX_FRAME_RELATED_P (part) = 1;
|
||||||
|
@ -336,7 +336,8 @@ fr30_expand_prologue (void)
|
||||||
; /* Nothing to do. */
|
; /* Nothing to do. */
|
||||||
else if (current_frame_info.frame_size <= 512)
|
else if (current_frame_info.frame_size <= 512)
|
||||||
{
|
{
|
||||||
insn = emit_insn (gen_add_to_stack (GEN_INT (- current_frame_info.frame_size)));
|
insn = emit_insn (gen_add_to_stack
|
||||||
|
(GEN_INT (- (signed) current_frame_info.frame_size)));
|
||||||
RTX_FRAME_RELATED_P (insn) = 1;
|
RTX_FRAME_RELATED_P (insn) = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -660,7 +660,8 @@
|
||||||
emit_insn (gen_addsi_big_int (operands[0], operands[1], operands[2]));
|
emit_insn (gen_addsi_big_int (operands[0], operands[1], operands[2]));
|
||||||
else if (INTVAL (operands[2]) >= -16
|
else if (INTVAL (operands[2]) >= -16
|
||||||
&& INTVAL (operands[2]) <= 15
|
&& INTVAL (operands[2]) <= 15
|
||||||
&& (!REGNO_PTR_FRAME_P (REGNO (operands[1]))
|
&& (!REG_P (operands[1])
|
||||||
|
|| !REGNO_PTR_FRAME_P (REGNO (operands[1]))
|
||||||
|| REGNO (operands[1]) == STACK_POINTER_REGNUM))
|
|| REGNO (operands[1]) == STACK_POINTER_REGNUM))
|
||||||
emit_insn (gen_addsi_small_int (operands[0], operands[1], operands[2]));
|
emit_insn (gen_addsi_small_int (operands[0], operands[1], operands[2]));
|
||||||
else
|
else
|
||||||
|
@ -684,7 +685,8 @@
|
||||||
[(set (match_operand:SI 0 "register_operand" "=r,r")
|
[(set (match_operand:SI 0 "register_operand" "=r,r")
|
||||||
(plus:SI (match_operand:SI 1 "register_operand" "0,0")
|
(plus:SI (match_operand:SI 1 "register_operand" "0,0")
|
||||||
(match_operand:SI 2 "add_immediate_operand" "I,J")))]
|
(match_operand:SI 2 "add_immediate_operand" "I,J")))]
|
||||||
"! REGNO_PTR_FRAME_P (REGNO (operands[1]))
|
"!REG_P (operands[1])
|
||||||
|
|| !REGNO_PTR_FRAME_P (REGNO (operands[1]))
|
||||||
|| REGNO (operands[1]) == STACK_POINTER_REGNUM"
|
|| REGNO (operands[1]) == STACK_POINTER_REGNUM"
|
||||||
"@
|
"@
|
||||||
addn %2, %0
|
addn %2, %0
|
||||||
|
@ -698,7 +700,7 @@
|
||||||
""
|
""
|
||||||
"{
|
"{
|
||||||
/* Cope with the possibility that ops 0 and 1 are the same register. */
|
/* Cope with the possibility that ops 0 and 1 are the same register. */
|
||||||
if (REGNO (operands[0]) == REGNO (operands[1]))
|
if (rtx_equal_p (operands[0], operands[1]))
|
||||||
{
|
{
|
||||||
if (reload_in_progress || reload_completed)
|
if (reload_in_progress || reload_completed)
|
||||||
{
|
{
|
||||||
|
@ -804,43 +806,6 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
;;}}}
|
;;}}}
|
||||||
;;{{{ Negation
|
|
||||||
|
|
||||||
(define_expand "negsi2"
|
|
||||||
[(set (match_operand:SI 0 "register_operand" "")
|
|
||||||
(neg:SI (match_operand:SI 1 "register_operand" "")))]
|
|
||||||
""
|
|
||||||
"{
|
|
||||||
if (REGNO (operands[0]) == REGNO (operands[1]))
|
|
||||||
{
|
|
||||||
if (reload_in_progress || reload_completed)
|
|
||||||
{
|
|
||||||
rtx reg = gen_rtx_REG (SImode, 0/*COMPILER_SCRATCH_REGISTER*/);
|
|
||||||
|
|
||||||
emit_insn (gen_movsi (reg, const0_rtx));
|
|
||||||
emit_insn (gen_subsi3 (reg, reg, operands[0]));
|
|
||||||
emit_insn (gen_movsi (operands[0], reg));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rtx reg = gen_reg_rtx (SImode);
|
|
||||||
|
|
||||||
emit_insn (gen_movsi (reg, const0_rtx));
|
|
||||||
emit_insn (gen_subsi3 (reg, reg, operands[0]));
|
|
||||||
emit_insn (gen_movsi (operands[0], reg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
emit_insn (gen_movsi_internal (operands[0], const0_rtx));
|
|
||||||
emit_insn (gen_subsi3 (operands[0], operands[0], operands[1]));
|
|
||||||
}
|
|
||||||
DONE;
|
|
||||||
}"
|
|
||||||
)
|
|
||||||
|
|
||||||
;;}}}
|
|
||||||
|
|
||||||
;;}}}
|
;;}}}
|
||||||
;;{{{ Shifts
|
;;{{{ Shifts
|
||||||
|
|
||||||
|
@ -922,7 +887,7 @@
|
||||||
(not:SI (match_operand:SI 1 "register_operand" "")))]
|
(not:SI (match_operand:SI 1 "register_operand" "")))]
|
||||||
""
|
""
|
||||||
"{
|
"{
|
||||||
if (REGNO (operands[0]) == REGNO (operands[1]))
|
if (rtx_equal_p (operands[0], operands[1]))
|
||||||
{
|
{
|
||||||
if (reload_in_progress || reload_completed)
|
if (reload_in_progress || reload_completed)
|
||||||
{
|
{
|
||||||
|
@ -1406,7 +1371,25 @@
|
||||||
"leave"
|
"leave"
|
||||||
)
|
)
|
||||||
|
|
||||||
(define_insn "enter_func"
|
(define_expand "enter_func"
|
||||||
|
[(parallel
|
||||||
|
[(set:SI (mem:SI (minus:SI (match_dup 1)
|
||||||
|
(const_int 4)))
|
||||||
|
(match_dup 2))
|
||||||
|
(set:SI (match_dup 2)
|
||||||
|
(minus:SI (match_dup 1)
|
||||||
|
(const_int 4)))
|
||||||
|
(set:SI (match_dup 1)
|
||||||
|
(minus:SI (match_dup 1)
|
||||||
|
(match_operand:SI 0 "immediate_operand")))]
|
||||||
|
)]
|
||||||
|
""
|
||||||
|
{
|
||||||
|
operands[1] = stack_pointer_rtx;
|
||||||
|
operands[2] = hard_frame_pointer_rtx;
|
||||||
|
})
|
||||||
|
|
||||||
|
(define_insn "*enter_func"
|
||||||
[(set:SI (mem:SI (minus:SI (reg:SI 15)
|
[(set:SI (mem:SI (minus:SI (reg:SI 15)
|
||||||
(const_int 4)))
|
(const_int 4)))
|
||||||
(reg:SI 14))
|
(reg:SI 14))
|
||||||
|
|
Loading…
Reference in New Issue