History

asmtest: avoid testing against complex nop alignment in gas

.align #,0x90 in gas ignores the 0x90 and outputs any kind of nop it feels like. the one avoided by this patch is a 7 byte nop, which gas has been doing since at least 1999: http://sourceware.org/ml/binutils/1999-10/msg00083.html In order to match what gas does, we would need to make code alignment target-specific, import a lot of code, and face the question: exactly which gas {version,target,tune} combo are we trying to match? see i386_align_code in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.c?annotate=1.460&cvsroot=src The smart noppery is turned on via the special casing of 0x90 at line 438 in md_do_align in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.h?annotate=1.1&cvsroot=src

Joe Soroka committed 15 years ago

Commit 68393821 parent 2047f881 file · +2 −1Browse files

Unified · Split

tests/asmtest.S+2−1
@@ -9,7 +9,8 @@ · 8 unmodified lines
99 .int 1, 2, 3
1010 .align 8
1111 .byte 1
12− .align 16, 0x90
12+/* .align 16, 0x90 gas is too clever for us with 0x90 fill */
13+ .align 16, 0x91 /* 0x91 tests the non-clever behaviour */
1314 .skip 3
1415 .skip 15, 0x90
1516 .string "hello\0world"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t