mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
smartalign: 16-bit generic alignment macros
Smart alignment content for 16-bit "generic" mode
This commit is contained in:
parent
47b0c2d428
commit
1ac41d34ba
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user