diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-17 14:20:06 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-17 14:20:06 -0700 |
commit | 1ac41d34baf3a1ba387105526dec344d935c14c5 (patch) | |
tree | 8a1325b28799b22fdcfa90caaed10f19ee913f95 /macros | |
parent | 47b0c2d428d227f686b74389cd02cb484f2c4d30 (diff) | |
download | nasm-1ac41d34baf3a1ba387105526dec344d935c14c5.tar.gz nasm-1ac41d34baf3a1ba387105526dec344d935c14c5.tar.bz2 nasm-1ac41d34baf3a1ba387105526dec344d935c14c5.zip |
smartalign: 16-bit generic alignment macros
Smart alignment content for 16-bit "generic" mode
Diffstat (limited to 'macros')
-rw-r--r-- | macros/smartalign.mac | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/macros/smartalign.mac b/macros/smartalign.mac index 921ced8..6ff294a 100644 --- a/macros/smartalign.mac +++ b/macros/smartalign.mac @@ -4,11 +4,7 @@ USE: smartalign %imacro alignmode 1-2.nolist - %ifnempty %2 - %xdefine __ALIGN_JMP_THRESHOLD__ %2 - %else - %define __ALIGN_JMP_THRESHOLD__ 17 - %endif + %define __ALIGN_JMP_THRESHOLD__ 17 %ifidni %1,nop %define __ALIGN_16BIT_1B__ 0x90 %define __ALIGN_16BIT_2B__ 0x90,0x90 @@ -38,13 +34,13 @@ USE: smartalign %define __ALIGN_64BIT_8B__ 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90 %elifidni %1,generic %define __ALIGN_16BIT_1B__ 0x90 - %define __ALIGN_16BIT_2B__ 0x90,0x90 - %define __ALIGN_16BIT_3B__ 0x90,0x90,0x90 - %define __ALIGN_16BIT_4B__ 0x90,0x90,0x90,0x90 - %define __ALIGN_16BIT_5B__ 0x90,0x90,0x90,0x90,0x90 - %define __ALIGN_16BIT_6B__ 0x90,0x90,0x90,0x90,0x90,0x90 - %define __ALIGN_16BIT_7B__ 0x90,0x90,0x90,0x90,0x90,0x90,0x90 - %define __ALIGN_16BIT_8B__ 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90 + %define __ALIGN_16BIT_2B__ 0x89,0xf6 + %define __ALIGN_16BIT_3B__ 0x8d,0x74,0x00 + %define __ALIGN_16BIT_4B__ 0x8d,0xb4,0x00,0x00 + %define __ALIGN_16BIT_5B__ 0x90,0x8d,0xb4,0x00,0x00 + %define __ALIGN_16BIT_6B__ 0x89,0xf6,0x8d,0xbd,0x00,0x00 + %define __ALIGN_16BIT_7B__ 0x8d,0x74,0x00,0x8d,0xbd,0x00,0x00 + %define __ALIGN_16BIT_8B__ 0x8d,0xb4,0x00,0x00,0x8d,0xbd,0x00,0x00 %define __ALIGN_32BIT_1B__ 0x90 %define __ALIGN_32BIT_2B__ 0x89,0xf6 @@ -147,6 +143,9 @@ USE: smartalign %else %error unknown alignment mode: %1 %endif + %ifnempty %2 + %xdefine __ALIGN_JMP_THRESHOLD__ %2 + %endif %xdefine __ALIGNMODE__ %1,__ALIGN_JMP_THRESHOLD__ %endmacro |