solaris 'as' problem

Kenji Miyake kenji at miyake.org
Wed Aug 15 17:02:01 CEST 2001


 Hi,
 I have some compiling problem gpg1.0.6 in solaris2.5.1(x86) and solved.


--- ./mpi/i386/syntax.h.org	Wed May  2 02:40:53 2001
+++ ./mpi/i386/syntax.h	Mon Aug 13 16:47:48 2001
@@ -50,6 +50,25 @@
 #define GLOBL .globl
 #endif
 
+#if defined(SUN_X86_SYNTAX)
+#define MEM(base)(base)
+#define MEM_DISP(base,displacement)displacement(R(base))
+#define MEM_INDEX(base,index,size)(R(base),R(index),size)
+#ifdef __STDC__
+#define R(r) _R(r)
+#define _R(r) %##r
+#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
+#else
+#define R(r) %/**/r
+#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
+#endif
+#define TEXT .text
+#define ALIGN(log) .align 1<<log
+#define GLOBL .globl
+#endif
+
 #ifdef INTEL_SYNTAX
 #define R(r) r
 #define MEM(base)[base]
--- ./mpi/i386/mpih-add1.S.org	Sun Apr 29 22:04:57 2001
+++ ./mpi/i386/mpih-add1.S	Wed Aug 15 22:05:54 2001
@@ -71,11 +71,19 @@
 	call	L0
 L0:	leal	(%eax,%eax,8),%eax
 	addl	(%esp),%eax
+#ifdef SUN_X86_SYNTAX
+	addl	$[Loop-L0-3],%eax
+#else
 	addl	$(Loop-L0-3),%eax
+#endif
 	addl	$4,%esp
 #else
 /* Calculate start address in loop for non-PIC.  */
+#ifdef SUN_X86_SYNTAX
+	leal	[Loop - 3](%eax,%eax,8),%eax
+#else
 	leal	(Loop - 3)(%eax,%eax,8),%eax
+#endif
 #endif
 	jmp	*%eax			/* jump into loop */
 	ALIGN (3)
--- ./mpi/i386/mpih-sub1.S.org	Sun Apr 29 22:06:53 2001
+++ ./mpi/i386/mpih-sub1.S	Wed Aug 15 22:06:49 2001
@@ -72,11 +72,19 @@
 	call	L0
 L0:	leal	(%eax,%eax,8),%eax
 	addl	(%esp),%eax
+#ifdef SUN_X86_SYNTAX
+	addl	$[Loop-L0-3],%eax
+#else
 	addl	$(Loop-L0-3),%eax
+#endif
 	addl	$4,%esp
 #else
 /* Calculate start address in loop for non-PIC.  */
+#ifdef SUN_X86_SYNTAX
+	leal	[Loop - 3](%eax,%eax,8),%eax
+#else
 	leal	(Loop - 3)(%eax,%eax,8),%eax
+#endif
 #endif
 	jmp	*%eax			/* jump into loop */
 	ALIGN (3)
--- ./mpi/i386/mpih-lshift.S.org	Sun Apr 29 22:05:07 2001
+++ ./mpi/i386/mpih-lshift.S	Mon Aug 13 19:23:24 2001
@@ -57,21 +57,33 @@
 
 	movl	(%esi,%edx,4),%ebx	/* read most significant limb */
 	xorl	%eax,%eax
+#ifdef SUN_X86_SYNTAX
+	shldl	%ebx,%eax		/* compute carry limb */
+#else
 	shldl	%cl,%ebx,%eax		/* compute carry limb */
+#endif
 	decl	%edx
 	jz	Lend
 	pushl	%eax			/* push carry limb onto stack */
-	testb	$1,%edx
+	testb	$1,%dl
 	jnz	L1			/* enter loop in the middle */
 	movl	%ebx,%eax
 
 	ALIGN (3)
 Loop:	movl	(%esi,%edx,4),%ebx	/* load next lower limb */
+#ifdef SUN_X86_SYNTAX
+	shldl	%ebx,%eax		/* compute result limb */
+#else
 	shldl	%cl,%ebx,%eax		/* compute result limb */
+#endif
 	movl	%eax,(%edi,%edx,4)	/* store it */
 	decl	%edx
 L1:	movl	(%esi,%edx,4),%eax
+#ifdef SUN_X86_SYNTAX
+	shldl	%eax,%ebx
+#else
 	shldl	%cl,%eax,%ebx
+#endif
 	movl	%ebx,(%edi,%edx,4)
 	decl	%edx
 	jnz	Loop
--- ./mpi/i386/mpih-rshift.S.org	Sun Apr 29 22:06:44 2001
+++ ./mpi/i386/mpih-rshift.S	Mon Aug 13 19:23:46 2001
@@ -60,21 +60,33 @@
 
 	movl	(%esi,%edx,4),%ebx	/* read least significant limb */
 	xorl	%eax,%eax
+#ifdef SUN_X86_SYNTAX
+	shrdl	%ebx,%eax		/* compute carry limb */
+#else
 	shrdl	%cl,%ebx,%eax		/* compute carry limb */
+#endif
 	incl	%edx
 	jz	Lend2
 	pushl	%eax			/* push carry limb onto stack */
-	testb	$1,%edx
+	testb	$1,%dl
 	jnz	L2			/* enter loop in the middle */
 	movl	%ebx,%eax
 
 	ALIGN (3)
 Loop2:	 movl	 (%esi,%edx,4),%ebx	 /* load next higher limb */
+#ifdef SUN_X86_SYNTAX
+	shrdl	%ebx,%eax		/* compute result limb */
+#else
 	shrdl	%cl,%ebx,%eax		/* compute result limb */
+#endif
 	movl	%eax,(%edi,%edx,4)	/* store it */
 	incl	%edx
 L2:	movl	(%esi,%edx,4),%eax
+#ifdef SUN_X86_SYNTAX
+	shrdl	%eax,%ebx
+#else
 	shrdl	%cl,%eax,%ebx
+#endif
 	movl	%ebx,(%edi,%edx,4)
 	incl	%edx
 	jnz	Loop2
--- ./mpi/config.links.org	Sun Apr 29 20:36:18 2001
+++ ./mpi/config.links	Wed Aug 15 22:15:47 2001
@@ -80,6 +80,11 @@
 	cat  $srcdir/mpi/i386/syntax.h	 >>./mpi/asm-syntax.h
 	path="i586 i386"
 	;;
+    i[3467]86*-*-solaris2*)
+	echo '#define SUN_X86_SYNTAX' >>./mpi/asm-syntax.h
+	cat  $srcdir/mpi/i386/syntax.h	    >>./mpi/asm-syntax.h
+	path="i386"
+	;;
     i[3467]86*-*-*)
 	echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
 	cat  $srcdir/mpi/i386/syntax.h	    >>./mpi/asm-syntax.h




More information about the Gnupg-devel mailing list