From 8cc8a1d8367f87c722c44d7584303f90b22ee6d0 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 25 Feb 2012 11:11:42 -0800 Subject: 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 --- insns.h | 1 + 1 file changed, 1 insertion(+) (limited to 'insns.h') diff --git a/insns.h b/insns.h index 8cbf39b..8faf510 100644 --- a/insns.h +++ b/insns.h @@ -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 */ -- cgit v1.2.3