Unified · Split
| @@ -0,0 +1,22 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | struct Point { | ||
| 4 | float x; | ||
| 5 | float y; | ||
| 6 | }; | ||
| 7 | |||
| 8 | struct Rect { | ||
| 9 | struct Point top_left; | ||
| 10 | struct Point size; | ||
| 11 | }; | ||
| 12 | |||
| 13 | float foo(struct Point p, struct Rect r) { | ||
| 14 | return r.size.x; | ||
| 15 | } | ||
| 16 | |||
| 17 | int main(int argc, char **argv) { | ||
| 18 | struct Point p = {1, 2}; | ||
| 19 | struct Rect r = {{3, 4}, {5, 6}}; | ||
| 20 | printf("%f\n", foo(p, r)); | ||
| 21 | return 0; | ||
| 22 | } | ||
| @@ -0,0 +1 @@ | |||
| 1 | 5.000000 | ||
| @@ -1351,12 +1351,12 @@ void gfunc_call(int nb_args) · 1350 unmodified lines | |||
| 1351 | sse_reg -= 2; | 1351 | sse_reg -= 2; |
| 1352 | gv(RC_FRET); /* Use pair load into xmm0 & xmm1 */ | 1352 | gv(RC_FRET); /* Use pair load into xmm0 & xmm1 */ |
| 1353 | if (sse_reg) { /* avoid redundant movaps %xmm0, %xmm0 */ | 1353 | if (sse_reg) { /* avoid redundant movaps %xmm0, %xmm0 */ |
| 1354 | /* movaps %xmm0, %xmmN */ | ||
| 1355 | o(0x280f); | ||
| 1356 | o(0xc0 + (sse_reg << 3)); | ||
| 1357 | /* movaps %xmm1, %xmmN */ | 1354 | /* movaps %xmm1, %xmmN */ |
| 1358 | o(0x280f); | 1355 | o(0x280f); |
| 1359 | o(0xc1 + ((sse_reg+1) << 3)); | 1356 | o(0xc1 + ((sse_reg+1) << 3)); |
| 1357 | /* movaps %xmm0, %xmmN */ | ||
| 1358 | o(0x280f); | ||
| 1359 | o(0xc0 + (sse_reg << 3)); | ||
| 1360 | } | 1360 | } |
| 1361 | } else { | 1361 | } else { |
| 1362 | assert(reg_count == 1); | 1362 | assert(reg_count == 1); |