Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Nobuyuki Hikichi
Fri, 17 Apr 1992 07:42
gcc 2.1 bug? -mips2 -mcpu=r6000 with -O2
Author: Nobuyuki Hikichi
Date: Fri, 17 Apr 1992 07:42
Date: Fri, 17 Apr 1992 07:42
88 lines
2194 bytes
2194 bytes
I think code sequence from (A) to (B) in following script are
incorrect.
Name: Nobuyuki Hikichi <hikichi@sra.co.jp>
Office: Software Research Associates, Inc. Japan.
.........................start of script...............................
#
# Original gcc
#
gnu@srarc2 $ cat ~gnu/src/gcc-2.1/config.status
#!/bin/sh
# GCC was configured as follows:
./configure mips-mips-bsd
gnu@srarc2 $ gcc -mcpu=r6000 -mips2 -c x.c -DTIME -c -O
as1: Warning: x.c, line 5: nop required # warning.!!
0x44900000 mtc1 $16,$f0
0x46800020 cvt.s.w $f0,$f0
gnu@srarc2 $ cat x.c
long User_Time;
float Dhrystones_Per_Second;
main ()
{
int Number_Of_Runs;
if (User_Time < 120 )
{
printf ("\n");
}
else
{
Dhrystones_Per_Second = ((float) 60 * (float) Number_Of_Runs)
/ (float) User_Time;
}
}
gnu@srarc2 $ gcc -B./ -mcpu=r6000 -mips2 -c x.c -DTIME -S -O
gnu@srarc2 $ ed x.s
967
/mtc1/
mtc1 $16,$f0
20,$p
.comm User_Time,8
.comm Dhrystones_Per_Second,8
.text
.loc 1 5
.ent main
main:
subu $sp,$sp,32 # vars= 0, regs= 2/0, args = 16, extra= 8
.frame $sp,32,$31
.mask 0x80010000,-12
.fmask 0x00000000,0
sw $31,20($sp)
sw $16,16($sp)
jal __main
lw $2,User_Time
#nop
.set noreorder
bgtl $2,119,$L2
.set nomacro
mtc1 $16,$f0 # (A)
cvt.s.w $f0,$f0 # (B)
.set macro
.set reorder
la $4,$LC0
jal printf
j $L3
$L2:
li.s $f2,6.00000000000000000000e+01
#nop
mul.s $f0,$f0,$f2
lw $2,User_Time
#nop
mtc1 $2,$f2
cvt.s.w $f2,$f2
div.s $f0,$f0,$f2
s.s $f0,Dhrystones_Per_Second
$L3:
lw $31,20($sp)
lw $16,16($sp)
addu $sp,$sp,32
j $31
.end main
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads