[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <570B0F54.7060201@gmail.com>
Date: Mon, 11 Apr 2016 10:43:32 +0800
From: Zeng Zhaoxiu <zhaoxiu.zeng@...il.com>
To: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
Borislav Petkov <bp@...e.de>
Cc: zengzhaoxiu@....com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, dvlasenk@...hat.com, akpm@...ux-foundation.org,
dvyukov@...gle.com, keescook@...omium.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions
在 2016年04月06日 18:37, One Thousand Gnomes 写道:
> Even that would still be wrong for the smaller parity values. The CPU
> supports 8bit parity directly going back to the 8086 so the
> implementation for 8bit and I think 16bit is still wrong.
>
> Alan
I don't know where the errors. X86 is new to me.
The definition of the parity flag on x86 from Wikipedia:
In x86 processors, the parity flag reflects the parity only of the least significant
byte of the result, and is set if the number of set bits of ones is even. According to
80386 Intel manual, the parity flag is changed in the x86 processor family by the
following instructions:
All arithmetic instructions;
Compare instruction (equivalent to a subtract instruction without storing the result);
Logical instructions - XOR, AND, OR;
the TEST instruction (equivalent to the AND instruction without storing the result).
the POPF instruction
Powered by blists - more mailing lists