This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: VIA PadLock support
On Thu, Mar 11, 2004 at 06:05:07PM +0100, Michal Ludvig wrote:
> * gas/config/tc-i386.c (output_insn): Handle PadLock instructions.
> * gas/config/tc-i386.h (CpuPadLock): New define.
> (CpuUnknownFlags): Added CpuPadLock.
> * include/opcode/i386.h (i386_optab): Added xstore/xcrypt insns.
> * opcodes/i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines.
> (dis386_twobyte): Opcode 0xa7 is PADLOCK_0.
> (padlock_table): New struct with PadLock instructions.
> (print_insn): Handle PADLOCK_SPECIAL.
OK, with one or two more formatting/style fixes. OK for 2.15 branch
too.
> + if ((i.tm.cpu_flags & CpuPadLock) && (i.tm.base_opcode & 0xff000000))
Style in binutils is generally to write explicit comparisons against
zero for non-boolean values. We aren't 100% consistent on this,
especially when extracting one bit as you're doing with i.tm.cpu_flags.
if ((i.tm.cpu_flags & CpuPadLock) != 0
&& (i.tm.base_opcode & 0xff000000) != 0)
Please fix this elsewhere too.
> + if (prefix != REPE_PREFIX_OPCODE ||
> + i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
Formatting. No trailing operators.
if (prefix != REPE_PREFIX_OPCODE
|| i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
--
Alan Modra
IBM OzLabs - Linux Technology Centre