diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-07-06 09:49:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-07-06 09:49:05 +0200 |
commit | 8ec11fe9b8b04468e81549ca68d5e70912b8f6dc (patch) | |
tree | 8ca6fd41c47572b47720e13f43cf054b3a1a38b9 /gcc/config/sparc/sparc.c | |
parent | 9da4058c1454b279f0b5791100105bf7a6734e9d (diff) | |
download | gcc-8ec11fe9b8b04468e81549ca68d5e70912b8f6dc.tar.gz |
sparc.h (sparc_compare_emitted): New extern.
* config/sparc/sparc.h (sparc_compare_emitted): New extern.
* config/sparc/sparc.c (sparc_compare_emitted): New variable.
(gen_compare_reg): If sparc_compare_emitted is set, clear it
and return its previous value.
(emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL.
* config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New
constants.
(stack_protect_set, stack_protect_test): New expanders.
(stack_protect_setsi, stack_protect_setdi, stack_protect_testsi,
stack_protect_testdi): New insns.
* config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
* config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define.
From-SVN: r101653
Diffstat (limited to 'gcc/config/sparc/sparc.c')
-rw-r--r-- | gcc/config/sparc/sparc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 69bde4b3b70..b0cde28b143 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -232,7 +232,7 @@ static GTY(()) int struct_value_alias_set; /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ -rtx sparc_compare_op0, sparc_compare_op1; +rtx sparc_compare_op0, sparc_compare_op1, sparc_compare_emitted; /* Vector to say how input registers are mapped to output registers. HARD_FRAME_POINTER_REGNUM cannot be remapped by this function to @@ -1905,6 +1905,13 @@ gen_compare_reg (enum rtx_code code, rtx x, rtx y) enum machine_mode mode = SELECT_CC_MODE (code, x, y); rtx cc_reg; + if (sparc_compare_emitted != NULL_RTX) + { + cc_reg = sparc_compare_emitted; + sparc_compare_emitted = NULL_RTX; + return cc_reg; + } + /* ??? We don't have movcc patterns so we cannot generate pseudo regs for the fcc regs (cse can't tell they're really call clobbered regs and will remove a duplicate comparison even if there is an intervening function @@ -2071,6 +2078,7 @@ gen_v9_scc (enum rtx_code compare_code, register rtx *operands) void emit_v9_brxx_insn (enum rtx_code code, rtx op0, rtx label) { + gcc_assert (sparc_compare_emitted == NULL_RTX); emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, gen_rtx_IF_THEN_ELSE (VOIDmode, |