diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
commit | 6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e (patch) | |
tree | 32451fa3cdd9321fb2591fada9891b2cb70a9cd1 /asm-tests/i386-pc.S | |
parent | Initial commit. (diff) | |
download | grub2-6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e.tar.xz grub2-6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e.zip |
Adding upstream version 2.06.upstream/2.06upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'asm-tests/i386-pc.S')
-rw-r--r-- | asm-tests/i386-pc.S | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/asm-tests/i386-pc.S b/asm-tests/i386-pc.S new file mode 100644 index 0000000..d037744 --- /dev/null +++ b/asm-tests/i386-pc.S @@ -0,0 +1,18 @@ +/* on x86 old clang doesn't support .code16 + newer clang supports it but creates 6-byte jumps instead of 3-byte ones + which makes us go over boot sector size. + Starting with 3.9 clang emits 3-byte jumps but still creates 8-bytes movl + instead of 5-bytes, so code overflows into data. */ + + .code16 + jmp far + .org 4 + jmp nearer + .org 6 + movl nearer, %ebx + .org 11 + .space 100 +nearer: + .space 200 +far: + .byte 0 |