summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgcc/thumb.h8
-rwxr-xr-xgcc/thumb.md24
-rwxr-xr-xlibgcc/lib1thumb.asm80
3 files changed, 2 insertions, 110 deletions
diff --git a/gcc/thumb.h b/gcc/thumb.h
index e5918a1..88eee88 100755
--- a/gcc/thumb.h
+++ b/gcc/thumb.h
@@ -39,7 +39,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fputs (" (ARM/THUMB:generic)", stderr);
#define ARM_FLAG_THUMB 0x1000 /* same as in arm.h */
-#define THUMB_FLAG_CALLER_SUPER_INTERWORKING 0x80000
/* Nonzero if all call instructions should be indirect. */
#define ARM_FLAG_LONG_CALLS (0x10000) /* same as in arm.h */
@@ -50,11 +49,6 @@ extern int target_flags;
#define TARGET_DEFAULT 0 /* ARM_FLAG_THUMB */
#define TARGET_THUMB_INTERWORK (target_flags & ARM_FLAG_THUMB)
-/* Set if calls via function pointers should assume that their
- destination is non-Thumb aware. */
-#define TARGET_CALLER_INTERWORKING \
- (target_flags & THUMB_FLAG_CALLER_SUPER_INTERWORKING)
-
#define TARGET_LONG_CALLS (target_flags & ARM_FLAG_LONG_CALLS)
/* SUBTARGET_SWITCHES is used to add flags on a per-config basis. */
@@ -66,8 +60,6 @@ extern int target_flags;
{ \
{"thumb-interwork", ARM_FLAG_THUMB}, \
{"no-thumb-interwork", -ARM_FLAG_THUMB}, \
- {"caller-super-interworking", THUMB_FLAG_CALLER_SUPER_INTERWORKING}, \
- {"no-caller-super-interworking", -THUMB_FLAG_CALLER_SUPER_INTERWORKING}, \
{"long-calls", ARM_FLAG_LONG_CALLS, \
"Generate all call instructions as indirect calls"}, \
{"no-long-calls", -ARM_FLAG_LONG_CALLS, ""}, \
diff --git a/gcc/thumb.md b/gcc/thumb.md
index fe37c9c..8cebc50 100755
--- a/gcc/thumb.md
+++ b/gcc/thumb.md
@@ -997,20 +997,9 @@
(define_insn "*call_indirect"
[(call (mem:SI (match_operand:SI 0 "s_register_operand" "l*r"))
(match_operand 1 "" ""))]
- "! TARGET_CALLER_INTERWORKING"
+ ""
"bl\\t_call_via_%0"
[(set_attr "length" "4")])
-;; The non THUMB_INTERWORK, non TARGET_CALLER_INTERWORKING version
-;; used to be: "mov\\tlr,pc\;bx\\t%0", but the mov does not set
-;; the bottom bit of lr so that a function return (using bx)
-;; would switch back into ARM mode...
-
-(define_insn "*call_indirect_interwork"
- [(call (mem:SI (match_operand:SI 0 "s_register_operand" "l*r"))
- (match_operand 1 "" ""))]
- "TARGET_CALLER_INTERWORKING"
- "bl\\t_interwork_call_via_%0"
-[(set_attr "length" "4")])
(define_expand "call_value"
[(set (match_operand 0 "" "")
@@ -1027,20 +1016,11 @@
[(set (match_operand 0 "" "=l")
(call (mem:SI (match_operand:SI 1 "s_register_operand" "l*r"))
(match_operand 2 "" "")))]
- "! TARGET_CALLER_INTERWORKING"
+ ""
"bl\\t_call_via_%1"
[(set_attr "length" "4")])
;; See comment for call_indirect pattern
-(define_insn "*call_value_indirect_interwork"
- [(set (match_operand 0 "" "=l")
- (call (mem:SI (match_operand:SI 1 "s_register_operand" "l*r"))
- (match_operand 2 "" "")))]
- "TARGET_CALLER_INTERWORKING"
- "bl\\t_interwork_call_via_%1"
-[(set_attr "length" "4")])
-
-
(define_insn "*call_insn"
[(call (mem:SI (match_operand:SI 0 "" "i"))
(match_operand:SI 1 "" ""))]
diff --git a/libgcc/lib1thumb.asm b/libgcc/lib1thumb.asm
index e0ff746..da80ebf 100755
--- a/libgcc/lib1thumb.asm
+++ b/libgcc/lib1thumb.asm
@@ -654,83 +654,3 @@ SYM (_call_via_\register):
call_via lr
#endif /* L_call_via_rX */
-
-#ifdef L_interwork_call_via_rX
-
-/* These labels & instructions are used by the Arm/Thumb interworking code,
- when the target address is in an unknown instruction set. The address
- of function to be called is loaded into a register and then one of these
- labels is called via a BL instruction. This puts the return address
- into the link register with the bottom bit set, and the code here
- switches to the correct mode before executing the function. Unfortunately
- the target code cannot be relied upon to return via a BX instruction, so
- instead we have to store the resturn address on the stack and allow the
- called function to return here instead. Upon return we recover the real
- return address and use a BX to get back to Thumb mode. */
-
- .text
- .align 0
-
- .code 32
- .globl _arm_return
-_arm_return:
- ldmia r13!, {r12}
- bx r12
-
-.macro interwork register
- .code 16
-
- .globl SYM (_interwork_call_via_\register)
- TYPE (_interwork_call_via_\register)
- .thumb_func
-SYM (_interwork_call_via_\register):
- bx pc
- nop
-
- .code 32
- .globl .Lchange_\register
-.Lchange_\register:
- tst \register, #1
- stmeqdb r13!, {lr}
- adreq lr, _arm_return
- bx \register
-
- SIZE (_interwork_call_via_\register)
-.endm
-
- interwork r0
- interwork r1
- interwork r2
- interwork r3
- interwork r4
- interwork r5
- interwork r6
- interwork r7
- interwork r8
- interwork r9
- interwork sl
- interwork fp
- interwork ip
- interwork sp
-
- /* The lr case has to be handled a little differently...*/
- .code 16
- .globl SYM (_interwork_call_via_lr)
- TYPE (_interwork_call_via_lr)
- .thumb_func
-SYM (_interwork_call_via_lr):
- bx pc
- nop
-
- .code 32
- .globl .Lchange_lr
-.Lchange_lr:
- tst lr, #1
- stmeqdb r13!, {lr}
- mov ip, lr
- adreq lr, _arm_return
- bx ip
-
- SIZE (_interwork_call_via_lr)
-
-#endif /* L_interwork_call_via_rX */