diff options
author | Andy Wingo <wingo@pobox.com> | 2009-10-25 12:41:48 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-10-25 13:12:27 +0100 |
commit | 8b652112048ae2c482993897cdf40c5d9a67a8d2 (patch) | |
tree | 77a6913933bdfe702de01eb12c245509cccd5721 /module/language/assembly/compile-bytecode.scm | |
parent | df435c83072a79d9fdacbc57d9925ab7c0be5deb (diff) | |
download | guile-8b652112048ae2c482993897cdf40c5d9a67a8d2.tar.gz |
assembly/disassembly support for br-if-nargs-*
* module/language/assembly/compile-bytecode.scm (write-bytecode): Handle
br-if-nargs compilation.
* module/language/assembly/decompile-bytecode.scm (decode-load-program):
And decompile them nicely as well.
* module/language/assembly/disassemble.scm (code-annotation): And,
present the disassembly if br-if-nargs-* nicely.
Diffstat (limited to 'module/language/assembly/compile-bytecode.scm')
-rw-r--r-- | module/language/assembly/compile-bytecode.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/module/language/assembly/compile-bytecode.scm b/module/language/assembly/compile-bytecode.scm index d92821cc9..e6fc5bc2a 100644 --- a/module/language/assembly/compile-bytecode.scm +++ b/module/language/assembly/compile-bytecode.scm @@ -137,6 +137,9 @@ ((br-if-not-eq ,l) (write-break l)) ((br-if-null ,l) (write-break l)) ((br-if-not-null ,l) (write-break l)) + ((br-if-nargs-ne ,hi ,lo ,l) (write-byte hi) (write-byte lo) (write-break l)) + ((br-if-nargs-lt ,hi ,lo ,l) (write-byte hi) (write-byte lo) (write-break l)) + ((br-if-nargs-gt ,hi ,lo ,l) (write-byte hi) (write-byte lo) (write-break l)) ((mv-call ,n ,l) (write-byte n) (write-break l)) (else (cond |