This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS RDHWR instruction reordering
- From: Ian Lance Taylor <iant at google dot com>
- To: Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- Cc: dan at debian dot org, gcc at gcc dot gnu dot org
- Date: 21 Jul 2006 10:06:34 -0700
- Subject: Re: MIPS RDHWR instruction reordering
- References: <m3irn0reiq.fsf@dhcp-172-18-208-87.corp.google.com> <20060619223456.GA27012@nevyn.them.org> <m3u06gwvyw.fsf@keats.corp.google.com> <20060722.015358.128618575.anemo@mba.ocn.ne.jp>
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