On 19 Jun 2006 16:45:43 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > I tried recreating this, but I couldn't. I get this: ... > This of course is not ideal, since it unconditionally executes the > rdhwr instruction. But it is not the same as what the OP reported.
I used stock gcc 4.1.1 to get the result: mips-linux-gcc -O2 -S foo.c If I used -O instead of -O2, I got similer (but not same) result: foo: .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 .mask 0x00000000,0 .fmask 0x00000000,0 .set noreorder .cpload $25 .set nomacro bne $4,$0,$L2 .set push .set mips32r2 rdhwr $3,$29 .set pop j $31 move $2,$0 $L2: lw $2,%gottprel(x)($28) nop addu $2,$2,$3 lw $2,0($2) j $31 nop JFYI. Should I file a bug report? --- Atsushi Nemoto