2

I'm reading Intel's software developers manual.

It has this to say about the parity flag:

Set if the least-signif icant byte of the result contains an even number of 1 bits; cleared otherwise.

I'd like to know whether or not SIMD (specifically SSE) instructions affect the parity flag. For example, if I use the PEXTRB instruction, will that set the parity flag?

Venemo
  • 18,515
  • 13
  • 84
  • 125

2 Answers2

4

The entry for PEXTRB says

Flags Affected
None.

So no.

In general only the main ALU group (and/or/add etc, that set) and shift/rotate set parity to whatever the parity is (there are some more). Moves generally don't affect flags. SSE instructions generally don't affect flags, with some obvious exceptions. COMISS and friends affect parity, but in a completely different way.

If you want the parity of a pextrbed byte, you can just test it.

harold
  • 61,398
  • 6
  • 86
  • 164
1

According to "Intel 64 and IA-32 Architectures Software Developer’s Manual vol 2" which is easily downloadable from the intertubes:

Flags Affected
None.
stark
  • 12,615
  • 3
  • 33
  • 50