From 6b9b596fcd588d22e15f259b572ae8845fbddacb Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Sat, 23 Oct 2021 23:57:24 +1300 Subject: Implement the .set directive. --- test/execute/0002-setsym.s | 17 +++++++++++++++++ test/test.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/execute/0002-setsym.s (limited to 'test') 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 -- cgit v1.2.3