-
Notifications
You must be signed in to change notification settings - Fork 1
/
arch.scm
35 lines (24 loc) · 922 Bytes
/
arch.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(declare (unit arch)
(uses nodes arch-x86-64))
;; The default selected architecture
(define *arch* <arch-x86-64>)
;; Get all vregs that are read in this instr
(define (arch-vregs-read instr)
((arch-descriptor-vregs-read *arch*) instr))
;; Get all vregs that are written to in this instr
(define (arch-vregs-written instr)
((arch-descriptor-vregs-written *arch*) instr))
;; Generate a function to act as a bridge between the C runtime and the compiled Scheme.
;;
(define (arch-generate-bridge-context mod)
((arch-descriptor-generate-bridge-context *arch*) mod))
;; Format an operand
;;
(define (arch-operand-format op)
((arch-descriptor-operand-format *arch*) op))
;; Instruction selection
;;
(define (arch-emit-statement mc-blk tree)
((arch-descriptor-emit-statement *arch*) mc-blk tree))
(define (arch-make-context name params mod)
((arch-descriptor-make-context *arch*) name params mod))