diff options
author | Andy Wingo <wingo@pobox.com> | 2009-08-13 18:48:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-08-13 18:48:20 +0200 |
commit | 66ff15e2f0afa2d2ecd4e7de484acf7324c3b0f1 (patch) | |
tree | d31881900e8f715d8afd07521497c81101b3fedf /test-suite/standalone/sassy/tests/prims16/16locals5.scm | |
parent | d785171115bb35c6e3cc3663a0023ff4e88536d5 (diff) | |
download | guile-66ff15e2f0afa2d2ecd4e7de484acf7324c3b0f1.tar.gz |
add the sassy x86 assembler
* module/Makefile.am: Add language/sassy.scm. Probably EXTRA_DIST the
dependant files, too.
* module/language/sassy.scm: New file, the sassy loader. Sassy is
originally R5RS code that loads a number of files. I've converted that
toplevel file to be a Guile module that *includes* the subfiles, so
that it all gets compiled together. It's a pretty bad hack though,
because what I should be doing is including them relative to the
sassy.scm source location, but we don't know that at expansion time.
Something to fix.
really bad hack in it so that it will compile correctly -- p
* module/language/sassy/: All the sassy files and some changelog
information. All of these files are LGPLv2.1+, so they can be included
in Guile.
* test-suite/standalone/sassy/tests/: Add the sassy unit tests.
* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-sassy: Hook the sassy unit tests up to our
test suite.
Diffstat (limited to 'test-suite/standalone/sassy/tests/prims16/16locals5.scm')
-rw-r--r-- | test-suite/standalone/sassy/tests/prims16/16locals5.scm | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test-suite/standalone/sassy/tests/prims16/16locals5.scm b/test-suite/standalone/sassy/tests/prims16/16locals5.scm new file mode 100644 index 000000000..be1614a33 --- /dev/null +++ b/test-suite/standalone/sassy/tests/prims16/16locals5.scm @@ -0,0 +1,38 @@ +(bits 16) + +(macro my-while + (lambda (test . body) + `(locals (loop) + (label loop + (with-win (jmp short loop) + (seq ,test + (begin ,@body))))))) + +(text + (label loop + + (nop) + + (my-while (< ax 10) + (pop bx) + (add ax bx))) + + (my-while (> cx 1000) + (pop bx) + (sub cx bx)) + + (jmp short loop)) + +; 00000000 90 nop +; 00000001 3D0A00 cmp ax,0xa +; 00000004 7D05 jnl 0xb +; 00000006 5B pop bx +; 00000007 01D8 add ax,bx +; 00000009 EBF6 jmp short 0x1 +; 0000000B 81F9E803 cmp cx,0x3e8 +; 0000000F 7E05 jng 0x16 +; 00000011 5B pop bx +; 00000012 29D9 sub cx,bx +; 00000014 EBF5 jmp short 0xb +; 00000016 EBE8 jmp short 0x0 + |