#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);
#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,
(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