Index: trunk/testcase/optlink/tst1.c
===================================================================
--- trunk/testcase/optlink/tst1.c	(revision 675)
+++ trunk/testcase/optlink/tst1.c	(revision 678)
@@ -17,7 +17,7 @@
 
 /** in asm */
-extern int _Optlink asmfoo (int i1, int i2, int i3, float rf1, float rf2, float rf3, float rf4);
+extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4);
 
-extern int _Optlink foo (int i1, int i2, int i3, float rf1, float rf2, float rf3, float rf4)
+extern int _Optlink foo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4)
 {
     if (i1 != 1)
Index: trunk/testcase/optlink/tst1.gmk
===================================================================
--- trunk/testcase/optlink/tst1.gmk	(revision 675)
+++ trunk/testcase/optlink/tst1.gmk	(revision 678)
@@ -15,4 +15,5 @@
 TESTCASE=tst1
 CFLAGS  = -Zomf
+LFLAGS	= -Zmap
 O		= .obj
 A	    = .lib
@@ -51,5 +52,5 @@
 				
 $(TESTCASE).exe: $(EXEOBJS) $(TESTCASE).gmk
-	if $(CC) -Zmap $(CFLAGS) -o "$@" $(EXEOBJS) -lstdc++; then true; \
+	if $(CC) $(CFLAGS) $(LFLAGS) -o "$@" $(EXEOBJS) -lstdc++; then true; \
 	else	rm -f $@; false; \
 	fi
Index: trunk/testcase/optlink/tst1asm.asm
===================================================================
--- trunk/testcase/optlink/tst1asm.asm	(revision 675)
+++ trunk/testcase/optlink/tst1asm.asm	(revision 678)
@@ -12,12 +12,16 @@
 ;
 
-
-    .386
-
+	.386
+	.387
 CODE32	segment para use32 public 'CODE'
 CODE32	ends
+DATA32	segment para use32 public 'DATA'
+DATA32	ends
 CONST32_RO	segment para use32 public 'CONST'
 CONST32_RO	ends
-
+BSS32	segment para use32 public 'BSS'
+BSS32	ends
+DGROUP	group BSS32, DATA32
+	assume	cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT
 CONST32_RO	segment
 @CBE1	dq 3ff199999999999ar	; 1.1000000000000000e+00
@@ -27,56 +31,56 @@
 CONST32_RO	ends
 CODE32	segment
-    ASSUME ds:FLAT, es:FLAT, ss:FLAT
 
-; 2 extern int _Optlink foo (int i1, int i2, int i3, float rf1, float rf2, float rf3, float rf4)
+; 15 extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4)
 	align 010h
 
 	public asmfoo
 asmfoo	proc
+	push	ebp
+	mov	ebp,esp
+	mov	[ebp+08h],eax;	i1
+	mov	[ebp+0ch],edx;	i2
+	mov	[ebp+010h],ecx;	i3
+	fstp	qword ptr [ebp+014h];	rf1
+	fstp	qword ptr [ebp+01ch];	rf2
+	fstp	qword ptr [ebp+024h];	rf3
+	fstp	qword ptr [ebp+02ch];	rf4
 
-; 4     if (i1 != 1)
-	cmp	eax,01h
+; 17     if (i1 != 1)
+	cmp	dword ptr [ebp+08h],01h;	i1
 	je	@BLBL1
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
 
-; 5         return 1;
+; 18         return 1;
 	mov	eax,01h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL1:
 
-; 6     if (i2 != 2)
-	cmp	edx,02h
+; 19     if (i2 != 2)
+	cmp	dword ptr [ebp+0ch],02h;	i2
 	je	@BLBL2
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
 
-; 7         return 2;
-	inc	eax
+; 20         return 2;
+	mov	eax,02h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL2:
 
-; 8     if (i3 != 3)
-	cmp	ecx,03h
+; 21     if (i3 != 3)
+	cmp	dword ptr [ebp+010h],03h;	i3
 	je	@BLBL3
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
 
-; 9         return 3;
-	lea	eax,[eax+02h]
+; 22         return 3;
+	mov	eax,03h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL3:
 
-; 10     if (rf1 != 1.1)
+; 23     if (rf1 != 1.1)
 	fld	qword ptr  @CBE1
+	fld	qword ptr [ebp+014h];	rf1
 	fucompp	
 	fnstsw	ax
@@ -84,16 +88,15 @@
 	cmp	ax,04000h
 	je	@BLBL4
-	fstp	st(0)
-	fstp	st(0)
-	fstp	st(0)
 
-; 11         return 4;
-	lea	eax,[ecx+01h]
+; 24         return 4;
+	mov	eax,04h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL4:
 
-; 12     if (rf2 != 1.2)
+; 25     if (rf2 != 1.2)
 	fld	qword ptr  @CBE2
+	fld	qword ptr [ebp+01ch];	rf2
 	fucompp	
 	fnstsw	ax
@@ -101,15 +104,15 @@
 	cmp	ax,04000h
 	je	@BLBL5
-	fstp	st(0)
-	fstp	st(0)
 
-; 13         return 5;
-	lea	eax,[ecx+02h]
+; 26         return 5;
+	mov	eax,05h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL5:
 
-; 14     if (rf3 != 1.3)
+; 27     if (rf3 != 1.3)
 	fld	qword ptr  @CBE3
+	fld	qword ptr [ebp+024h];	rf3
 	fucompp	
 	fnstsw	ax
@@ -117,26 +120,33 @@
 	cmp	ax,04000h
 	je	@BLBL6
-	fstp	st(0)
 
-; 15         return 6;
-	lea	eax,[ecx+03h]
+; 28         return 6;
+	mov	eax,06h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL6:
 
-; 16     if (rf4 != 1.4)
-; 17         return 7;
+; 29     if (rf4 != 1.4)
 	fld	qword ptr  @CBE4
+	fld	qword ptr [ebp+02ch];	rf4
 	fucompp	
 	fnstsw	ax
 	and	ax,04500h
 	cmp	ax,04000h
-	setne	al
-	and	eax,01h
-	neg	eax
-	and	eax,07h
+	je	@BLBL7
+
+; 30         return 7;
+	mov	eax,07h
+	pop	ebp
+	ret	
+	align 010h
+@BLBL7:
+
+; 31     return 0;
+	mov	eax,0h
+	pop	ebp
 	ret	
 asmfoo	endp
 CODE32	ends
-
 end
Index: trunk/testcase/optlink/tst1asmc.c
===================================================================
--- trunk/testcase/optlink/tst1asmc.c	(revision 675)
+++ trunk/testcase/optlink/tst1asmc.c	(revision 678)
@@ -13,5 +13,5 @@
  */
 
-extern int _Optlink asmfoo (int i1, int i2, int i3, float rf1, float rf2, float rf3, float rf4)
+extern int _Optlink asmfoo (int i1, int i2, int i3, double rf1, double rf2, double rf3, double rf4)
 {
     if (i1 != 1)
Index: trunk/testcase/optlink/tst2.cpp
===================================================================
--- trunk/testcase/optlink/tst2.cpp	(revision 675)
+++ trunk/testcase/optlink/tst2.cpp	(revision 678)
@@ -39,5 +39,5 @@
     if (pv != (void*)4)
         return 4;
-    if (rf1 != 1.5)
+    if (rf1 != (float)1.5)
         return 5;
     if (s2.a != 6)
Index: trunk/testcase/optlink/tst2asm.asm
===================================================================
--- trunk/testcase/optlink/tst2asm.asm	(revision 675)
+++ trunk/testcase/optlink/tst2asm.asm	(revision 678)
@@ -1,30 +1,18 @@
-; $Id$
-;
-; Optlink testcase no. 2.
-;
-; InnoTek Systemberatung GmbH confidential
-;
-; Copyright (c) 2003 InnoTek Systemberatung GmbH
-; Author: knut st. osmundsen <bird-srcspam@anduin.net>
-;
-; All Rights Reserved
-;
-;
-
-
-    .386
-
+	.386
+	.387
 CODE32	segment para use32 public 'CODE'
 CODE32	ends
+DATA32	segment para use32 public 'DATA'
+DATA32	ends
 CONST32_RO	segment para use32 public 'CONST'
 CONST32_RO	ends
-
-
+BSS32	segment para use32 public 'BSS'
+BSS32	ends
+DGROUP	group BSS32, DATA32
+	assume	cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT
 CONST32_RO	segment
 @CBE1	dq 3ff8000000000000r	; 1.5000000000000000e+00
 CONST32_RO	ends
-
 CODE32	segment
-    ASSUME ds:FLAT, es:FLAT, ss:FLAT
 
 ; 21 int _Optlink asmfoo(int i1, struct sss s1, void *pv, float rf1, struct sss s2)
@@ -33,12 +21,17 @@
 	public asmfoo
 asmfoo	proc
+	push	ebp
+	mov	ebp,esp
+	mov	[ebp+08h],eax;	i1
+	mov	[ebp+014h],edx;	pv
+	fstp	dword ptr [ebp+018h];	rf1
 
 ; 23     if (i1 != 1)
-	cmp	eax,01h
+	cmp	dword ptr [ebp+08h],01h;	i1
 	je	@BLBL1
-	fstp	st(0)
 
 ; 24         return 1;
 	mov	eax,01h
+	pop	ebp
 	ret	
 	align 010h
@@ -46,10 +39,10 @@
 
 ; 25     if (s1.a != 2)
-	cmp	dword ptr [esp+08h],02h;	s1
+	cmp	dword ptr [ebp+0ch],02h;	s1
 	je	@BLBL2
-	fstp	st(0)
 
 ; 26         return 2;
-	inc	eax
+	mov	eax,02h
+	pop	ebp
 	ret	
 	align 010h
@@ -57,10 +50,10 @@
 
 ; 27     if (s1.b != 3)
-	cmp	dword ptr [esp+0ch],03h;	s1
+	cmp	dword ptr [ebp+010h],03h;	s1
 	je	@BLBL3
-	fstp	st(0)
 
 ; 28         return 3;
-	lea	eax,[eax+02h]
+	mov	eax,03h
+	pop	ebp
 	ret	
 	align 010h
@@ -68,16 +61,17 @@
 
 ; 29     if (pv != (void*)4)
-	cmp	edx,04h
+	cmp	dword ptr [ebp+014h],04h;	pv
 	je	@BLBL4
-	fstp	st(0)
 
 ; 30         return 4;
-	lea	eax,[eax+03h]
+	mov	eax,04h
+	pop	ebp
 	ret	
 	align 010h
 @BLBL4:
 
-; 31     if (rf1 != 1.5)
+; 31     if (rf1 != (float)1.5)
 	fld	dword ptr  @CBE2
+	fld	dword ptr [ebp+018h];	rf1
 	fucompp	
 	fnstsw	ax
@@ -87,5 +81,6 @@
 
 ; 32         return 5;
-	lea	eax,[edx+01h]
+	mov	eax,05h
+	pop	ebp
 	ret	
 	align 010h
@@ -93,9 +88,10 @@
 
 ; 33     if (s2.a != 6)
-	cmp	dword ptr [esp+018h],06h;	s2
+	cmp	dword ptr [ebp+01ch],06h;	s2
 	je	@BLBL6
 
 ; 34         return 6;
-	lea	eax,[edx+02h]
+	mov	eax,06h
+	pop	ebp
 	ret	
 	align 010h
@@ -103,20 +99,23 @@
 
 ; 35     if (s2.b != 7)
+	cmp	dword ptr [ebp+020h],07h;	s2
+	je	@BLBL7
+
 ; 36         return 7;
-	xor	eax,eax
-	cmp	dword ptr [esp+01ch],07h;	s2
-	setne	al
-	neg	eax
-	and	eax,07h
+	mov	eax,07h
+	pop	ebp
+	ret	
+	align 010h
+@BLBL7:
+
+; 37     return 0;
+	mov	eax,0h
+	pop	ebp
 	ret	
 asmfoo	endp
-
 CONST32_RO	segment
 	align 04h
 @CBE2	dd 3fc00000r	; 1.5000000e+00
 CONST32_RO	ends
-
 CODE32	ends
-
 end
-
Index: trunk/testcase/optlink/tst2asmc.c
===================================================================
--- trunk/testcase/optlink/tst2asmc.c	(revision 675)
+++ trunk/testcase/optlink/tst2asmc.c	(revision 678)
@@ -29,5 +29,5 @@
     if (pv != (void*)4)
         return 4;
-    if (rf1 != 1.5)
+    if (rf1 != (float)1.5)
         return 5;
     if (s2.a != 6)
