diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-14 06:50:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-14 06:50:30 -0700 |
commit | 05c527ed6e36992f69dc8fb073ee6b6899182d2f (patch) | |
tree | d622db789c5757ebcc733953b122748b8863ea56 | |
parent | a0b1cd5e5ce981a001df4da5110913f9a6bffd11 (diff) | |
download | txr-05c527ed6e36992f69dc8fb073ee6b6899182d2f.tar.gz txr-05c527ed6e36992f69dc8fb073ee6b6899182d2f.tar.bz2 txr-05c527ed6e36992f69dc8fb073ee6b6899182d2f.zip |
asm: block and catch need dest op constraint.
* share/txr/stdlib/asm.tl (op-block, op-catch): Some operands
that are destinations need to be parsed as "d", so the
assembler diagnoses invalid destinations. Otherwise we don't
catch the problem until VM run time.
-rw-r--r-- | share/txr/stdlib/asm.tl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/txr/stdlib/asm.tl b/share/txr/stdlib/asm.tl index 93ce63e3..a82ce156 100644 --- a/share/txr/stdlib/asm.tl +++ b/share/txr/stdlib/asm.tl @@ -443,7 +443,7 @@ (defopcode op-block block auto (:method asm (me asm syntax) me.(chk-arg-count 3 syntax) - (tree-bind (outreg blname exitpt) asm.(parse-args me syntax '(r r l)) + (tree-bind (outreg blname exitpt) asm.(parse-args me syntax '(d r l)) asm.(put-insn me.code (ash exitpt -16) (logtrunc exitpt 16)) asm.(put-pair outreg blname))) @@ -498,7 +498,7 @@ (defopcode op-catch catch auto (:method asm (me asm syntax) me.(chk-arg-count 4 syntax) - (tree-bind (sym args catch-syms dst) asm.(parse-args me syntax '(r r r l)) + (tree-bind (sym args catch-syms dst) asm.(parse-args me syntax '(d d r l)) asm.(put-insn me.code (ash dst -16) (logtrunc dst 16)) asm.(put-pair sym args) asm.(put-pair 0 catch-syms))) |