annotate run/a/asm_fdivr_01_D2.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_fdivr_01_D2;
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;
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
21 float c = 9.9f;
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
22
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
23 asm{
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
24 fld b;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
25 fldz;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
26 fld a;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
27 fdivr ST(2),ST;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
28 fstp a;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
29 fstp b;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
30 fstp c;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
31 }
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
32
1606
ebff718ff18b Fix tests from #3. Thanks Don!
Christian Kamm <kamm incasoftware de>
parents: 1329
diff changeset
33 if(a != 12.0f){
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
34 assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
35 }
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
36 if(b != 0.0f){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
37 assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
38 }
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
39 if(c != -4.0f){
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
40 assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
41 }
1044
03c97933de98 inline ASM review
thomask
parents: 989
diff changeset
42
715
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
43 return 0;
a35e4f0a9049 partial iasm FPU review
thomask
parents:
diff changeset
44 }
989
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
45 }else{
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
46 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
47 static assert(0);
a468938b0160 inline ASM review
thomask
parents: 856
diff changeset
48 }