diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas index 8ae58bda0a..0a685601c3 100644 --- a/compiler/x86/aasmcpu.pas +++ b/compiler/x86/aasmcpu.pas @@ -1664,8 +1664,9 @@ implementation else begin { allow 2nd, 3rd or 4th operand being a constant and expect no size for shuf* etc. } - { further, allow AAD and AAM with imm. operand } + { further, allow ENTER, AAD and AAM with imm. operand } if (opsize=S_NO) and not((i in [1,2,3]) + or ((i=0) and (opcode in [A_ENTER])) {$ifndef x86_64} or ((i=0) and (opcode in [A_AAD,A_AAM])) {$endif x86_64} diff --git a/tests/test/tasm30.pp b/tests/test/tasm30.pp new file mode 100644 index 0000000000..c3e1a7c3a7 --- /dev/null +++ b/tests/test/tasm30.pp @@ -0,0 +1,10 @@ +{ %NORUN } +{ %CPU=i386,x86_64 } + +program tasm30; + +begin + asm + enter $5,$1234 + end; +end.