1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
***************
*** 1002,1019 ****
;; Call insns
(define_expand "call"
- [(call (match_operand:SI 0 "memory_operand" "")
- (match_operand 1 "" ""))]
""
"
{
- if (TARGET_LONG_CALLS && GET_CODE (XEXP (operands[0], 0)) != REG)
XEXP (operands[0], 0) = force_reg (Pmode, XEXP (operands[0], 0));
}")
(define_insn "*call_indirect"
- [(call (mem:SI (match_operand:SI 0 "register_operand" "l*r"))
- (match_operand 1 "" ""))]
"! TARGET_CALLER_INTERWORKING"
"bl\\t%__call_via_%0"
[(set_attr "length" "4")])
--- 1002,1024 ----
;; Call insns
(define_expand "call"
+ [(parallel
+ [(call (match_operand:SI 0 "memory_operand" "")
+ (match_operand 1 "" ""))
+ (use (match_operand 2 "" ""))])]
""
"
{
+ if (GET_CODE (XEXP (operands[0], 0)) != REG
+ && arm_is_longcall_p (operands[0], INTVAL (operands[2]), 0))
XEXP (operands[0], 0) = force_reg (Pmode, XEXP (operands[0], 0));
}")
(define_insn "*call_indirect"
+ [(parallel
+ [(call (mem:SI (match_operand:SI 0 "register_operand" "l*r"))
+ (match_operand 1 "" ""))
+ (use (match_operand 2 "" ""))])]
"! TARGET_CALLER_INTERWORKING"
"bl\\t%__call_via_%0"
[(set_attr "length" "4")])
***************
*** 1023,1075 ****
;; would switch back into ARM mode...
(define_insn "*call_indirect_interwork"
- [(call (mem:SI (match_operand:SI 0 "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 "" "")
- (call (match_operand 1 "memory_operand" "")
- (match_operand 2 "" "")))]
""
"
{
- if (TARGET_LONG_CALLS && GET_CODE (XEXP (operands[1], 0)) != REG)
XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0));
}")
(define_insn "*call_value_indirect"
- [(set (match_operand 0 "" "=l")
- (call (mem:SI (match_operand:SI 1 "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 "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 "" ""))]
- "! TARGET_LONG_CALLS && GET_CODE (operands[0]) == SYMBOL_REF"
"bl\\t%a0"
[(set_attr "length" "4")])
(define_insn "*call_value_insn"
- [(set (match_operand 0 "register_operand" "=l")
(call (mem:SI (match_operand 1 "" "i"))
- (match_operand 2 "" "")))]
- "! TARGET_LONG_CALLS && GET_CODE (operands[1]) == SYMBOL_REF"
"bl\\t%a1"
[(set_attr "length" "4")])
--- 1028,1095 ----
;; would switch back into ARM mode...
(define_insn "*call_indirect_interwork"
+ [(parallel
+ [(call (mem:SI (match_operand:SI 0 "register_operand" "l*r"))
+ (match_operand 1 "" ""))
+ (use (match_operand 2 "" ""))])]
"TARGET_CALLER_INTERWORKING"
"bl\\t%__interwork_call_via_%0"
[(set_attr "length" "4")])
(define_expand "call_value"
+ [(parallel
+ [(set (match_operand 0 "" "")
+ (call (match_operand 1 "memory_operand" "")
+ (match_operand 2 "" "")))
+ (use (match_operand 3 "" ""))])]
""
"
{
+ if (GET_CODE (XEXP (operands[1], 0)) != REG
+ && arm_is_longcall_p (operands[1], INTVAL (operands[3]), 0))
XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0));
}")
(define_insn "*call_value_indirect"
+ [(parallel
+ [(set (match_operand 0 "" "=l")
+ (call (mem:SI (match_operand:SI 1 "register_operand" "l*r"))
+ (match_operand 2 "" "")))
+ (use (match_operand 3 "" ""))])]
"! TARGET_CALLER_INTERWORKING"
"bl\\t%__call_via_%1"
[(set_attr "length" "4")])
;; See comment for call_indirect pattern
(define_insn "*call_value_indirect_interwork"
+ [(parallel
+ [(set (match_operand 0 "" "=l")
+ (call (mem:SI (match_operand:SI 1 "register_operand" "l*r"))
+ (match_operand 2 "" "")))
+ (use (match_operand 3 "" ""))])]
"TARGET_CALLER_INTERWORKING"
"bl\\t%__interwork_call_via_%1"
[(set_attr "length" "4")])
(define_insn "*call_insn"
+ [(parallel
+ [(call (mem:SI (match_operand:SI 0 "" "i"))
+ (match_operand:SI 1 "" ""))
+ (use (match_operand 2 "" ""))])]
+ "GET_CODE (operands[0]) == SYMBOL_REF
+ && ! arm_is_longcall_p (operands[0], INTVAL (operands[2]), 1)"
"bl\\t%a0"
[(set_attr "length" "4")])
(define_insn "*call_value_insn"
+ [(parallel
+ [(set (match_operand 0 "register_operand" "=l")
(call (mem:SI (match_operand 1 "" "i"))
+ (match_operand 2 "" "")))
+ (use (match_operand 3 "" ""))])]
+ "GET_CODE(operands[1]) == SYMBOL_REF
+ && ! arm_is_longcall_p (operands[1], INTVAL (operands[3]), 1)"
"bl\\t%a1"
[(set_attr "length" "4")])
|