summaryrefslogtreecommitdiff
path: root/gcc/config/sparc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-11 00:14:08 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-11 00:14:08 +0000
commit4cdb9b47b006e5e0b3a08dc761efbdf345dd4ed8 (patch)
tree0bc12d2c725f18f35fc92a06e89bee409ff34376 /gcc/config/sparc
parentaba5c3d2c4d92d4d3c3218719ed10d3dd7b3b9ec (diff)
downloadgcc-4cdb9b47b006e5e0b3a08dc761efbdf345dd4ed8.tar.gz
* config/sparc/sparc.c (sparc_flat_expand_prologue): Use emit_use.
* config/sparc/sparc.md (UNSPECV_GOTO): Delete. (nonlocal_goto_internal): Likewise. (nonlocal_goto): Emit a use and an indirect jump directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184116 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r--gcc/config/sparc/sparc.c2
-rw-r--r--gcc/config/sparc/sparc.md33
2 files changed, 5 insertions, 30 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 40db03f1750..134843d98a3 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -5131,7 +5131,7 @@ sparc_flat_expand_prologue (void)
/* Prevent this instruction from ever being considered dead,
even if this function has no epilogue. */
- emit_insn (gen_rtx_USE (VOIDmode, i7));
+ emit_use (i7);
}
}
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index f67ee83d048..f70acd37337 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -99,7 +99,6 @@
(define_constants
[(UNSPECV_BLOCKAGE 0)
(UNSPECV_FLUSHW 1)
- (UNSPECV_GOTO 2)
(UNSPECV_FLUSH 4)
(UNSPECV_SAVEW 6)
(UNSPECV_CAS 8)
@@ -6524,6 +6523,7 @@
(match_operand 3 "memory_operand" "")]
""
{
+ rtx i7 = gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM);
rtx r_label = copy_to_reg (operands[1]);
rtx r_sp = adjust_address_nv (operands[2], Pmode, 0);
rtx r_fp = operands[3];
@@ -6540,44 +6540,19 @@
/* Restore frame pointer for containing function. */
emit_move_insn (hard_frame_pointer_rtx, r_fp);
emit_stack_restore (SAVE_NONLOCAL, r_sp);
+ emit_move_insn (i7, r_i7);
/* USE of hard_frame_pointer_rtx added for consistency;
not clear if really needed. */
emit_use (hard_frame_pointer_rtx);
emit_use (stack_pointer_rtx);
+ emit_use (i7);
- /* We need to smuggle the load of %i7 as it is a fixed register. */
- emit_jump_insn (gen_nonlocal_goto_internal (r_label, r_i7));
+ emit_jump_insn (gen_indirect_jump (r_label));
emit_barrier ();
DONE;
})
-(define_insn "nonlocal_goto_internal"
- [(unspec_volatile [(match_operand 0 "register_operand" "r")
- (match_operand 1 "memory_operand" "m")] UNSPECV_GOTO)]
- "GET_MODE (operands[0]) == Pmode && GET_MODE (operands[1]) == Pmode"
-{
- if (flag_delayed_branch)
- {
- if (TARGET_ARCH64)
- return "jmp\t%0\n\t ldx\t%1, %%i7";
- else
- return "jmp\t%0\n\t ld\t%1, %%i7";
- }
- else
- {
- if (TARGET_ARCH64)
- return "ldx\t%1, %%i7\n\tjmp\t%0\n\t nop";
- else
- return "ld\t%1, %%i7\n\tjmp\t%0\n\t nop";
- }
-}
- [(set (attr "type") (const_string "multi"))
- (set (attr "length")
- (if_then_else (eq_attr "delayed_branch" "true")
- (const_int 2)
- (const_int 3)))])
-
(define_expand "builtin_setjmp_receiver"
[(label_ref (match_operand 0 "" ""))]
"flag_pic"