Problems building on HP-UX 11.31/IA

Albert Chin gmp-bugs at mlists.thewrittenword.com
Wed Jul 8 14:21:24 UTC 2015


I tried building gmp-6.0.0a on HP-UX 11.31/IA and ran into a problem:
  $ tar Jxf gmp-6.0.0a.tar.xz
  $ cd gmp-5.1.2
  gmp-6.0.0$ ./configure M4=/opt/fsw/m414/bin/gm4 --disable-cxx
  ...
    Version:           GNU MP 6.0.0
    Host type:         itanium2-hp-hpux11.31
    ABI:               32
    Install prefix:    /usr/local
    Compiler:          cc
    Static libraries:  yes
    Shared libraries:  yes
  gmp-6.0.0$ gmake
  ...
  /opt/fsw/m414/bin/gm4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s
   cc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n +O3 tmp-add_n.s +Z -DPIC -o .libs/add_n.o
  tmp-add_n.s:115: error 4032: must be in a bundle
  tmp-add_n.s:145: error 4032: must be in a bundle
  tmp-add_n.s:149: error 4032: must be in a bundle
  tmp-add_n.s:152: error 4032: must be in a bundle
  ...

This error occurs in a few files: mpn/ia64/aors_n.asm,
mpn/ia64/cnd_aors_n.asm, mpn/ia64/mod_34lsub1.asm,
mpn/ia64/lshiftc.asm. I have fixes for these files but have not run
tests yet. I have encountered an error in mpn/ia64/gcd_1.asm which I
do not know how to fix:
  /opt/fsw/m414/bin/gm4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_gcd_1 -DPIC gcd_1.asm >tmp-gcd_1.s
   cc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_gcd_1 +O3 tmp-gcd_1.s +Z -DPIC -o .libs/gcd_1.o
  tmp-gcd_1.s:113: error 4028: symbol expected
  tmp-gcd_1.s:114: error 4013: no current section
  tmp-gcd_1.s:115: error 4013: no current section
  tmp-gcd_1.s:116: error 4001: syntax error
  tmp-gcd_1.s:117: error 4001: syntax error
  tmp-gcd_1.s:118: error 4001: syntax error
  tmp-gcd_1.s:119: error 4001: syntax error
  tmp-gcd_1.s:120: error 4001: syntax error
  tmp-gcd_1.s:121: error 4001: syntax error

I have attached a copy of tmp-gcd_1.s (tmp-gcd_1.s-6.0.0). gmp-5.0.5
was the last version to build on this platform. I have attached a copy
of it as well (tmp-gcd_1.s-5.0.5). It does not have the ".rodata"
section. Maybe the HP assembler doesn't like .section? Ditto for
.byte?

-- 
albert chin (china at thewrittenword.com)
-------------- next part --------------


























































































































	.explicit				


	.global	__gmpn_modexact_1c_odd
	.type	__gmpn_modexact_1c_odd, at function

	
	.text
	.align	32
	.global	__gmpn_gcd_1#
	.proc	__gmpn_gcd_1#
__gmpn_gcd_1:

		
		
		




  




  



  

	.prologue
{ .mmi;
		addp4	r9 = 0, r32   
	.save ar.pfs, r36
		alloc	r36 = ar.pfs, 3, 5, 4, 0 
	.save rp, r35
		mov	r35 = b0		
}{	.body
		add	r10 = -1, r34		
}		;;

{ .mmi;		ld8	r8 = [r9]		
		ld8	r37 = [r9]		
		cmp.ne	p6,p0 = 1, r33	
}{ .mmi;	andcm	r39 = r10, r34		
		mov	r40 = r32	
		mov	r41 = r33	
}		;;

		mov	r43 = 0

		

		popcnt	r39 = r39		
		;;

		

{ .mmi;		add	r38 = -1, r37	
		shr.u	r42 = r34, r39	
}{		shr.u	r34 = r34, r39		
	(p6)	br.call.sptk.many b0 = __gmpn_modexact_1c_odd  
}		;;

		
{ .mmi;		cmp.eq	p6,p0 = 0, r8		
		andcm	r37 = r38, r37	
		add	r9 = -1, r8		
}		;;

{ .mmi;		andcm	r9 = r9, r8		
		mov	b0 = r35		
}		;;

		

		popcnt	r37 = r37		

		popcnt	r9 = r9			
		;;

		

{		cmp.lt	p7,p0 = r37, r39	
		shr.u	r8 = r8, r9		
}		;;

{	(p7)	mov	r39 = r37		
		add	r10 = -1, r34		
	(p6)	br.dpnt.few .Ldone_y		
}		;;

		


		
		
.Ltop:
		
		
		
		

{  .mmi;	cmp.gtu	p8,p9 = r8, r34	
		cmp.ne	p10,p0 = r8, r34	
		sub	r9 = r34, r8	
}{ .mmi;	sub	r10 = r10, r8	
}		;;

{ .mmi;	.pred.rel "mutex", p8, p9
	(p8)	sub	r8 = r8, r34	
	(p9)	mov	r34 = r8		
	(p9)	mov	r8 = r9		
}{ .mmi;	andcm	r9 = r10, r9	
		;;

		add	r10 = -1, r34	
		popcnt	r9 = r9		
}		;;

{		shr.u	r8 = r8, r9	
	(p10)	br.sptk.few.clr .Ltop
}		;;



		
.Ldone_y:
		shl	r8 = r34, r39		
		;;
		mov	ar.pfs = r36	
		br.ret.sptk.many b0

	
	.endp	__gmpn_gcd_1#

-------------- next part --------------





































































































	.explicit				


	.global	__gmpn_modexact_1c_odd
	.type	__gmpn_modexact_1c_odd, at function






	.section	".rodata"
	.align	128	
ctz_table:
	.byte	7
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	4
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	5
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	4
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	6
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	4
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	5
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	4
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0
	.byte	3
	.byte	0
	.byte	1
	.byte	0
	.byte	2
	.byte	0
	.byte	1
	.byte	0


	
	.text
	.align	32
	.global	__gmpn_gcd_1#
	.proc	__gmpn_gcd_1#
__gmpn_gcd_1:

		
		
		




  




  



  

	.prologue
{ .mmi;
		addp4	r9 = 0, r32   
	.save ar.pfs, r36
		alloc	r36 = ar.pfs, 3, 5, 4, 0 
	.save rp, r35
		mov	r35 = b0		
}{	.body
		add	r10 = -1, r34		
}		;;

{ .mmi;		ld8	r8 = [r9]		
		ld8	r37 = [r9]		
		cmp.ne	p6,p0 = 1, r33	
}{ .mmi;	andcm	r39 = r10, r34		
		mov	r40 = r32	
		mov	r41 = r33	
}		;;

		mov	r43 = 0

		popcnt	r39 = r39		
		;;

{ .mmi;		add	r38 = -1, r37	
		shr.u	r42 = r34, r39	
}{		shr.u	r34 = r34, r39		
	(p6)	br.call.sptk.many b0 = __gmpn_modexact_1c_odd  
}		;;

		
{ .mmi;		cmp.eq	p6,p0 = 0, r8		
		andcm	r37 = r38, r37	
		add	r9 = -1, r8		
}		;;

{ .mmi;		andcm	r9 = r9, r8		
		mov	b0 = r35		
}		;;

		popcnt	r37 = r37		
		popcnt	r9 = r9			
		;;

{		cmp.lt	p7,p0 = r37, r39	
		shr.u	r8 = r8, r9		
}		;;

{	(p7)	mov	r39 = r37		
		add	r10 = -1, r34		
	(p6)	br.dpnt.few .Ldone_y		
}		;;

		addl	r22 = @ltoffx(ctz_table#), r1
		mov	r25 = 16256
		;;
		ld8.mov r22 = [r22], ctz_table#
		br	.Lent

		.align	32
.Ltop:		.pred.rel "mutex", p6,p7
.mmi;	(p7)	mov	r34 = r8
	(p6)	sub	r8 = r8, r34
		dep	r21 = r19, r22, 0, 7	
.mmi;		and	r20 = 127, r19
	(p7)	mov	r8 = r19
		nop	0
		;;
.Lmid:
.mmb;		ld1	r16 = [r21]
		cmp.eq	p10,p0 = 0, r20
	(p10)	br.spnt.few.clr	 .Lshift_alot
		;;
.mmi;		nop	0
		nop	0
		shr.u	r8 = r8, r16
		;;
.Lent:
.mmi;		sub	r19 = r34, r8
		cmp.gtu	p6,p7 = r8, r34
		cmp.ne	p8,p0 = r8, r34
.mmb;		nop	0
		nop	0
	(p8)	br.sptk.few.clr .Ltop


		
.Ldone_y:
		mov	ar.pfs = r36	
		shl	r8 = r34, r39		
		br.ret.sptk.many b0

.Lshift_alot:
		and	r20 = r8, r25
		shr.u	r8 = r8, 7
		;;
		dep	r21 = r8, r22, 0, 7
		br	.Lmid
	
	.endp	__gmpn_gcd_1#



More information about the gmp-bugs mailing list