annotate run/a/asm_movups_01_C.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 236f0d02b8b9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
1 // $HeadURL$
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
2 // $Date$
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
3 // $Author$
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
4
1265
236f0d02b8b9 32<->64 iasm fixes
thomask
parents: 1091
diff changeset
5 // __DSTRESS_TORTURE_BLOCK__ -fPIC
236f0d02b8b9 32<->64 iasm fixes
thomask
parents: 1091
diff changeset
6
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
7 module dstress.run.a.asm_movups_01_C;
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
8
1010
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
9 version(D_InlineAsm_X86){
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
10 version = runTest;
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
11 }else version(D_InlineAsm_X86_64){
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
12 version = runTest;
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
13 }
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
14
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
15 version(runTest){
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
16 import addon.cpuinfo;
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
17
1010
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
18 int main(){
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
19 haveSSE!()();
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
20
1265
236f0d02b8b9 32<->64 iasm fixes
thomask
parents: 1091
diff changeset
21 float[4] a = [1.0f, 2.0f, 3.0f, 4.0f];
236f0d02b8b9 32<->64 iasm fixes
thomask
parents: 1091
diff changeset
22 float[4] b;
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
23
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
24 asm{
1071
f9084d3862e8 pre 0.162 review
thomask
parents: 1044
diff changeset
25 movups XMM0, a;
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
26 movdqu b, XMM0;
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
27 }
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
28
1071
f9084d3862e8 pre 0.162 review
thomask
parents: 1044
diff changeset
29 if(b[0] != a[0]){
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
30 assert(0);
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
31 }
1071
f9084d3862e8 pre 0.162 review
thomask
parents: 1044
diff changeset
32 if(b[1] != a[1]){
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
33 assert(0);
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
34 }
1071
f9084d3862e8 pre 0.162 review
thomask
parents: 1044
diff changeset
35 if(b[2] != a[2]){
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
36 assert(0);
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
37 }
1071
f9084d3862e8 pre 0.162 review
thomask
parents: 1044
diff changeset
38 if(b[3] != a[3]){
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
39 assert(0);
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
40 }
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
41
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
42 return 0;
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
43 }
1010
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
44 }else{
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
45 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
731f93c13ad6 inline ASM review
thomask
parents: 983
diff changeset
46 static assert(0);
983
642e3fea11a9 extended SSE tests - most of them are broken, see http://d.puremagic.com/bugzilla/show_bug.cgi?id=115
thomask
parents:
diff changeset
47 }