[PATCH] Fix PR11784 - atomic __exchange_and_add() broken for ColdFire targets
Bernardo Innocenti
bernie@develer.com
Thu Aug 7 12:55:00 GMT 2003
Richard Henderson wrote:
> On Tue, Aug 05, 2003 at 04:27:33PM +0200, Bernardo Innocenti wrote:
>
>>No, absolutely not. ColdFire cores don't provide the immediate
>>addressing mode for the BSET instruction (probably because it
>>would make the opcode too long for the simplified execution unit).
>
> But immediate addressing is valid for _some_ instructions
> on ColdFire? If so, ok...
Actually, it's even more complex than this. BSET has two different
ways to specify the bit number, either as an immediate or as a data
register:
bset.sz #bit,<ea> [1]
bset.sz <dreg>,<ea> [2]
(sz: .b or .l, no .w!)
With syntax [1], the only allowed addressing modes
for the destination operand on the ColdFire are:
Dx
(Ax)
(Ax)+
-(Ax)
(d16,Ax)
With syntax [2], these additional addressing modes are
permitted:
(d8,Ax,Xi)
(xxx).w
(xxx).l
Unless the ColdFire reference manual is wrong, which is
quite possible. In a recent discussion with Peter Barada,
we found a place where Motorola's documentation was quite
incorrect.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Libstdc++
mailing list