As observed in commit 082cedb ("[build] Fix __libgcc attribute for recent gcc versions"), recent versions of gcc have changed the semantics of -mrtd as applied to the implicit arithmetic functions. It is possible for tests to succeed even if our assumptions about gcc's interpretation of -mrtd are incorrect. In particular, if gcc chooses to utilise a frame pointer in the calling function, then it can tolerate a temporarily incorrect stack pointer (since the stack pointer will shortly afterwards be restored from the frame pointer anyway). Add tests designed specifically to check that our implementations of the implicit arithmetic functions manipulate the stack pointer as expected by gcc. The effect of these tests can be observed by temporarily reverting commit 082cedb ("[build] Fix __libgcc attribute for recent gcc versions"): without this fix in place, the tests will fail on gcc 4.7 and later. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
43 |
|
43 |
|
44 |
|
44 |
|
45 |
|
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 |
|
|
46 |
|
112 |
|
47 |
|
113 |
|
48 |
|
114 |
|
|
|
||
52 |
|
118 |
|
53 |
|
119 |
|
54 |
|
120 |
|
55 |
|
|
|
|
121 |
|
|
|
122 |
|
|
56 |
|
123 |
|
57 |
|
124 |
|
58 |
|
125 |
|
|
|
||
64 |
|
131 |
|
65 |
|
132 |
|
66 |
|
133 |
|
67 |
|
|
|
|
134 |
|
|
|
135 |
|
|
68 |
|
136 |
|
69 |
|
137 |
|
70 |
|
138 |
|
|
|
||
76 |
|
144 |
|
77 |
|
145 |
|
78 |
|
146 |
|
79 |
|
|
|
|
147 |
|
|
|
148 |
|
|
80 |
|
149 |
|
81 |
|
150 |
|
82 |
|
151 |
|
|
|
||
88 |
|
157 |
|
89 |
|
158 |
|
90 |
|
159 |
|
91 |
|
|
|
|
160 |
|
|
|
161 |
|
|
92 |
|
162 |
|
93 |
|
163 |
|
94 |
|
164 |
|