[PATCH] powerpc: emulate power5 popcntb instruction
Kumar Gala
galak at kernel.crashing.org
Sat Aug 19 05:30:07 EST 2006
On Aug 18, 2006, at 2:05 PM, Arnd Bergmann wrote:
> On Friday 18 August 2006 20:11, Will Schmidt wrote:
>> +#define INST_POPCNTB 0x7c0000f4
>> +
>
>> + /* Emulate the popcntb (Population Count Bytes)
>> instruction. */
>> + if ((instword & INST_POPCNTB) == INST_POPCNTB) {
>> + return emulate_popcntb_inst(regs, instword);
>> + }
>> +
>
> Is that the right check? The other similar traps check against a
> mask of 0x7c0007fe.
I agree with Arnd here, its better to check with a larger mask to
ensure that bits that should be '0' in the minor opcode are.
For example, if you had an instruction that was 0x7c0000f7 it would
match.
- kumar
More information about the Linuxppc-dev
mailing list