Changeset 678
- Timestamp:
- Sep 9, 2003, 9:21:51 PM (22 years ago)
- Location:
- trunk/testcase/optlink
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/testcase/optlink/tst1.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r677 r678 17 17 18 18 /** in asm */ 19 extern int _Optlink asmfoo (int i1, int i2, int i3, float rf1, float rf2, float rf3, floatrf4);19 extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4); 20 20 21 extern int _Optlink foo (int i1, int i2, int i3, float rf1, float rf2, float rf3, floatrf4)21 extern int _Optlink foo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4) 22 22 { 23 23 if (i1 != 1) -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst1.gmk
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r677 r678 15 15 TESTCASE=tst1 16 16 CFLAGS = -Zomf 17 LFLAGS = -Zmap 17 18 O = .obj 18 19 A = .lib … … 51 52 52 53 $(TESTCASE).exe: $(EXEOBJS) $(TESTCASE).gmk 53 if $(CC) -Zmap $(CFLAGS) -o "$@" $(EXEOBJS) -lstdc++; then true; \54 if $(CC) $(CFLAGS) $(LFLAGS) -o "$@" $(EXEOBJS) -lstdc++; then true; \ 54 55 else rm -f $@; false; \ 55 56 fi -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst1asm.asm
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r677 r678 12 12 ; 13 13 14 15 .386 16 14 .386 15 .387 17 16 CODE32 segment para use32 public 'CODE' 18 17 CODE32 ends 18 DATA32 segment para use32 public 'DATA' 19 DATA32 ends 19 20 CONST32_RO segment para use32 public 'CONST' 20 21 CONST32_RO ends 21 22 BSS32 segment para use32 public 'BSS' 23 BSS32 ends 24 DGROUP group BSS32, DATA32 25 assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT 22 26 CONST32_RO segment 23 27 @CBE1 dq 3ff199999999999ar ; 1.1000000000000000e+00 … … 27 31 CONST32_RO ends 28 32 CODE32 segment 29 ASSUME ds:FLAT, es:FLAT, ss:FLAT30 33 31 ; 2 extern int _Optlink foo (int i1, int i2, int i3, float rf1, float rf2, float rf3, floatrf4)34 ; 15 extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4) 32 35 align 010h 33 36 34 37 public asmfoo 35 38 asmfoo proc 39 push ebp 40 mov ebp,esp 41 mov [ebp+08h],eax; i1 42 mov [ebp+0ch],edx; i2 43 mov [ebp+010h],ecx; i3 44 fstp qword ptr [ebp+014h]; rf1 45 fstp qword ptr [ebp+01ch]; rf2 46 fstp qword ptr [ebp+024h]; rf3 47 fstp qword ptr [ebp+02ch]; rf4 36 48 37 ; 4if (i1 != 1)38 cmp eax,01h49 ; 17 if (i1 != 1) 50 cmp dword ptr [ebp+08h],01h; i1 39 51 je @BLBL1 40 fstp st(0)41 fstp st(0)42 fstp st(0)43 fstp st(0)44 52 45 ; 5return 1;53 ; 18 return 1; 46 54 mov eax,01h 55 pop ebp 47 56 ret 48 57 align 010h 49 58 @BLBL1: 50 59 51 ; 6if (i2 != 2)52 cmp edx,02h60 ; 19 if (i2 != 2) 61 cmp dword ptr [ebp+0ch],02h; i2 53 62 je @BLBL2 54 fstp st(0)55 fstp st(0)56 fstp st(0)57 fstp st(0)58 63 59 ; 7 return 2; 60 inc eax 64 ; 20 return 2; 65 mov eax,02h 66 pop ebp 61 67 ret 62 68 align 010h 63 69 @BLBL2: 64 70 65 ; 8if (i3 != 3)66 cmp ecx,03h71 ; 21 if (i3 != 3) 72 cmp dword ptr [ebp+010h],03h; i3 67 73 je @BLBL3 68 fstp st(0)69 fstp st(0)70 fstp st(0)71 fstp st(0)72 74 73 ; 9 return 3; 74 lea eax,[eax+02h] 75 ; 22 return 3; 76 mov eax,03h 77 pop ebp 75 78 ret 76 79 align 010h 77 80 @BLBL3: 78 81 79 ; 10if (rf1 != 1.1)82 ; 23 if (rf1 != 1.1) 80 83 fld qword ptr @CBE1 84 fld qword ptr [ebp+014h]; rf1 81 85 fucompp 82 86 fnstsw ax … … 84 88 cmp ax,04000h 85 89 je @BLBL4 86 fstp st(0)87 fstp st(0)88 fstp st(0)89 90 90 ; 11 return 4; 91 lea eax,[ecx+01h] 91 ; 24 return 4; 92 mov eax,04h 93 pop ebp 92 94 ret 93 95 align 010h 94 96 @BLBL4: 95 97 96 ; 12if (rf2 != 1.2)98 ; 25 if (rf2 != 1.2) 97 99 fld qword ptr @CBE2 100 fld qword ptr [ebp+01ch]; rf2 98 101 fucompp 99 102 fnstsw ax … … 101 104 cmp ax,04000h 102 105 je @BLBL5 103 fstp st(0)104 fstp st(0)105 106 106 ; 13 return 5; 107 lea eax,[ecx+02h] 107 ; 26 return 5; 108 mov eax,05h 109 pop ebp 108 110 ret 109 111 align 010h 110 112 @BLBL5: 111 113 112 ; 14if (rf3 != 1.3)114 ; 27 if (rf3 != 1.3) 113 115 fld qword ptr @CBE3 116 fld qword ptr [ebp+024h]; rf3 114 117 fucompp 115 118 fnstsw ax … … 117 120 cmp ax,04000h 118 121 je @BLBL6 119 fstp st(0)120 122 121 ; 15 return 6; 122 lea eax,[ecx+03h] 123 ; 28 return 6; 124 mov eax,06h 125 pop ebp 123 126 ret 124 127 align 010h 125 128 @BLBL6: 126 129 127 ; 16 if (rf4 != 1.4) 128 ; 17 return 7; 130 ; 29 if (rf4 != 1.4) 129 131 fld qword ptr @CBE4 132 fld qword ptr [ebp+02ch]; rf4 130 133 fucompp 131 134 fnstsw ax 132 135 and ax,04500h 133 136 cmp ax,04000h 134 setne al 135 and eax,01h 136 neg eax 137 and eax,07h 137 je @BLBL7 138 139 ; 30 return 7; 140 mov eax,07h 141 pop ebp 142 ret 143 align 010h 144 @BLBL7: 145 146 ; 31 return 0; 147 mov eax,0h 148 pop ebp 138 149 ret 139 150 asmfoo endp 140 151 CODE32 ends 141 142 152 end -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst1asmc.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r677 r678 13 13 */ 14 14 15 extern int _Optlink asmfoo (int i1, int i2, int i3, float rf1, float rf2, float rf3, floatrf4)15 extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4) 16 16 { 17 17 if (i1 != 1) -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst2.cpp
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r677 r678 39 39 if (pv != (void*)4) 40 40 return 4; 41 if (rf1 != 1.5)41 if (rf1 != (float)1.5) 42 42 return 5; 43 43 if (s2.a != 6) -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst2asm.asm
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r677 r678 1 ; $Id$ 2 ; 3 ; Optlink testcase no. 2. 4 ; 5 ; InnoTek Systemberatung GmbH confidential 6 ; 7 ; Copyright (c) 2003 InnoTek Systemberatung GmbH 8 ; Author: knut st. osmundsen <bird-srcspam@anduin.net> 9 ; 10 ; All Rights Reserved 11 ; 12 ; 13 14 15 .386 16 1 .386 2 .387 17 3 CODE32 segment para use32 public 'CODE' 18 4 CODE32 ends 5 DATA32 segment para use32 public 'DATA' 6 DATA32 ends 19 7 CONST32_RO segment para use32 public 'CONST' 20 8 CONST32_RO ends 21 22 9 BSS32 segment para use32 public 'BSS' 10 BSS32 ends 11 DGROUP group BSS32, DATA32 12 assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT 23 13 CONST32_RO segment 24 14 @CBE1 dq 3ff8000000000000r ; 1.5000000000000000e+00 25 15 CONST32_RO ends 26 27 16 CODE32 segment 28 ASSUME ds:FLAT, es:FLAT, ss:FLAT29 17 30 18 ; 21 int _Optlink asmfoo(int i1, struct sss s1, void *pv, float rf1, struct sss s2) … … 33 21 public asmfoo 34 22 asmfoo proc 23 push ebp 24 mov ebp,esp 25 mov [ebp+08h],eax; i1 26 mov [ebp+014h],edx; pv 27 fstp dword ptr [ebp+018h]; rf1 35 28 36 29 ; 23 if (i1 != 1) 37 cmp eax,01h30 cmp dword ptr [ebp+08h],01h; i1 38 31 je @BLBL1 39 fstp st(0)40 32 41 33 ; 24 return 1; 42 34 mov eax,01h 35 pop ebp 43 36 ret 44 37 align 010h … … 46 39 47 40 ; 25 if (s1.a != 2) 48 cmp dword ptr [e sp+08h],02h; s141 cmp dword ptr [ebp+0ch],02h; s1 49 42 je @BLBL2 50 fstp st(0)51 43 52 44 ; 26 return 2; 53 inc eax 45 mov eax,02h 46 pop ebp 54 47 ret 55 48 align 010h … … 57 50 58 51 ; 27 if (s1.b != 3) 59 cmp dword ptr [e sp+0ch],03h; s152 cmp dword ptr [ebp+010h],03h; s1 60 53 je @BLBL3 61 fstp st(0)62 54 63 55 ; 28 return 3; 64 lea eax,[eax+02h] 56 mov eax,03h 57 pop ebp 65 58 ret 66 59 align 010h … … 68 61 69 62 ; 29 if (pv != (void*)4) 70 cmp edx,04h63 cmp dword ptr [ebp+014h],04h; pv 71 64 je @BLBL4 72 fstp st(0)73 65 74 66 ; 30 return 4; 75 lea eax,[eax+03h] 67 mov eax,04h 68 pop ebp 76 69 ret 77 70 align 010h 78 71 @BLBL4: 79 72 80 ; 31 if (rf1 != 1.5)73 ; 31 if (rf1 != (float)1.5) 81 74 fld dword ptr @CBE2 75 fld dword ptr [ebp+018h]; rf1 82 76 fucompp 83 77 fnstsw ax … … 87 81 88 82 ; 32 return 5; 89 lea eax,[edx+01h] 83 mov eax,05h 84 pop ebp 90 85 ret 91 86 align 010h … … 93 88 94 89 ; 33 if (s2.a != 6) 95 cmp dword ptr [e sp+018h],06h; s290 cmp dword ptr [ebp+01ch],06h; s2 96 91 je @BLBL6 97 92 98 93 ; 34 return 6; 99 lea eax,[edx+02h] 94 mov eax,06h 95 pop ebp 100 96 ret 101 97 align 010h … … 103 99 104 100 ; 35 if (s2.b != 7) 101 cmp dword ptr [ebp+020h],07h; s2 102 je @BLBL7 103 105 104 ; 36 return 7; 106 xor eax,eax 107 cmp dword ptr [esp+01ch],07h; s2 108 setne al 109 neg eax 110 and eax,07h 105 mov eax,07h 106 pop ebp 107 ret 108 align 010h 109 @BLBL7: 110 111 ; 37 return 0; 112 mov eax,0h 113 pop ebp 111 114 ret 112 115 asmfoo endp 113 114 116 CONST32_RO segment 115 117 align 04h 116 118 @CBE2 dd 3fc00000r ; 1.5000000e+00 117 119 CONST32_RO ends 118 119 120 CODE32 ends 120 121 121 end 122 -
Property cvs2svn:cvs-rev
changed from
-
trunk/testcase/optlink/tst2asmc.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r677 r678 29 29 if (pv != (void*)4) 30 30 return 4; 31 if (rf1 != 1.5)31 if (rf1 != (float)1.5) 32 32 return 5; 33 33 if (s2.a != 6) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.