mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-03 21:30:29 +02:00
RTL compiler: Compile TC7 branches.
* module/system/vm/assembler.scm: * module/system/vm/disassembler.scm (code-annotation): * module/language/cps/primitives.scm (*branching-primcall-arities*): * module/language/cps/compile-rtl.scm (emit-rtl-sequence): Add support for compiling symbol?, variable?, vector?, and string? branches.
This commit is contained in:
parent
4fc6b4d2c5
commit
be8b62ca7f
5 changed files with 57 additions and 4 deletions
|
@ -274,8 +274,13 @@
|
|||
(($ $primcall 'pair? (a)) (unary emit-br-if-pair a))
|
||||
(($ $primcall 'struct? (a)) (unary emit-br-if-struct a))
|
||||
(($ $primcall 'char? (a)) (unary emit-br-if-char a))
|
||||
;; Add TC7 tests here
|
||||
(($ $primcall 'eq? (a b)) (binary emit-br-if-eq a b))
|
||||
(($ $primcall 'symbol? (a)) (unary emit-br-if-symbol a))
|
||||
(($ $primcall 'variable? (a)) (unary emit-br-if-variable a))
|
||||
(($ $primcall 'vector? (a)) (unary emit-br-if-vector a))
|
||||
(($ $primcall 'string? (a)) (unary emit-br-if-string a))
|
||||
;; Add more TC7 tests here. Keep in sync with
|
||||
;; *branching-primcall-arities* in (language cps primitives) and
|
||||
;; the set of macro-instructions in assembly.scm.
|
||||
(($ $primcall 'eq? (a b)) (binary emit-br-if-eq a b))
|
||||
(($ $primcall 'eqv? (a b)) (binary emit-br-if-eqv a b))
|
||||
(($ $primcall 'equal? (a b)) (binary emit-br-if-equal a b))
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
(nil? . (1 . 1))
|
||||
(pair? . (1 . 1))
|
||||
(struct? . (1 . 1))
|
||||
(string? . (1 . 1))
|
||||
(vector? . (1 . 1))
|
||||
(symbol? . (1 . 1))
|
||||
(variable? . (1 . 1))
|
||||
(char? . (1 . 1))
|
||||
(eq? . (1 . 2))
|
||||
(eqv? . (1 . 2))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue