[Top] [All Lists]

Re: PATCH: Fix ll/sc for mips (take 3)

To: "H . J . Lu" <>
Subject: Re: PATCH: Fix ll/sc for mips (take 3)
From: "Maciej W. Rozycki" <>
Date: Wed, 6 Feb 2002 12:37:31 +0100 (MET)
Cc: Dominic Sweetman <>, GNU C Library <>,,
In-reply-to: <>
Organization: Technical University of Gdansk
On Tue, 5 Feb 2002, H . J . Lu wrote:

> 0xd724 <__pthread_alt_lock+212>:        ll      v1,0(s1)
> 0xd728 <__pthread_alt_lock+216>:        move    a1,zero
> 0xd72c <__pthread_alt_lock+220>:      bne v1,s0,0xd744 
> <__pthread_alt_lock+244>
> 0xd730 <__pthread_alt_lock+224>:        nop
> 0xd734 <__pthread_alt_lock+228>:        move    a1,v0
> 0xd738 <__pthread_alt_lock+232>:        sc      a1,0(s1)
> 0xd73c <__pthread_alt_lock+236>:      beqz        a1,0xd724 
> <__pthread_alt_lock+212>
> 0xd740 <__pthread_alt_lock+240>:        nop
> There is an extra "nop" in the delay slot. I don't think gas is smart
> enough to fill the delay slot. I will put back those ".set noredor".

 The code uses the same count of cycles either way.  As you may see above,
gas was smart enough to fill the "ll" load delay slot.  Maybe it should
prefer filling the branch delay slot instead due to smaller code... 

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>