summaryrefslogtreecommitdiff
path: root/test-suite/standalone/sassy/tests/cell.scm
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/standalone/sassy/tests/cell.scm')
-rw-r--r--test-suite/standalone/sassy/tests/cell.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/test-suite/standalone/sassy/tests/cell.scm b/test-suite/standalone/sassy/tests/cell.scm
new file mode 100644
index 000000000..d7064ce75
--- /dev/null
+++ b/test-suite/standalone/sassy/tests/cell.scm
@@ -0,0 +1,15 @@
+(macro define-cell
+ (lambda (name init)
+ `(begin (macro cell-tag "CELL")
+ (data (label ,name (dwords cell-tag ,init)))
+ (macro ,(string->symbol
+ (string-append (symbol->string name) "-ref"))
+ (& ,name 4)))))
+(define-cell foo 100)
+
+(entry _start)
+
+(text (label _start (mov ebx foo-ref)
+ (mov eax 1)
+ (int #x80)))
+