public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/6260: gcc 3.04 -O4 thumb bug
@ 2002-04-11 11:06 ted
0 siblings, 0 replies; only message in thread
From: ted @ 2002-04-11 11:06 UTC (permalink / raw)
To: gcc-gnats; +Cc: uhlik
>Number: 6260
>Category: target
>Synopsis: gcc 3.04 -O4 thumb bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Thu Apr 11 11:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ted Merrill, ArrayComm, Inc.
>Release: gcc 3.04
>Organization:
>Environment:
gcc 3.04 with previous patch from Richard Earnshaw
to fix a presumeably unrelated problem, running on
Solaris.
>Description:
Hi Richard
Thanks very much for your previous patch for 3.04 which fixed
the problem we were having.
Using 3.04 with that patch, my colleague Chris Uhlik
bravely compiled some code with the -O4 option and
found that previously working code entered an infinite loop.
Attached are his comments and attached are the files
(c input and assembler output).
He simplified the c code (from preprocessor output)
as much as possible but beyond a
certain point the problem goes away...
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="attach.txt"
Content-Disposition: inline; filename="attach.txt"
::::::::::::::
mail.txt
::::::::::::::
>From ted@arraycomm.com Thu Apr 11 10:58:27 2002
Date: Wed, 10 Apr 2002 15:05:55 -0700 (PDT)
From: Ted Merrill <ted@arraycomm.com>
To: rearnsha@arm.com, Richard.Earnshaw@arm.com
Cc: Ted Merrill <ted@arraycomm.com>, Chris Uhlik <uhlik@arraycomm.com>
Subject: gcc 3.04 -O4 thumb bug
Hi Richard
Thanks very much for your previous patch for 3.04 which fixed
the problem we were having.
Using 3.04 with that patch, my colleague Chris Uhlik
bravely compiled some code with the -O4 option and
found that previously working code entered an infinite loop.
Below are his comments and attached are the files
(c input and assembler output).
He simplified the c code (from preprocessor output)
as much as possible but beyond a
certain point the problem goes away...
Do you want to attempt a patch for this?
If you prefer, i can submit this through the regular channels
(instead?).
Thanks
-Ted Merrill
ArrayComm, Inc.
---------- Forwarded message ----------
Date: Tue, 9 Apr 2002 13:53:36 -0700
From: Chris Uhlik <uhlik@arraycomm.com>
To: ted@arraycomm.com
Subject: bug report
Even careful transformations of constant folding seem
to change the output, so I haven't done things like replace
"sizeof(unsigned long)" with 4.
compile with
thumb_cc -Wall -O4 -S bug1.c -o bug1.s
[NOTE to Richard: thumb_cc is simply gcc 3.04 w/ your previous patch, configured
for arm, and with -mthumb forced on. -Ted]
Chris
extern void logF(char *,int,char *);
extern void BSInitZero(unsigned long *,int);
extern void BSCopy(unsigned long *,unsigned long *);
void ecc233Invert(
const unsigned long *a,
unsigned long *b)
{
unsigned long c[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
unsigned long u[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
unsigned long v[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
int u_msbIdx = 233;
int v_msbIdx = 233;
unsigned long xv, yv, xc, yc;
int i, j, nWords;
unsigned long *uu, *vv, *bb, *cc;
int u_is_u = 1;
if ( ((a)[0]) != 233 || ((b)[0]) != 233 ) {
logF("c", -1, "ecc233Invert: streams not 233 bits long\n");
return;
}
for ( i = 1 ; i < (233+31)/(8*sizeof(unsigned long)) ; i++ )
if ( a[i] )
goto non_zero;
if ( a[(233+31)/(8*sizeof(unsigned long))] & ((1<<(233%(8*sizeof(unsigned long))))-1) )
goto non_zero;
logF("c", -1, "ecc233Invert: input must be non-zero\n");
return;
non_zero:
BSInitZero(b,234); /* temporarily 234, but 233 in the end */
b[1] = 1;
BSInitZero(c,234);
for ( i = 0 ; i < (1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long))) ; i++ ) u[i] = a[i];
BSInitZero(v,234);
{ long __l = (0)/(8*sizeof(unsigned long))+1; long __k = (0)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
{ long __l = (74)/(8*sizeof(unsigned long))+1; long __k = (74)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
{ long __l = (233)/(8*sizeof(unsigned long))+1; long __k = (233)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
while ( 1 ) {
if ( u_is_u ) {
for ( ; (((u)[(u_msbIdx)/(8*sizeof(unsigned long))+1]>>((u_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; u_msbIdx-- ) ;
if ( u_msbIdx == 0 ) {
/* answer is in b */
break;
}
for ( ; (((v)[(v_msbIdx)/(8*sizeof(unsigned long))+1]>>((v_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; v_msbIdx-- ) ;
j = u_msbIdx - v_msbIdx;
if ( j < 0 ) {
u_is_u = 0;
j = -j;
}
} else {
for ( ; (((v)[(v_msbIdx)/(8*sizeof(unsigned long))+1]>>((v_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; v_msbIdx-- ) ;
if ( v_msbIdx == 0 ) {
BSCopy(c,b);
break;
}
for ( ; (((u)[(u_msbIdx)/(8*sizeof(unsigned long))+1]>>((u_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; u_msbIdx-- ) ;
j = v_msbIdx - u_msbIdx;
if ( j < 0 ) {
u_is_u = 1;
j = -j;
}
}
if ( u_is_u ) {
uu = u + 1;
vv = v + 1;
bb = b + 1;
cc = c + 1;
} else {
uu = v + 1;
vv = u + 1;
bb = c + 1;
cc = b + 1;
}
nWords = 8;
uu += j >> 5;
bb += j >> 5;
nWords -= j >> 5;
j &= 31;
/* u = u + x^j v */
/* b = b + x^j c */
if ( j ) {
for ( yc = yv = 0 , i = 0 ; i < nWords ; i++ ) {
xv = *vv++;
xc = *cc++;
*uu++ ^= (xv << j) | (yv >> ((8*sizeof(unsigned long)) - j));
*bb++ ^= (xc << j) | (yc >> ((8*sizeof(unsigned long)) - j));
yv = xv;
yc = xc;
}
} else {
/* special case for j == 0 because C cannot specify 32bit shifts */
for ( yc = yv = 0 , i = 0 ; i < nWords ; i++ ) {
asm("; bug near here");
xv = *vv++;
xc = *cc++;
*uu++ ^= xv;
*bb++ ^= xc;
yv = xv;
yc = xc;
}
}
}
((b)[0]) = 233;
if ( (((b)[(233)/(8*sizeof(unsigned long))+1]>>((233)%(8*sizeof(unsigned long))))&1LU) ) {
logF("c", -1, "ecc233Invert: output order exceeds 232\n");
}
}
/*
Code produced for the final loop
thumb_cc -Wall -O4 -S bug1.c -o bug1.s
mov r2, #8
mov ip, r2
asr r5, r1, #5
mov r3, ip
mov r2, #31
lsl r4, r5, #2
sub r3, r3, r5 nWords -= j >> 5
and r1, r1, r2 j &= 31
add r7, r7, r4 uu += j >> 5
add r0, r0, r4 bb += j >> 5
mov r9, r3 r9 is nWords (loop terminal value)
cmp r1, #0 if ( j )
bne .L79
mov r5, #0
cmp r5, r9 i < nWords ?
bge .L66 no, skip loop alltogether
.L65:
; bug near here
.code 16
ldr r6, [sp, #16] vv is r6
ldmia r6!, {r1} xv(aka r1) = *vv++
mov r1, r6 ; immediately overwrites r1, oops! ***
str r1, [sp, #16]
ldr r3, [sp, #12]
ldmia r3!, {r6} xc(aka r6) = *cc++
mov r2, r3
str r2, [sp, #12]
ldr r2, [r7]
eor r2, r2, r1 r2 ^= xv(aka r1)
stmia r7!, {r2} *uu++ = r2
ldr r1, [r0] r1 = *bb
add r5, r5, #1 i++
eor r1, r1, r6 r1 ^= xc(aka r6)
stmia r0!, {r1} *bb++ = r1
cmp r5, r9 i < nWords ?
blt .L65 yes, go round again
b .L66
*** It looks like, in his haste to put r6 back onto the stack,
he overwrote r1 which he had just loaded...
*/
[ Part 2, "bug1.c" Text/PLAIN (Name: "bug1.c") 134 lines. ]
[ Unable to print this part. ]
[ Part 3, "bug1.s" Text/PLAIN (Name: "bug1.s") 146 lines. ]
[ Unable to print this part. ]
::::::::::::::
bug1.c
::::::::::::::
extern void logF(char *,int,char *);
extern void BSInitZero(unsigned long *,int);
extern void BSCopy(unsigned long *,unsigned long *);
void ecc233Invert(
const unsigned long *a,
unsigned long *b)
{
unsigned long c[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
unsigned long u[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
unsigned long v[(1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long)))];
int u_msbIdx = 233;
int v_msbIdx = 233;
unsigned long xv, yv, xc, yc;
int i, j, nWords;
unsigned long *uu, *vv, *bb, *cc;
int u_is_u = 1;
if ( ((a)[0]) != 233 || ((b)[0]) != 233 ) {
logF("c", -1, "ecc233Invert: streams not 233 bits long\n");
return;
}
for ( i = 1 ; i < (233+31)/(8*sizeof(unsigned long)) ; i++ )
if ( a[i] )
goto non_zero;
if ( a[(233+31)/(8*sizeof(unsigned long))] & ((1<<(233%(8*sizeof(unsigned long))))-1) )
goto non_zero;
logF("c", -1, "ecc233Invert: input must be non-zero\n");
return;
non_zero:
BSInitZero(b,234); /* temporarily 234, but 233 in the end */
b[1] = 1;
BSInitZero(c,234);
for ( i = 0 ; i < (1 + ((234) + (8*sizeof(unsigned long)) - 1) / (8*sizeof(unsigned long))) ; i++ ) u[i] = a[i];
BSInitZero(v,234);
{ long __l = (0)/(8*sizeof(unsigned long))+1; long __k = (0)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
{ long __l = (74)/(8*sizeof(unsigned long))+1; long __k = (74)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
{ long __l = (233)/(8*sizeof(unsigned long))+1; long __k = (233)%(8*sizeof(unsigned long)); if ( 1 ) { (v)[__l] |= (1LU<<__k); } else { (v)[__l] &= ~(1LU<<__k); }};
while ( 1 ) {
if ( u_is_u ) {
for ( ; (((u)[(u_msbIdx)/(8*sizeof(unsigned long))+1]>>((u_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; u_msbIdx-- ) ;
if ( u_msbIdx == 0 ) {
/* answer is in b */
break;
}
for ( ; (((v)[(v_msbIdx)/(8*sizeof(unsigned long))+1]>>((v_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; v_msbIdx-- ) ;
j = u_msbIdx - v_msbIdx;
if ( j < 0 ) {
u_is_u = 0;
j = -j;
}
} else {
for ( ; (((v)[(v_msbIdx)/(8*sizeof(unsigned long))+1]>>((v_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; v_msbIdx-- ) ;
if ( v_msbIdx == 0 ) {
BSCopy(c,b);
break;
}
for ( ; (((u)[(u_msbIdx)/(8*sizeof(unsigned long))+1]>>((u_msbIdx)%(8*sizeof(unsigned long))))&1LU) == 0 ; u_msbIdx-- ) ;
j = v_msbIdx - u_msbIdx;
if ( j < 0 ) {
u_is_u = 1;
j = -j;
}
}
if ( u_is_u ) {
uu = u + 1;
vv = v + 1;
bb = b + 1;
cc = c + 1;
} else {
uu = v + 1;
vv = u + 1;
bb = c + 1;
cc = b + 1;
}
nWords = 8;
uu += j >> 5;
bb += j >> 5;
nWords -= j >> 5;
j &= 31;
/* u = u + x^j v */
/* b = b + x^j c */
if ( j ) {
for ( yc = yv = 0 , i = 0 ; i < nWords ; i++ ) {
xv = *vv++;
xc = *cc++;
*uu++ ^= (xv << j) | (yv >> ((8*sizeof(unsigned long)) - j));
*bb++ ^= (xc << j) | (yc >> ((8*sizeof(unsigned long)) - j));
yv = xv;
yc = xc;
}
} else {
/* special case for j == 0 because C cannot specify 32bit shifts */
for ( yc = yv = 0 , i = 0 ; i < nWords ; i++ ) {
asm("; bug near here");
xv = *vv++;
xc = *cc++;
*uu++ ^= xv;
*bb++ ^= xc;
yv = xv;
yc = xc;
}
}
}
((b)[0]) = 233;
if ( (((b)[(233)/(8*sizeof(unsigned long))+1]>>((233)%(8*sizeof(unsigned long))))&1LU) ) {
logF("c", -1, "ecc233Invert: output order exceeds 232\n");
}
}
/*
Code produced for the final loop
thumb_cc -Wall -O4 -S bug1.c -o bug1.s
mov r2, #8
mov ip, r2
asr r5, r1, #5
mov r3, ip
mov r2, #31
lsl r4, r5, #2
sub r3, r3, r5 nWords -= j >> 5
and r1, r1, r2 j &= 31
add r7, r7, r4 uu += j >> 5
add r0, r0, r4 bb += j >> 5
mov r9, r3 r9 is nWords (loop terminal value)
cmp r1, #0 if ( j )
bne .L79
mov r5, #0
cmp r5, r9 i < nWords ?
bge .L66 no, skip loop alltogether
.L65:
; bug near here
.code 16
ldr r6, [sp, #16] vv is r6
ldmia r6!, {r1} xv(aka r1) = *vv++
mov r1, r6 ; immediately overwrites r1, oops! ***
str r1, [sp, #16]
ldr r3, [sp, #12]
ldmia r3!, {r6} xc(aka r6) = *cc++
mov r2, r3
str r2, [sp, #12]
ldr r2, [r7]
eor r2, r2, r1 r2 ^= xv(aka r1)
stmia r7!, {r2} *uu++ = r2
ldr r1, [r0] r1 = *bb
add r5, r5, #1 i++
eor r1, r1, r6 r1 ^= xc(aka r6)
stmia r0!, {r1} *bb++ = r1
cmp r5, r9 i < nWords ?
blt .L65 yes, go round again
b .L66
*** It looks like, in his haste to put r6 back onto the stack,
he overwrote r1 which he had just loaded...
# thumb_cc -v
Reading specs from /s/wdsl/i/bin.sun5/arm.gcc/specs
Configured with: /s/home/ted/tool.gcc/i/include/gcc-3.0.4/configure --host=sparc-sun-solaris2.5.1 --prefix=/s/home/ted/_tool/_gccarm/junk.i/sun5-arm --srcdir=/s/home/ted/tool.gcc/i/include/gcc-3.0.4 --target=arm-ecos-elf --enable-languages=c --with-headers=/s/home/ted/_tool/_gccarm/oo/include/arm.usr.include --with-libs=/s/home/ted/_tool/_gccarm/oo/lib.arm/arm.usr.lib : (reconfigured) /s/home/ted/tool.gcc/i/include/gcc-3.0.4/configure --host=sparc-sun-solaris2.5.1 --prefix=/s/home/ted/_tool/_gccarm/junk.i/sun5-arm --srcdir=/s/home/ted/tool.gcc/i/include/gcc-3.0.4 --target=arm-ecos-elf --enable-languages=c --with-headers=/s/home/ted/_tool/_gccarm/oo/include/arm.usr.include --with-libs=/s/home/ted/_tool/_gccarm/oo/lib.arm/arm.usr.lib
Thread model: single
gcc version 3.0.4
*/
::::::::::::::
bug1.s
::::::::::::::
@ Generated by gcc 3.0.4 for ARM/elf
.file "bug1.c"
.code 16
.section .rodata
.align 2
.LC0:
.ascii "c\000"
.align 2
.LC2:
.ascii "ecc233Invert: streams not 233 bits long\n\000"
.align 2
.LC6:
.ascii "ecc233Invert: output order exceeds 232\n\000"
.align 2
.LC4:
.ascii "ecc233Invert: input must be non-zero\n\000"
.text
.align 2
.global ecc233Invert
.thumb_func
.type ecc233Invert,function
ecc233Invert:
push {r4, r5, r6, r7, lr}
mov r7, fp
mov r6, sl
mov r5, r9
mov r4, r8
push {r4, r5, r6, r7}
sub sp, sp, #132
mov r4, r0
mov r0, #1
str r1, [sp, #20]
str r0, [sp, #8]
ldr r0, [r4]
mov r1, #233
mov sl, r1
mov r8, r1
cmp r0, #233
beq .L74
.L3:
mov r2, #1
neg r1, r2
ldr r0, .L83
ldr r2, .L83+4
.L82:
bl logF
.L1:
add sp, sp, #132
pop {r3, r4, r5, r6}
mov r8, r3
mov r9, r4
mov sl, r5
mov fp, r6
pop {r4, r5, r6, r7, pc}
.L74:
ldr r3, [sp, #20]
ldr r2, [r3]
cmp r2, #233
bne .L3
mov r5, #1
.L4:
cmp r5, #7
bhi .LCB46
b .L10 @long jump
.LCB46:
ldr r1, [r4, #32]
ldr r3, .L83+8
and r1, r1, r3
cmp r1, #0
bne .LCB52
b .L75 @long jump
.LCB52:
.L9:
ldr r0, [sp, #20]
mov r1, #234
bl BSInitZero
ldr r2, [sp, #20]
add r5, sp, #96
mov r1, #1
str r1, [r2, #4]
mov r0, r5
mov r1, #234
bl BSInitZero
add r0, sp, #60
mov r5, #0
mov r1, r0
mov r2, #0
.L16:
ldr r0, [r2, r4]
add r5, r5, #1
str r0, [r2, r1]
add r2, r2, #4
cmp r5, #8
bls .L16
add r3, sp, #24
mov r0, r3
mov r1, #234
bl BSInitZero
ldr r1, [sp, #28]
mov r0, #1
orr r1, r1, r0
ldr r2, [sp, #36]
str r1, [sp, #28]
ldr r1, [sp, #56]
lsl r4, r0, #10
lsl r3, r0, #9
orr r2, r2, r4
orr r1, r1, r3
add r4, sp, #60
str r2, [sp, #36]
str r1, [sp, #56]
str r4, [sp, #4]
.L66:
ldr r0, [sp, #8]
cmp r0, #0
bne .LCB115
b .L26 @long jump
.LCB115:
mov r4, sl
lsr r1, r4, #5
mov r2, sl
mov r4, #31
and r2, r2, r4
lsl r3, r1, #2
ldr r4, [sp, #4]
add r3, r3, #4
ldr r0, [r4, r3]
lsr r0, r0, r2
mov r2, #1
and r0, r0, r2
cmp r0, #0
bne .LCB129
b .L76 @long jump
.LCB129:
.L69:
mov r3, sl
cmp r3, #0
bne .LCB133
b .L24 @long jump
.LCB133:
mov r4, r8
lsr r1, r4, #5
lsl r0, r1, #2
mov r4, #31
mov r2, r8
and r2, r2, r4
add r0, r0, #4
add r4, sp, #24
ldr r7, [r4, r0]
mov r5, #1
lsr r7, r7, r2
and r7, r7, r5
cmp r7, #0
beq .L77
.L70:
mov r3, sl
mov r4, r8
sub r1, r3, r4
cmp r1, #0
blt .L78
.L39:
ldr r4, [sp, #8]
cmp r4, #0
beq .L52
ldr r0, [sp, #20]
mov r4, sp
mov r2, sp
add r4, r4, #28
add r2, r2, #100
add r7, sp, #64
add r0, r0, #4
str r4, [sp, #16]
str r2, [sp, #12]
.L53:
mov r2, #8
mov ip, r2
asr r5, r1, #5
mov r3, ip
mov r2, #31
lsl r4, r5, #2
sub r3, r3, r5
and r1, r1, r2
add r7, r7, r4
add r0, r0, r4
mov r9, r3
cmp r1, #0
bne .L79
mov r5, #0
cmp r5, r9
bge .L66
.L65:
; bug near here
.code 16
ldr r6, [sp, #16]
ldmia r6!, {r1}
mov r1, r6
str r1, [sp, #16]
ldr r3, [sp, #12]
ldmia r3!, {r6}
mov r2, r3
str r2, [sp, #12]
ldr r2, [r7]
eor r2, r2, r1
stmia r7!, {r2}
ldr r1, [r0]
add r5, r5, #1
eor r1, r1, r6
stmia r0!, {r1}
cmp r5, r9
blt .L65
b .L66
.L79:
mov r2, #0
mov r5, #0
mov ip, r2
mov fp, r2
cmp r5, r9
bge .L66
mov r6, #32
sub r3, r6, r1
mov lr, r3
.L59:
ldr r2, [sp, #16]
ldmia r2!, {r4}
mov r6, r2
str r4, [sp]
ldr r2, [sp, #12]
str r6, [sp, #16]
ldmia r2!, {r6}
mov r4, r2
ldr r2, [sp]
str r4, [sp, #12]
mov r3, lr
mov r4, ip
lsr r4, r4, r3
lsl r2, r2, r1
orr r2, r2, r4
ldr r4, [r7]
eor r4, r4, r2
stmia r7!, {r4}
mov r2, r6
mov r4, fp
lsr r4, r4, r3
lsl r2, r2, r1
orr r2, r2, r4
ldr r4, [r0]
eor r4, r4, r2
stmia r0!, {r4}
ldr r4, [sp]
add r5, r5, #1
mov ip, r4
mov fp, r6
cmp r5, r9
blt .L59
b .L66
.L52:
mov r3, sp
add r3, r3, #64
str r3, [sp, #16]
ldr r3, [sp, #20]
add r3, r3, #4
str r3, [sp, #12]
add r7, sp, #28
add r0, sp, #100
b .L53
.L78:
mov r0, #0
neg r1, r1
str r0, [sp, #8]
b .L39
.L77:
mov r1, r4
mov r0, #1
mov r4, #31
.L35:
mov r5, #1
neg r3, r5
add r8, r8, r3
mov r2, r8
lsr r7, r2, #5
lsl r5, r7, #2
add r5, r5, #4
ldr r7, [r1, r5]
and r2, r2, r4
lsr r7, r7, r2
and r7, r7, r0
cmp r7, #0
bne .L70
b .L35
.L24:
ldr r0, [sp, #20]
ldr r2, [r0, #32]
mov r1, #233
str r1, [r0]
lsr r0, r2, #9
mov r1, #1
and r0, r0, r1
cmp r0, #0
bne .LCB330
b .L1 @long jump
.LCB330:
mov r3, #1
ldr r0, .L83
neg r1, r3
ldr r2, .L83+12
bl logF
b .L1
.L76:
add r3, sp, #60
mov r1, r3
mov r4, #31
mov r0, #1
.L29:
mov r3, #1
neg r2, r3
add sl, sl, r2
mov r2, sl
lsr r3, r2, #5
lsl r3, r3, #2
add r3, r3, #4
ldr r3, [r1, r3]
and r2, r2, r4
lsr r3, r3, r2
and r3, r3, r0
cmp r3, #0
beq .LCB367
b .L69 @long jump
.LCB367:
b .L29
.L26:
mov r4, r8
lsr r1, r4, #5
lsl r3, r1, #2
mov r4, #31
mov r2, r8
and r2, r2, r4
add r3, r3, #4
add r4, sp, #24
ldr r0, [r4, r3]
lsr r0, r0, r2
mov r2, #1
and r0, r0, r2
cmp r0, #0
beq .L80
.L71:
mov r3, r8
cmp r3, #0
beq .L73
mov r4, sl
lsr r2, r4, #5
lsl r0, r2, #2
ldr r1, [sp, #4]
add r0, r0, #4
mov r2, sl
mov r4, #31
ldr r7, [r1, r0]
and r2, r2, r4
lsr r7, r7, r2
mov r5, #1
and r7, r7, r5
cmp r7, #0
beq .L81
.L72:
mov r3, r8
mov r4, sl
sub r1, r3, r4
cmp r1, #0
blt .LCB410
b .L39 @long jump
.LCB410:
mov r0, #1
str r0, [sp, #8]
neg r1, r1
b .L39
.L81:
add r3, sp, #60
mov r1, r3
mov r4, #31
mov r0, #1
.L48:
mov r5, #1
neg r2, r5
add sl, sl, r2
mov r2, sl
lsr r7, r2, #5
lsl r5, r7, #2
add r5, r5, #4
ldr r7, [r1, r5]
and r2, r2, r4
lsr r7, r7, r2
and r7, r7, r0
cmp r7, #0
bne .L72
b .L48
.L73:
add r1, sp, #96
mov r0, r1
ldr r1, [sp, #20]
bl BSCopy
b .L24
.L80:
mov r1, r4
mov r0, #1
mov r4, #31
.L42:
mov r2, #1
neg r3, r2
add r8, r8, r3
mov r2, r8
lsr r3, r2, #5
lsl r3, r3, #2
add r3, r3, #4
ldr r3, [r1, r3]
and r2, r2, r4
lsr r3, r3, r2
and r3, r3, r0
cmp r3, #0
bne .L71
b .L42
.L75:
mov r2, #1
neg r1, r2
ldr r0, .L83
ldr r2, .L83+16
b .L82
.L10:
lsl r0, r5, #2
ldr r1, [r0, r4]
cmp r1, #0
beq .LCB494
b .L9 @long jump
.LCB494:
add r5, r5, #1
b .L4
.L84:
.align 2
.L83:
.word .LC0
.word .LC2
.word 511
.word .LC6
.word .LC4
.Lfe1:
.size ecc233Invert,.Lfe1-ecc233Invert
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-11 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 11:06 target/6260: gcc 3.04 -O4 thumb bug ted
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).