From 68726abdaa443926b8a1d939a6224dd12597e6af Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 15 May 2019 17:47:25 -0700 Subject: Implement asm labels --- test/asm-label.c | 5 +++++ test/asm-label.qbe | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 test/asm-label.c create mode 100644 test/asm-label.qbe (limited to 'test') diff --git a/test/asm-label.c b/test/asm-label.c new file mode 100644 index 0000000..b9489da --- /dev/null +++ b/test/asm-label.c @@ -0,0 +1,5 @@ +int x __asm__("y"); +int x = 2; + +void f(void) __asm__("g"); +void f(void) {} diff --git a/test/asm-label.qbe b/test/asm-label.qbe new file mode 100644 index 0000000..b7cda41 --- /dev/null +++ b/test/asm-label.qbe @@ -0,0 +1,7 @@ +export data $"y" = align 4 { w 2, } +export +function $"g"() { +@start.1 +@body.2 + ret +} -- cgit v1.2.3