summaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-02-14 17:56:13 -0800
committerYamaArashi <shadow962@live.com>2016-02-14 17:56:13 -0800
commit9e217b935f6df9afa8e8fbad9c5c6401b879e54a (patch)
tree7d4441c41002c9e4d7b0ac409b821aaccd2d5434 /gcc/config/arm
parent6b7d4fc68d647b8bfdf40e1c0b83438495352327 (diff)
remove unused simple return code
Diffstat (limited to 'gcc/config/arm')
-rwxr-xr-xgcc/config/arm/thumb.c59
-rwxr-xr-xgcc/config/arm/thumb.h4
-rwxr-xr-xgcc/config/arm/thumb.md6
3 files changed, 0 insertions, 69 deletions
diff --git a/gcc/config/arm/thumb.c b/gcc/config/arm/thumb.c
index 1aaff01..05ded97 100755
--- a/gcc/config/arm/thumb.c
+++ b/gcc/config/arm/thumb.c
@@ -741,65 +741,6 @@ far_jump_used_p()
static int return_used_this_function = 0;
-char *
-output_return()
-{
- int regno;
- int live_regs_mask = 0;
-
- /* If a function is naked, don't use the "return" insn. */
- if (arm_naked_function_p(current_function_decl))
- return "";
-
- return_used_this_function = 1;
-
- for (regno = 0; regno < 8; regno++)
- if (regs_ever_live[regno] && !call_used_regs[regno])
- live_regs_mask |= 1 << regno;
-
- if (live_regs_mask == 0)
- {
- if (leaf_function_p() && !far_jump_used_p())
- {
- thumb_exit(asm_out_file, 14);
- }
- else if (TARGET_THUMB_INTERWORK)
- {
- thumb_exit(asm_out_file, -1);
- }
- else
- {
- asm_fprintf(asm_out_file, "\tpop\t{pc}\n");
- }
- }
- else
- {
- asm_fprintf(asm_out_file, "\tpop\t{");
-
- for (regno = 0; live_regs_mask; regno++, live_regs_mask >>= 1)
- {
- if (live_regs_mask & 1)
- {
- asm_fprintf(asm_out_file, reg_names[regno]);
- if (live_regs_mask & ~1)
- asm_fprintf(asm_out_file, ", ");
- }
- }
-
- if (TARGET_THUMB_INTERWORK)
- {
- asm_fprintf(asm_out_file, "}\n");
- thumb_exit(asm_out_file, -1);
- }
- else
- {
- asm_fprintf(asm_out_file, ", pc}\n");
- }
- }
-
- return "";
-}
-
void
thumb_function_prologue(FILE *f, int frame_size)
{
diff --git a/gcc/config/arm/thumb.h b/gcc/config/arm/thumb.h
index 2c65886..e38281c 100755
--- a/gcc/config/arm/thumb.h
+++ b/gcc/config/arm/thumb.h
@@ -1148,12 +1148,8 @@ int thumb_shiftable_const ();
limited PC addressing range: */
#define MACHINE_DEPENDENT_REORG(INSN) thumb_reorg ((INSN))
-/* True if a return instruction can be used in this function. */
-#define USE_RETURN reload_completed
-
extern char * thumb_unexpanded_epilogue ();
extern char * output_move_mem_multiple ();
extern char * thumb_load_double_from_address ();
-extern char * output_return ();
extern int far_jump_used_p();
diff --git a/gcc/config/arm/thumb.md b/gcc/config/arm/thumb.md
index 1769ac9..ea4fa9c 100755
--- a/gcc/config/arm/thumb.md
+++ b/gcc/config/arm/thumb.md
@@ -993,12 +993,6 @@
""
"mov\\tpc, %0")
-(define_insn "return"
- [(return)]
- "USE_RETURN"
- "* return output_return ();"
-[(set_attr "length" "18")])
-
;; Call insns
(define_expand "call"