1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
46 // System V x86_64 ABI:
47 // a, b, c, d, e should be in registers
48 // s should be byval pointer
51 // a, b, c, d should be in registers
52 // e should be on the stack
53 // s should be byval pointer
54 void byval_rect(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, struct Rect s) {
66 // System V x86_64 ABI:
67 // a, b, c, d, e, f should be in registers
68 // s should be byval pointer on the stack
71 // a, b, c, d should be in registers
72 // e, f should be on the stack
73 // s should be byval pointer on the stack
74 void byval_many_rect(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e,
75 int32_t f, struct Rect s) {
88 // System V x86_64 ABI:
89 // a, b, c, d, e, f, g should be in sse registers
90 // s should be split across 2 registers
91 // t should be byval pointer
94 // a, b, c, d should be in sse registers
95 // e, f, g should be on the stack
96 // s should be on the stack (treated as 2 i64's)
97 // t should be on the stack (treated as an i64 and a double)
98 void byval_rect_floats(float a, float b, double c, float d, float e,
99 float f, double g, struct Rect s, struct FloatRect t) {
116 // System V x86_64 ABI:
117 // a, b, d, e, f should be in registers
118 // c passed via sse registers
119 // s should be byval pointer
122 // a, b, d should be in registers
123 // c passed via sse registers
124 // e, f should be on the stack
125 // s should be byval pointer
126 void byval_rect_with_float(int32_t a, int32_t b, float c, int32_t d,
127 int32_t e, int32_t f, struct Rect s) {
140 // System V x86_64 & Win64 ABI:
141 // a, b should be in registers
142 // s should be split across 2 integer registers
143 void split_rect(int32_t a, int32_t b, struct Rect s) {
152 // System V x86_64 & Win64 ABI:
153 // a, b should be in sse registers
154 // s should be split across integer & sse registers
155 void split_rect_floats(float a, float b, struct FloatRect s) {
163 // System V x86_64 ABI:
164 // a, b, d, f should be in registers
165 // c, e passed via sse registers
166 // s should be split across 2 registers
169 // a, b, d should be in registers
170 // c passed via sse registers
171 // e, f should be on the stack
172 // s should be on the stack (treated as 2 i64's)
173 void split_rect_with_floats(int32_t a, int32_t b, float c,
174 int32_t d, float e, int32_t f, struct Rect s) {
187 // System V x86_64 & Win64 ABI:
188 // a, b, c should be in registers
189 // s should be split across 2 registers
190 // t should be a byval pointer
191 void split_and_byval_rect(int32_t a, int32_t b, int32_t c, struct Rect s, struct Rect t) {
205 // System V x86_64 & Win64 ABI:
206 // a, b should in registers
207 // s and return should be split across 2 registers
208 struct Rect split_ret_byval_struct(int32_t a, int32_t b, struct Rect s) {
218 // System V x86_64 & Win64 ABI:
219 // a, b, c, d should be in registers
220 // return should be in a hidden sret pointer
221 // s should be a byval pointer
222 struct BiggerRect sret_byval_struct(int32_t a, int32_t b, int32_t c, int32_t d, struct Rect s) {
233 t.s = s; t.a = 27834; t.b = 7657;
237 // System V x86_64 & Win64 ABI:
238 // a, b should be in registers
239 // return should be in a hidden sret pointer
240 // s should be split across 2 registers
241 struct BiggerRect sret_split_struct(int32_t a, int32_t b, struct Rect s) {
250 t.s = s; t.a = 27834; t.b = 7657;
254 // System V x86_64 & Win64 ABI:
255 // s should be byval pointer (since sizeof(s) > 16)
256 // return should in a hidden sret pointer
257 struct Huge huge_struct(struct Huge s) {
267 // System V x86_64 ABI:
268 // p should be in registers
269 // return should be in registers
272 // p should be a byval pointer
273 // return should be in a hidden sret pointer
274 struct FloatPoint float_point(struct FloatPoint p) {