[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bignum multiply on sun4.

Harris pointed out to me last week a bug in the akcl sun4 extended_multiply
routine which was causing

>(*  2376521635263562536153621532153625462433543523526735267

which is of course incorrect (it had better at least end in 1).

This can be fixed either by using the correct C code supplied with the
distribution, or alternately by fixing the sun4 assembler supplied.
The correct assembler file should be:

I apologize for this stupid slip.   Needless to say I like to hear of any such
important bugs as soon as possible.   It was not caught by my maxima test
suite, because it only happened in rather rare circumstances.

Inserting file /usr2/skcl/c/sun4_chtab.s
---Begin File /usr2/skcl/c/sun4_chtab.s---
	.seg	"data"
	.align 2
	.skip	1024
	.global	_character_table
_character_table:	.skip	2048

	.seg	"text"			! [internal]
	.proc	4
	.global	_extended_mul
	save	%sp,-96,%sp
	mov	%i0,%o0
	call	.umul,2
	mov	%i1,%o1
	addcc	%o0,%i2,%i0
	addx    %o1,0,%o1
	sll	%o1,1,%o1
	tst	%i0
	bge	L77003
	sethi	%hi(0x7fffffff),%o3
	or	%o3,%lo(0x7fffffff),%o3	! [internal]
	and	%i0,%o3,%i0
	inc	%o1
	st	%i0,[%i4]
	st	%o1,[%i3]
	restore	%g0,0,%o0

---End File /usr2/skcl/c/sun4_chtab.s---