When I try to force a particular instruction variant like this:
BITS 64
add qword [rax], dword 0x7FFFFFFF
I get a "mismatch in operand size error". While it is a mismatch, it is a perfectly valid instruction: ADD r/m64, imm32. If I remove the "dword" qualifier, it works and spits out this very instruction. But in my use case, I actually want to be able to specify a particular combination of operands. If this combination does not result in a valid instruction, I want nasm to fail, otherwise to succeed. Is it intentional that nasm will bail out with an error even though the specified instruction is valid?
I'd appreciate your help.