binutils patch

Daniel Egger egger@suse.de
Fri Aug 17 06:09:00 GMT 2001


Am 17 Aug 2001 13:19:09 +0200 schrieb Andreas Schwab:

> I think you want an XT macro that lets you specify the T bit in the
> opcode:

I had this one before but it seems I did something wrong because it also
didn't work.
 
> #define XT(op, xop, t) (X (op, xop) | (((unsigned long)(t) & 1) << 25))
> #define T_MASK ((unsigned long)1 << 25)
> #define XT_MASK (X_MASK | T_MASK)
> 
> { "dss",     XT(31,822,0), XT_MASK,	PPCVEC,		{ STRM } },
> { "dssall",  XT(31,822,1), XT_MASK,	PPCVEC,		{ STRM } },
> { "dst",     XT(31,342,0), XT_MASK,	PPCVEC,		{ RA, RB, STRM } },
> { "dstt",    XT(31,342,1), XT_MASK,	PPCVEC,		{ RA, RB, STRM } },
> { "dstst",   XT(31,374,0), XT_MASK,	PPCVEC,		{ RA, RB, STRM } },
> { "dststt",  XT(31,374,1), XT_MASK,	PPCVEC,		{ RA, RB, STRM } },

Actually the XT_MASK is bogus because this is a valid X form opcode,
it's just that I didn't understand what the macros really do. After
hacking in a similar version of your suggestion the code worked
correctly:
     fe8:       7e 04 02 ec     dstst   r4,r0,0
     fec:       3d 20 01 08     lis     r9,264
     ff0:       61 29 00 10     ori     r9,r9,16
     ff4:       7c 23 4a ac     dst     r3,r9,1

I'm attaching a cleanup version of the patch, can this one please be
considered for inclusion into the official binutils? I'll also prepare
a patch for SuSE.

Servus,
       Daniel



More information about the Binutils mailing list