]> granicus.if.org Git - yasm/commitdiff
Add testcase for struc with base offset 60/head
authorSimon Brenner <olsner@gmail.com>
Sun, 2 Oct 2011 03:57:35 +0000 (05:57 +0200)
committerSimon Brenner <olsner@gmail.com>
Sun, 2 Oct 2011 04:03:29 +0000 (06:03 +0200)
modules/parsers/nasm/tests/Makefile.inc
modules/parsers/nasm/tests/strucbase.asm [new file with mode: 0644]
modules/parsers/nasm/tests/strucbase.hex [new file with mode: 0644]

index e8293d2a46c40bcd435b6c728f6780f9767473ef..56d0b926e222ccca75ef25cf51aa5d106651acb9 100644 (file)
@@ -39,6 +39,8 @@ EXTRA_DIST += modules/parsers/nasm/tests/strucalign.asm
 EXTRA_DIST += modules/parsers/nasm/tests/strucalign.hex
 EXTRA_DIST += modules/parsers/nasm/tests/struczero.asm
 EXTRA_DIST += modules/parsers/nasm/tests/struczero.hex
+EXTRA_DIST += modules/parsers/nasm/tests/strucbase.asm
+EXTRA_DIST += modules/parsers/nasm/tests/strucbase.hex
 EXTRA_DIST += modules/parsers/nasm/tests/syntax-err.asm
 EXTRA_DIST += modules/parsers/nasm/tests/syntax-err.errwarn
 EXTRA_DIST += modules/parsers/nasm/tests/uscore.asm
diff --git a/modules/parsers/nasm/tests/strucbase.asm b/modules/parsers/nasm/tests/strucbase.asm
new file mode 100644 (file)
index 0000000..81e2fc0
--- /dev/null
@@ -0,0 +1,11 @@
+struc base, -7
+.a: resb 1
+.b: resb 1
+endstruc
+
+; Expect base and base.a to appear at -7, base.b at -6
+db base
+db base.a
+db base.b
+; The size should be '2' here
+db base_size
diff --git a/modules/parsers/nasm/tests/strucbase.hex b/modules/parsers/nasm/tests/strucbase.hex
new file mode 100644 (file)
index 0000000..5d48c5e
--- /dev/null
@@ -0,0 +1,4 @@
+f9 
+f9 
+fa 
+02