MSP430: Remove do_no_relax_short_jumps
This is an old cludge from from when the Binutils linker could not relax BR to JMP and vice-versa when shuffling "either" sections between upper and lower memory. This has been fixed since at least Binutils 2.30. gcc/ChangeLog: * config/msp430/msp430-protos.h (msp430_do_not_relax_short_jumps): Remove. * config/msp430/msp430.c (msp430_do_not_relax_short_jumps): Likewise. * config/msp430/msp430.md (cbranchhi4_real): Remove special case for msp430_do_not_relax_short_jumps.
This commit is contained in:
parent
aa360dd1c8
commit
b4ca70a3fa
@ -21,7 +21,6 @@
|
||||
#ifndef GCC_MSP430_PROTOS_H
|
||||
#define GCC_MSP430_PROTOS_H
|
||||
|
||||
bool msp430_do_not_relax_short_jumps (void);
|
||||
rtx msp430_eh_return_stackadj_rtx (void);
|
||||
void msp430_expand_eh_return (rtx);
|
||||
void msp430_expand_epilogue (int);
|
||||
|
@ -2161,19 +2161,6 @@ msp430_file_end (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
msp430_do_not_relax_short_jumps (void)
|
||||
{
|
||||
/* When placing code into "either" low or high memory we do not want the
|
||||
linker to grow the size of sections, which it can do if it is encounters a
|
||||
branch to a label that is too far away. So we tell the cbranch patterns to
|
||||
avoid using short jumps when there is a chance that the instructions will
|
||||
end up in a low section. */
|
||||
return
|
||||
msp430_code_region == MSP430_REGION_EITHER
|
||||
|| has_attr (ATTR_EITHER, current_function_decl);
|
||||
}
|
||||
|
||||
enum msp430_builtin
|
||||
{
|
||||
MSP430_BUILTIN_BIC_SR,
|
||||
|
@ -1309,33 +1309,10 @@
|
||||
(clobber (reg:BI CARRY))
|
||||
]
|
||||
""
|
||||
"*
|
||||
/* This is nasty. If we are splitting code between low and high memory
|
||||
then we do not want the linker to increase the size of sections by
|
||||
relaxing out of range jump instructions. (Since relaxation occurs
|
||||
after section placement). So we have to generate pessimal branches
|
||||
here. But we only want to do this when really necessary.
|
||||
|
||||
FIXME: Do we need code in the other cbranch patterns ? */
|
||||
if (msp430_do_not_relax_short_jumps () && get_attr_length (insn) > 6)
|
||||
{
|
||||
return which_alternative == 0 ?
|
||||
\"CMP.W\t%2, %1 { J%r0 1f { BRA #%l3 { 1:\" :
|
||||
\"CMPX.W\t%2, %1 { J%r0 1f { BRA #%l3 { 1:\";
|
||||
}
|
||||
|
||||
return which_alternative == 0 ?
|
||||
\"CMP.W\t%2, %1 { J%0\t%l3\" :
|
||||
\"CMPX.W\t%2, %1 { J%0\t%l3\";
|
||||
"
|
||||
[(set (attr "length")
|
||||
(if_then_else
|
||||
(and (ge (minus (match_dup 3) (pc)) (const_int -510))
|
||||
(le (minus (match_dup 3) (pc)) (const_int 510)))
|
||||
(const_int 6)
|
||||
(const_int 10))
|
||||
)]
|
||||
)
|
||||
"@
|
||||
CMP.W\t%2, %1 { J%0\t%l3
|
||||
CMPX.W\t%2, %1 { J%0\t%l3"
|
||||
)
|
||||
|
||||
(define_insn "cbranchpsi4_reversed"
|
||||
[(set (pc) (if_then_else
|
||||
|
Loading…
Reference in New Issue
Block a user