diff --git a/third_party/x86inc/x86inc.asm b/third_party/x86inc/x86inc.asm
index 81f231187f7488d76afa590bf9b9e5e2d3d140a6..a66a96bba6273fedb4410360c3acd9abc7082a8f 100644
--- a/third_party/x86inc/x86inc.asm
+++ b/third_party/x86inc/x86inc.asm
@@ -114,7 +114,12 @@
 %endif
 
 ; Always use long nops (reduces 0x90 spam in disassembly on x86_32)
+%ifndef __NASM_VER__
 CPU amdnop
+%else
+%use smartalign
+ALIGNMODE k7
+%endif
 
 ; Macros to eliminate most code duplication between x86_32 and x86_64:
 ; Currently this works only for leaf functions which load all their arguments