diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-02-25 11:11:42 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-25 11:11:42 -0800 |
commit | 8cc8a1d8367f87c722c44d7584303f90b22ee6d0 (patch) | |
tree | eea7f8ea919c7b9ed557df124334ddca6a988982 /insns.h | |
parent | 8ea220041503fb48876b0af35934740fe2613ec2 (diff) | |
download | nasm-8cc8a1d8367f87c722c44d7584303f90b22ee6d0.tar.gz nasm-8cc8a1d8367f87c722c44d7584303f90b22ee6d0.tar.bz2 nasm-8cc8a1d8367f87c722c44d7584303f90b22ee6d0.zip |
Add support for warning on invalid LOCK prefixes
Add an LOCK flag to the instruction template, and make the presence of
a LOCK prefix trigger a warning if it is not set. Simplify the LOCK
and HLE logic by hard-coding the knowledge that operand 0 has to be
memory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'insns.h')
-rw-r--r-- | insns.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -95,6 +95,7 @@ extern const uint8_t nasm_bytecodes[]; #define IF_PRIV 0x00000000UL /* it's a privileged instruction */ #define IF_SMM 0x00000000UL /* it's only valid in SMM */ #define IF_PROT 0x00000000UL /* it's protected mode only */ +#define IF_LOCK 0x00000400UL /* lockable if operand 0 is memory */ #define IF_NOLONG 0x00000800UL /* it's not available in long mode */ #define IF_UNDOC 0x00001000UL /* it's an undocumented instruction */ #define IF_FPU 0x00002000UL /* it's an FPU instruction */ |