MIPS RDHWR instruction reordering
Ian Lance Taylor
iant@google.com
Fri Jul 21 18:51:00 GMT 2006
Atsushi Nemoto <anemo@mba.ocn.ne.jp> writes:
> And with r108713 I got:
>
> 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
>
> beq $4,$0,$L7
> .set push
> .set mips32r2
> rdhwr $3,$29
> .set pop
>
> lw $2,%gottprel(x)($28)
> nop
> addu $2,$2,$3
> lw $2,0($2)
> j $31
> nop
>
> $L7:
> j $31
> move $2,$0
>
> And I can not see why the commit make such a difference...
I also don't see why revision 108713 would affect this.
But I do note that this version is still bad. The rdhwr instruction
is in the branch delay slot, and is therefore always executed.
Ian
More information about the Gcc
mailing list