annotate run/a/asm_fdivp_01_A2.d @ 1607:1bbcc6407d4b

Update module statement for renamed tests.
author Christian Kamm <kamm incasoftware de>
date Mon, 13 Apr 2009 13:48:46 +0200
parents ebff718ff18b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
856
7b2c5a101190 meta data maintenance
thomask
parents: 715
diff changeset
1 // $HeadURL$
7b2c5a101190 meta data maintenance
thomask
parents: 715
diff changeset
2 // $Date$
7b2c5a101190 meta data maintenance
thomask
parents: 715
diff changeset
3 // $Author$
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
4
1607
1bbcc6407d4b Update module statement for renamed tests.
Christian Kamm <kamm incasoftware de>
parents: 1606
diff changeset
5 module dstress.run.a.asm_fdivp_01_A2;
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
6
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
7 version(D_InlineAsm_X86){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
8 version = runTest;
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
9 }else version(D_InlineAsm_X86_64){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
10 version = runTest;
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
11 }
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
12
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
13 version(runTest){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
14 import addon.cpuinfo;
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
15
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
16 int main(){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
17 haveFPU!()();
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
18
1606
ebff718ff18b Fix tests from #3. Thanks Don!
Christian Kamm <kamm incasoftware de>
parents: 1329
diff changeset
19 float a = 12.0f;
ebff718ff18b Fix tests from #3. Thanks Don!
Christian Kamm <kamm incasoftware de>
parents: 1329
diff changeset
20 float b = -3.0f;
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
21
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
22 asm{
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
23 fld a;
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
24 fldz;
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
25 fld b;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
26 fdivp ST(2),ST;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
27 fstp a;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
28 fstp b;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
29 }
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
30
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
31 if(a != 0.0f){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
32 assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
33 }
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
34 if(b != -4.0f){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
35 assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
36 }
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
37
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
38 return 0;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
39 }
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
40 }else{
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
41 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
42 static assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
43 }