aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-23 23:57:24 +1300
committerAndrew Chambers <[email protected]>2021-10-23 23:57:24 +1300
commit6b9b596fcd588d22e15f259b572ae8845fbddacb (patch)
tree1cf1758d7a65e90e8a9d40a91887bd5501506d27 /test
parent1e9bf39a1b2c47920def55f29c4b9b93c402e1d4 (diff)
Implement the .set directive.
Diffstat (limited to 'test')
-rw-r--r--test/execute/0002-setsym.s17
-rw-r--r--test/test.sh2
2 files changed, 18 insertions, 1 deletions
diff --git a/test/execute/0002-setsym.s b/test/execute/0002-setsym.s
new file mode 100644
index 0000000..6ce09bc
--- /dev/null
+++ b/test/execute/0002-setsym.s
@@ -0,0 +1,17 @@
+.text
+.globl main
+main:
+ jmp z
+ # x
+ nop
+ # y
+ nop
+ # z
+ xorl %eax, %eax
+ ret
+
+.set z, y+1
+.set x, main+2
+.set y, x+1
+
+.section .note.GNU-stack,"",@progbits
diff --git a/test/test.sh b/test/test.sh
index 3510fa4..cf673d7 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -361,7 +361,7 @@ t () {
echo -n "."
}
-for tc in $(echo test/execute/*)
+for tc in $(echo test/execute/*.s)
do
t "$tc"
done \ No newline at end of file