This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

infinite loop in mips16 assembler relaxation


The attached assembly output of gcc.c-torture/execute/gofast.c,
compiled with the flags -mel -mabi=32 -mlong32 -mips16 -msoft-float
-O3 -fomit-frame-pointer causes the assembler, called with the flags
-EL -mips16 -O3 -32 -mabi=32, to enter an endless loop.  The problem
is that, after some initial relaxations, estimate_size_before_relax
and mips_relax_frag start undoing each other's effects, growing and
shrinking the same frags over and over.  Since mips_relax_frag
introduces changes in each round, the cycle is restarted, and never
ends.

I get the impression that there still is something wrong, as I don't
see why a frag would ever shrink, if we started with all frags with
the EXTENDED bit clear, and only extended those as they were found to
overflow.

However, this simple approach doesn't work, for some reason I can't
understand.  I've modified the code so as to verify that all frags
start out with the EXTENDED bit clear, and only grow if
mips16_extended_frag() says it's necessary.  Even in this case, I
still got one frag that had to be shrunk in the second round of
relaxation.  The difference, it seems, stems from the fact that the
stretch passed to mips16_extended_frag() was much larger in the first
round, and the code that adjusts the stretch according to subsequent
align directives doesn't seem to be doing an exact job.  It seems to
be good enough, though; in the worst case, we get a few additional
rounds of relaxation.  I *think* it wouldn't enter an endless loop
like the original code did, but I couldn't prove it to myself.  :-(

Here's the simplest patch I could come up with.  Eric Chistopher
approved the patch, so I'm checking it in.  Tested with a Red
Hat-internal MIPS port and with athlon-pc-linux-gnu-x-mips-elf (does
this really test mips16?)

Index: gas/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* config/tc-mips.c (md_estimate_size_before_relax): Do not modify
	the EXTENDED bit here; report the estimate according to the
	current size.

Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.113
diff -u -p -r1.113 tc-mips.c
--- gas/config/tc-mips.c 2002/03/16 03:09:14 1.113
+++ gas/config/tc-mips.c 2002/03/18 18:39:43
@@ -12193,18 +12193,9 @@ md_estimate_size_before_relax (fragp, se
   boolean linkonce = false;
 
   if (RELAX_MIPS16_P (fragp->fr_subtype))
-    {
-      if (mips16_extended_frag (fragp, segtype, 0))
-	{
-	  fragp->fr_subtype = RELAX_MIPS16_MARK_EXTENDED (fragp->fr_subtype);
-	  return 4;
-	}
-      else
-	{
-	  fragp->fr_subtype = RELAX_MIPS16_CLEAR_EXTENDED (fragp->fr_subtype);
-	  return 2;
-	}
-    }
+    /* We don't want to modify the EXTENDED bit here; it might get us
+       into infinite loops.  We change it only in mips_relax_frag().  */
+    return (RELAX_MIPS16_EXTENDED (fragp->fr_subtype) ? 4 : 2);
 
   if (mips_pic == NO_PIC)
     {

	.file	1 "gofast.i"
	.section .mdebug.abi32
	.previous
	.set	mips16
	.globl	fail_count
	.sdata
	.align	2
	.type	fail_count,@object
	.size	fail_count,4
fail_count:
	.word	0
	.text
	.align	2
	.globl	main
	.file	2 "gofast.c"
	.ent	main
main:
	.frame	$sp,32,$31		# vars= 0, regs= 3/0, args= 16, extra= 0
	.mask	0x80030000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-32
	sw	$17,20($sp)
	sw	$31,24($sp)
	sw	$16,16($sp)
	jal	__main
	lw	$4,$LC0
	#nop
	move	$5,$4
	jal	fpadd
	move	$17,$2
	move	$4,$17
	move	$5,$17
	jal	fpcmp
	beqz	$2,$L151
	move	$2,$28
	lw	$5,%gprel(_impure_ptr)($2)
	move	$16,$28
	lw	$4,12($5)
	addu	$16,%gprel(fail_count)
	la	$6,$LC2
	lw	$3,0($16)
	#nop
	addu	$3,1
	sw	$3,0($16)
	la	$5,$LC3
	jal	fprintf
$L2:
	lw	$4,$LC0
	#nop
	move	$5,$4
	jal	fpcmp
	beqz	$2,$L6
	move	$4,$28
	lw	$5,%gprel(_impure_ptr)($4)
	lw	$6,0($16)
	#nop
	addu	$6,1
	sw	$6,0($16)
	la	$6,$LC5
	lw	$4,12($5)
	la	$5,$LC3
	jal	fprintf
$L6:
	move	$4,$17
	lw	$5,$LC4
	jal	fpmul
	move	$4,$2
	move	$5,$2
	jal	fpcmp
	beqz	$2,$L10
	lw	$3,0($16)
	move	$2,$28
	addu	$3,1
	lw	$7,%gprel(_impure_ptr)($2)
	sw	$3,0($16)
	lw	$4,12($7)
	la	$5,$LC3
	la	$6,$LC7
	jal	fprintf
$L10:
	lw	$4,$LC4
	move	$5,$17
	jal	fpdiv
	move	$4,$2
	jal	fptodp
	lw	$4,$LC8
	lw	$5,$LC8+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L14
	move	$5,$28
	lw	$4,0($16)
	lw	$17,%gprel(_impure_ptr)($5)
	addu	$4,1
	la	$6,$LC9
	sw	$4,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	jal	fprintf
$L14:
	lw	$4,$LC10
	lw	$5,$LC0
	jal	fpsub
	move	$4,$2
	move	$5,$2
	jal	fpcmp
	beqz	$2,$L18
	move	$7,$28
	lw	$6,%gprel(_impure_ptr)($7)
	lw	$3,0($16)
	lw	$4,12($6)
	addu	$3,1
	la	$5,$LC3
	sw	$3,0($16)
	la	$6,$LC12
	jal	fprintf
$L18:
	lw	$4,$LC13
	lw	$5,$LC13+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpadd
	lw	$4,$LC14
	lw	$5,$LC14+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L22
	lw	$5,0($16)
	move	$2,$28
	addu	$5,1
	lw	$17,%gprel(_impure_ptr)($2)
	sw	$5,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	la	$6,$LC15
	jal	fprintf
$L22:
	lw	$4,$LC13
	lw	$5,$LC13+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L26
	move	$4,$28
	lw	$6,%gprel(_impure_ptr)($4)
	lw	$7,0($16)
	la	$5,$LC3
	addu	$7,1
	sw	$7,0($16)
	lw	$4,12($6)
	la	$6,$LC17
	jal	fprintf
$L26:
	lw	$4,$LC14
	lw	$5,$LC14+4
	lw	$6,$LC16
	lw	$7,$LC16+4
	jal	dpmul
	move	$4,$2
	move	$5,$3
	move	$6,$2
	move	$7,$3
	jal	dpcmp
	beqz	$2,$L30
	lw	$3,0($16)
	move	$2,$28
	addu	$3,1
	lw	$17,%gprel(_impure_ptr)($2)
	sw	$3,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	la	$6,$LC19
	jal	fprintf
$L30:
	lw	$4,$LC8
	lw	$5,$LC8+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L34
	move	$6,$28
	lw	$5,%gprel(_impure_ptr)($6)
	lw	$4,0($16)
	#nop
	addu	$4,1
	sw	$4,0($16)
	lw	$4,12($5)
	la	$6,$LC20
	la	$5,$LC3
	jal	fprintf
$L34:
	lw	$4,$LC21
	lw	$5,$LC21+4
	lw	$6,$LC13
	lw	$7,$LC13+4
	jal	dpsub
	move	$4,$2
	move	$5,$3
	move	$6,$2
	move	$7,$3
	jal	dpcmp
	beqz	$2,$L38
	lw	$3,0($16)
	move	$17,$28
	addu	$3,1
	lw	$7,%gprel(_impure_ptr)($17)
	sw	$3,0($16)
	lw	$4,12($7)
	la	$5,$LC3
	la	$6,$LC23
	jal	fprintf
$L38:
	lw	$4,$LC8
	lw	$5,$LC8+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L42
	move	$2,$28
	lw	$5,%gprel(_impure_ptr)($2)
	lw	$6,0($16)
	lw	$4,12($5)
	addu	$6,1
	sw	$6,0($16)
	la	$6,$LC25
	la	$5,$LC3
	jal	fprintf
$L42:
	lw	$4,$LC8
	lw	$5,$LC8+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L46
	move	$4,$28
	lw	$17,0($16)
	lw	$7,%gprel(_impure_ptr)($4)
	addu	$17,1
	la	$5,$LC3
	sw	$17,0($16)
	la	$6,$LC26
	lw	$4,12($7)
	jal	fprintf
$L46:
	lw	$4,$LC0
	#nop
	move	$5,$4
	jal	fpcmp
	beqz	$2,$L50
	move	$2,$28
	lw	$5,%gprel(_impure_ptr)($2)
	lw	$3,0($16)
	lw	$4,12($5)
	addu	$3,1
	la	$6,$LC27
	sw	$3,0($16)
	la	$5,$LC3
	jal	fprintf
$L50:
	lw	$4,$LC13
	lw	$5,$LC13+4
	#nop
	move	$6,$4
	move	$7,$5
	jal	dpcmp
	beqz	$2,$L54
	move	$7,$28
	lw	$6,%gprel(_impure_ptr)($7)
	lw	$4,0($16)
	la	$5,$LC3
	addu	$4,1
	sw	$4,0($16)
	lw	$4,12($6)
	la	$6,$LC28
	jal	fprintf
$L54:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	beqz	$2,$L152
$L71:
	beqz	$17,$L153
$L70:
	li	$17,0
	lw	$4,$LC0
	lw	$5,$LC1
	jal	fpcmp
	beqz	$2,$L154
$L76:
	beqz	$17,$L75
	move	$2,$28
	lw	$6,%gprel(_impure_ptr)($2)
	lw	$7,0($16)
	lw	$4,12($6)
	addu	$7,1
	la	$5,$LC3
	sw	$7,0($16)
	la	$6,$LC36
	jal	fprintf
$L75:
	li	$17,0
	lw	$4,$LC0
	lw	$5,$LC1
	jal	fpcmp
	beqz	$2,$L81
	li	$17,1
$L81:
	beqz	$17,$L155
$L80:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	beqz	$2,$L86
	li	$17,1
$L86:
	beqz	$17,$L85
	move	$2,$28
	lw	$6,%gprel(_impure_ptr)($2)
	lw	$3,0($16)
	lw	$4,12($6)
	addu	$3,1
	la	$5,$LC3
	sw	$3,0($16)
	la	$6,$LC37
	jal	fprintf
$L85:
	lw	$4,$LC0
	lw	$5,$LC1
	li	$17,0
	jal	fpcmp
	slt	$2,0
	btnez	$L156
$L91:
	beqz	$17,$L157
$L90:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	slt	$2,0
	btnez	$L158
$L96:
	beqz	$17,$L95
	move	$6,$28
	lw	$5,%gprel(_impure_ptr)($6)
	lw	$3,0($16)
	lw	$4,12($5)
	addu	$3,1
	sw	$3,0($16)
	la	$5,$LC3
	la	$6,$LC39
	jal	fprintf
$L95:
	lw	$4,$LC0
	lw	$5,$LC10
	li	$17,0
	jal	fpcmp
	slt	$2,0
	btnez	$L159
$L101:
	beqz	$17,$L100
	lw	$17,0($16)
	move	$2,$28
	addu	$17,1
	lw	$7,%gprel(_impure_ptr)($2)
	sw	$17,0($16)
	lw	$4,12($7)
	la	$5,$LC3
	la	$6,$LC40
	jal	fprintf
$L100:
	lw	$4,$LC0
	lw	$5,$LC1
	li	$17,0
	jal	fpcmp
	slt	$2,1
	btnez	$L160
$L106:
	beqz	$17,$L161
$L105:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	slt	$2,1
	btnez	$L162
$L111:
	beqz	$17,$L163
$L110:
	lw	$4,$LC0
	lw	$5,$LC10
	li	$17,0
	jal	fpcmp
	slt	$2,1
	btnez	$L164
$L116:
	beqz	$17,$L115
	move	$5,$28
	lw	$4,0($16)
	lw	$17,%gprel(_impure_ptr)($5)
	addu	$4,1
	la	$6,$LC43
	sw	$4,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	jal	fprintf
$L115:
	lw	$4,$LC0
	lw	$5,$LC1
	li	$17,0
	jal	fpcmp
	slt	$2,0
	btnez	$L165
$L121:
	beqz	$17,$L166
$L120:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	slt	$2,0
	btnez	$L167
$L126:
	beqz	$17,$L125
	lw	$5,0($16)
	move	$2,$28
	addu	$5,1
	lw	$17,%gprel(_impure_ptr)($2)
	sw	$5,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	la	$6,$LC45
	jal	fprintf
$L125:
	lw	$4,$LC0
	lw	$5,$LC10
	li	$17,0
	jal	fpcmp
	slt	$2,0
	btnez	$L168
$L131:
	beqz	$17,$L130
	move	$4,$28
	lw	$6,%gprel(_impure_ptr)($4)
	lw	$7,0($16)
	la	$5,$LC3
	addu	$7,1
	sw	$7,0($16)
	lw	$4,12($6)
	la	$6,$LC46
	jal	fprintf
$L130:
	lw	$4,$LC0
	lw	$5,$LC1
	li	$17,0
	jal	fpcmp
	slt	$2,1
	btnez	$L169
$L136:
	beqz	$17,$L170
$L135:
	lw	$4,$LC0
	li	$17,0
	move	$5,$4
	jal	fpcmp
	slt	$2,1
	btnez	$L171
$L141:
	beqz	$17,$L172
$L140:
	lw	$4,$LC0
	lw	$5,$LC10
	li	$17,0
	jal	fpcmp
	slt	$2,1
	btnez	$L173
$L146:
	beqz	$17,$L145
	lw	$3,0($16)
	move	$17,$28
	addu	$3,1
	lw	$7,%gprel(_impure_ptr)($17)
	sw	$3,0($16)
	lw	$4,12($7)
	la	$5,$LC3
	la	$6,$LC49
	jal	fprintf
$L145:
	lw	$5,0($16)
	#nop
	beqz	$5,$L150
	jal	abort
$L173:
	li	$17,1
	b	$L146
$L172:
	move	$6,$28
	lw	$5,%gprel(_impure_ptr)($6)
	lw	$4,0($16)
	#nop
	addu	$4,1
	sw	$4,0($16)
	lw	$4,12($5)
	la	$6,$LC48
	la	$5,$LC3
	jal	fprintf
	b	$L140
$L171:
	li	$17,1
	b	$L141
$L170:
	lw	$3,0($16)
	move	$2,$28
	addu	$3,1
	lw	$17,%gprel(_impure_ptr)($2)
	sw	$3,0($16)
	lw	$4,12($17)
	la	$5,$LC3
	la	$6,$LC47
	jal	fprintf
	b	$L135
$L169:
	li	$17,1
	b	$L136
$L168:
	li	$17,1
	b	$L131
$L167:
	li	$17,1
	b	$L126
$L166:
	move	$7,$28
	lw	$6,%gprel(_impure_ptr)($7)
	lw	$3,0($16)
	lw	$4,12($6)
	addu	$3,1
	la	$5,$LC3
	sw	$3,0($16)
	la	$6,$LC44
	jal	fprintf
	b	$L120
$L165:
	li	$17,1
	b	$L121
$L164:
	li	$17,1
	b	$L116
$L163:
	lw	$3,0($16)
	move	$2,$28
	addu	$3,1
	lw	$7,%gprel(_impure_ptr)($2)
	sw	$3,0($16)
	lw	$4,12($7)
	la	$5,$LC3
	la	$6,$LC42
	jal	fprintf
	b	$L110
$L162:
	li	$17,1
	b	$L111
$L161:
	move	$4,$28
	lw	$5,%gprel(_impure_ptr)($4)
	lw	$6,0($16)
	#nop
	addu	$6,1
	sw	$6,0($16)
	la	$6,$LC41
	lw	$4,12($5)
	la	$5,$LC3
	jal	fprintf
	b	$L105
$L160:
	li	$17,1
	b	$L106
$L159:
	li	$17,1
	b	$L101
$L158:
	li	$17,1
	b	$L96
$L157:
	lw	$4,0($16)
	move	$17,$28
	addu	$4,1
	lw	$7,%gprel(_impure_ptr)($17)
	sw	$4,0($16)
	la	$5,$LC3
	lw	$4,12($7)
	la	$6,$LC38
	jal	fprintf
	b	$L90
$L156:
	li	$17,1
	b	$L91
$L155:
	move	$4,$28
	lw	$5,0($16)
	lw	$17,%gprel(_impure_ptr)($4)
	addu	$5,1
	la	$6,$LC37
	sw	$5,0($16)
	la	$5,$LC3
	lw	$4,12($17)
	jal	fprintf
	b	$L80
$L154:
	li	$17,1
	b	$L76
$L153:
	move	$5,$28
	lw	$3,0($16)
	lw	$17,%gprel(_impure_ptr)($5)
	addu	$3,1
	lw	$4,12($17)
	sw	$3,0($16)
	la	$6,$LC35
	la	$5,$LC3
	jal	fprintf
	b	$L70
$L152:
	li	$17,1
	b	$L71
$L151:
	lw	$16,$LC50
	b	$L2
$L150:
	li	$4,0
	jal	exit
	.end	main
	.align	2
$LC2:
	.ascii	"fp_add 1+1\000"
	.align	2
$LC3:
	.ascii	"Test failed: %s\n\000"
	.align	2
$LC5:
	.ascii	"fp_sub 3-2\000"
	.align	2
$LC7:
	.ascii	"fp_mul 2*3\000"
	.align	2
$LC9:
	.ascii	"fp_div 3/2\000"
	.align	2
$LC12:
	.ascii	"fp_neg 1\000"
	.align	2
$LC15:
	.ascii	"dp_add 1+1\000"
	.align	2
$LC17:
	.ascii	"dp_sub 3-2\000"
	.align	2
$LC19:
	.ascii	"dp_mul 2*3\000"
	.align	2
$LC20:
	.ascii	"dp_div 3/2\000"
	.align	2
$LC23:
	.ascii	"dp_neg 1\000"
	.align	2
$LC25:
	.ascii	"fp_to_dp 1.5\000"
	.align	2
$LC26:
	.ascii	"dp_to_fp 1.5\000"
	.align	2
$LC27:
	.ascii	"floatsisf 1\000"
	.align	2
$LC28:
	.ascii	"floatsidf 1\000"
	.align	2
$LC36:
	.ascii	"eqsf2 1==2\000"
	.align	2
$LC37:
	.ascii	"nesf2 1!=1\000"
	.align	2
$LC39:
	.ascii	"gtsf2 1>1\000"
	.align	2
$LC40:
	.ascii	"gtsf2 0>1\000"
	.align	2
$LC43:
	.ascii	"gesf2 0>=1\000"
	.align	2
$LC45:
	.ascii	"ltsf2 1<1\000"
	.align	2
$LC46:
	.ascii	"ltsf2 1<0\000"
	.align	2
$LC49:
	.ascii	"lesf2 1<=0\000"
	.align	2
$LC48:
	.ascii	"lesf2 1<=1\000"
	.align	2
$LC47:
	.ascii	"lesf2 1<=2\000"
	.align	2
$LC44:
	.ascii	"ltsf2 1<2\000"
	.align	2
$LC42:
	.ascii	"gesf2 1>=1\000"
	.align	2
$LC41:
	.ascii	"gesf2 2>=1\000"
	.align	2
$LC38:
	.ascii	"gtsf2 2>1\000"
	.align	2
$LC35:
	.ascii	"eqsf2 1==1\000"
	.align	2
$LC0:
	.word	0x3f800000		# 1 (float)
	.align	2
$LC1:
	.word	0x40000000		# 2 (float)
	.align	2
$LC4:
	.word	0x40400000		# 3 (float)
	.align	3
$LC8:
	.word	0x00000000		# 1.5
	.word	0x3ff80000
	.align	2
$LC10:
	.word	0x00000000		# 0 (float)
	.align	3
$LC13:
	.word	0x00000000		# 1
	.word	0x3ff00000
	.align	3
$LC14:
	.word	0x00000000		# 2
	.word	0x40000000
	.align	3
$LC16:
	.word	0x00000000		# 3
	.word	0x40080000
	.align	3
$LC21:
	.word	0x00000000		# 0
	.word	0x00000000
	.align	2
$LC50:
	.word	fail_count
	.align	2
	.globl	fp_add
	.ent	fp_add
fp_add:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fpadd
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fp_add
	.align	2
	.globl	fp_sub
	.ent	fp_sub
fp_sub:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fpsub
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fp_sub
	.align	2
	.globl	fp_mul
	.ent	fp_mul
fp_mul:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fpmul
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fp_mul
	.align	2
	.globl	fp_div
	.ent	fp_div
fp_div:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fpdiv
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fp_div
	.align	2
	.globl	fp_neg
	.ent	fp_neg
fp_neg:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	move	$5,$4
	sw	$31,16($sp)
	lw	$4,$LC51
	jal	fpsub
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fp_neg
	.align	2
$LC51:
	.word	0x00000000		# 0 (float)
	.align	2
	.globl	dp_add
	.ent	dp_add
dp_add:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dpadd
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	dp_add
	.align	2
	.globl	dp_sub
	.ent	dp_sub
dp_sub:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dpsub
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	dp_sub
	.align	2
	.globl	dp_mul
	.ent	dp_mul
dp_mul:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dpmul
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	dp_mul
	.align	2
	.globl	dp_div
	.ent	dp_div
dp_div:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dpdiv
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	dp_div
	.align	2
	.globl	dp_neg
	.ent	dp_neg
dp_neg:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	move	$7,$5
	addu	$sp,$sp,-24
	move	$6,$4
	sw	$31,16($sp)
	lw	$4,$LC52
	lw	$5,$LC52+4
	jal	dpsub
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	dp_neg
	.align	3
$LC52:
	.word	0x00000000		# 0
	.word	0x00000000
	.align	2
	.globl	fp_to_dp
	.ent	fp_to_dp
fp_to_dp:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fptodp
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	fp_to_dp
	.align	2
	.globl	dp_to_fp
	.ent	dp_to_fp
dp_to_fp:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dptofp
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	dp_to_fp
	.align	2
	.globl	eqsf2
	.ent	eqsf2
eqsf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	fpcmp
	beqz	$2,$L189
$L187:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L189:
	li	$16,1
	b	$L187
	.end	eqsf2
	.align	2
	.globl	nesf2
	.ent	nesf2
nesf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	fpcmp
	beqz	$2,$L191
	li	$16,1
$L191:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	nesf2
	.align	2
	.globl	gtsf2
	.ent	gtsf2
gtsf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	move	$2,$4
	sw	$16,16($sp)
	move	$4,$5
	sw	$31,20($sp)
	move	$5,$2
	li	$16,0
	jal	fpcmp
	slt	$2,0
	btnez	$L196
$L194:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L196:
	li	$16,1
	b	$L194
	.end	gtsf2
	.align	2
	.globl	gesf2
	.ent	gesf2
gesf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	move	$2,$4
	sw	$16,16($sp)
	move	$4,$5
	sw	$31,20($sp)
	move	$5,$2
	li	$16,0
	jal	fpcmp
	slt	$2,1
	btnez	$L200
$L198:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L200:
	li	$16,1
	b	$L198
	.end	gesf2
	.align	2
	.globl	ltsf2
	.ent	ltsf2
ltsf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	fpcmp
	slt	$2,0
	btnez	$L204
$L202:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L204:
	li	$16,1
	b	$L202
	.end	ltsf2
	.align	2
	.globl	lesf2
	.ent	lesf2
lesf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	fpcmp
	slt	$2,1
	btnez	$L208
$L206:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L208:
	li	$16,1
	b	$L206
	.end	lesf2
	.align	2
	.globl	eqdf2
	.ent	eqdf2
eqdf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	dpcmp
	beqz	$2,$L212
$L210:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L212:
	li	$16,1
	b	$L210
	.end	eqdf2
	.align	2
	.globl	nedf2
	.ent	nedf2
nedf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	dpcmp
	beqz	$2,$L214
	li	$16,1
$L214:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	nedf2
	.align	2
	.globl	gtdf2
	.ent	gtdf2
gtdf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	move	$3,$4
	move	$2,$5
	sw	$16,16($sp)
	move	$4,$6
	move	$5,$7
	sw	$31,20($sp)
	move	$6,$3
	move	$7,$2
	li	$16,0
	jal	dpcmp
	slt	$2,0
	btnez	$L219
$L217:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
$L219:
	li	$16,1
	b	$L217
	.end	gtdf2
	.align	2
	.globl	gedf2
	.ent	gedf2
gedf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	move	$3,$4
	move	$2,$5
	sw	$16,16($sp)
	move	$4,$6
	move	$5,$7
	sw	$31,20($sp)
	move	$6,$3
	move	$7,$2
	li	$16,0
	jal	dpcmp
	slt	$2,1
	btnez	$L223
$L221:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
$L223:
	li	$16,1
	b	$L221
	.end	gedf2
	.align	2
	.globl	ltdf2
	.ent	ltdf2
ltdf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	dpcmp
	slt	$2,0
	btnez	$L227
$L225:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L227:
	li	$16,1
	b	$L225
	.end	ltdf2
	.align	2
	.globl	ledf2
	.ent	ledf2
ledf2:
	.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, extra= 0
	.mask	0x80010000,-4
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$16,16($sp)
	sw	$31,20($sp)
	li	$16,0
	jal	dpcmp
	slt	$2,1
	btnez	$L231
$L229:
	move	$2,$16
	lw	$7,20($sp)
	lw	$16,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
$L231:
	li	$16,1
	b	$L229
	.end	ledf2
	.align	2
	.globl	floatsisf
	.ent	floatsisf
floatsisf:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	sitofp
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	floatsisf
	.align	2
	.globl	floatsidf
	.ent	floatsidf
floatsidf:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	litodp
	lw	$7,16($sp)
	#nop
	move	$4,$sp
	addu	$4,24
	move	$sp,$4
	j	$7
	.end	floatsidf
	.align	2
	.globl	fixsfsi
	.ent	fixsfsi
fixsfsi:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fptosi
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fixsfsi
	.align	2
	.globl	fixdfsi
	.ent	fixdfsi
fixdfsi:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dptoli
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fixdfsi
	.align	2
	.globl	fixunssfsi
	.ent	fixunssfsi
fixunssfsi:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	fptoui
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fixunssfsi
	.align	2
	.globl	fixunsdfsi
	.ent	fixunsdfsi
fixunsdfsi:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	addu	$sp,$sp,-24
	sw	$31,16($sp)
	jal	dptoul
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fixunsdfsi
	.align	2
	.globl	fail
	.ent	fail
fail:
	.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, extra= 0
	.mask	0x80000000,-8
	.fmask	0x00000000,0
	move	$5,$28
	addu	$sp,$sp,-24
	lw	$3,%gprel(_impure_ptr)($5)
	sw	$31,16($sp)
	move	$6,$4
	move	$4,$5
	addu	$4,%gprel(fail_count)
	lw	$7,0($4)
	#nop
	addu	$7,1
	sw	$7,0($4)
	lw	$4,12($3)
	la	$5,$LC3
	jal	fprintf
	lw	$7,16($sp)
	#nop
	move	$3,$sp
	addu	$3,24
	move	$sp,$3
	j	$7
	.end	fail

	.extern	_impure_ptr, 4

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]