annotate run/a/asm_cmpunordsd_01.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 5aa513911316
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
856
7b2c5a101190 meta data maintenance
thomask
parents: 699
diff changeset
1 // $HeadURL$
7b2c5a101190 meta data maintenance
thomask
parents: 699
diff changeset
2 // $Date$
7b2c5a101190 meta data maintenance
thomask
parents: 699
diff changeset
3 // $Author$
699
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
4
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
5 module dstress.run.a.asm_cmplesd_01;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
6
1116
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
7 version(D_InlineAsm_X86){
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
8 version = runTest;
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
9 }else version(D_InlineAsm_X86_64){
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
10 version = runTest;
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
11 }
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
12
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
13 version(runTest){
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
14 import addon.cpuinfo;
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
15
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
16 int main(){
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
17 haveSSE2!()();
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
18
699
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
19 double a = 1.2;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
20 double b = 1.1;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
21 ulong res;
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
22
699
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
23 asm{
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
24 movq XMM0, a;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
25 cmpsd XMM0, b, 3;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
26 movq res, XMM0;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
27 }
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
28
1116
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
29 if(res != 0){
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
30 assert(0);
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
31 }
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
32
699
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
33 return 0;
9b960ca15583 extended^ iasm tests (mostly FPU related)
thomask
parents:
diff changeset
34 }
1116
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
35 }else{
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
36 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
37 static assert(0);
5aa513911316 partial -fPIC fixes
thomask
parents: 1044
diff changeset
38 }