-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathifunblok.ppcs
85 lines (60 loc) · 2.75 KB
/
ifunblok.ppcs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: ALPHA-AXP-INTERNALS; Base: 10; Lowercase: T -*-
;(include-header "aihead.s")
;(include-header "aistat.s")
;(include-header "ifunhead.s")
(comment "Block Instructions.")
(define-instruction |DoBlock0Read| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR0)
(B |BlockRead|))
;; |DoBlock3Read|, |DoBlock2Read|, and |DoBlock1Read| are in IFUNCOM1.PPCS
(define-instruction |DoBlock0Write| :operand-from-stack-signed-immediate ()
(LWA arg3 PROCESSORSTATE_BAR0+4 (ivory))
(ADDI arg2 ivory PROCESSORSTATE_BAR0)
(B |BlockWrite|))
;; |DoBlock3Write|, |DoBlock2Write|, and |DoBlock1Write| are in IFUNCOM1.PPCS
(define-instruction |DoBlock0ReadShift| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR0)
(B |BlockReadShift|))
(define-instruction |DoBlock3ReadShift| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR3)
(B |BlockReadShift|))
(define-instruction |DoBlock2ReadShift| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR2)
(B |BlockReadShift|))
;; ARG1 has the cycle type and flags, put the proper BAR into ARG2
(define-instruction |DoBlock1ReadShift| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR1)
(label |BlockReadShift|)
(with-multiple-memory-reads (arg3 arg4 arg5 arg6)
(i%block-n-read-shift arg2 arg1 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12)))
(define-instruction |DoBlock0ReadAlu| :operand-from-stack ()
(ADDI arg2 ivory PROCESSORSTATE_BAR0)
(B |BlockReadAlu|))
(define-instruction |DoBlock3ReadAlu| :operand-from-stack ()
(ADDI arg2 ivory PROCESSORSTATE_BAR3)
(B |BlockReadAlu|))
(define-instruction |DoBlock2ReadAlu| :operand-from-stack ()
(ADDI arg2 ivory PROCESSORSTATE_BAR2)
(B |BlockReadAlu|))
(align4kskip4k)
;; ARG1 has address of boolean op, put the proper BAR into ARG2
(define-instruction |DoBlock1ReadAlu| :operand-from-stack ()
(ADDI arg2 ivory PROCESSORSTATE_BAR1)
(label |BlockReadAlu|)
(with-multiple-memory-reads (arg3 arg4 arg5 arg6)
(i%block-n-read-alu arg2 arg1 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12)))
(define-instruction |DoBlock0ReadTest| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR0)
(B |BlockReadTest|))
(define-instruction |DoBlock3ReadTest| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR3)
(B |BlockReadTest|))
(define-instruction |DoBlock2ReadTest| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR2)
(B |BlockReadTest|))
;; ARG1 has the cycle type and flags, put the proper BAR into ARG2
(define-instruction |DoBlock1ReadTest| :10-bit-immediate ()
(ADDI arg2 ivory PROCESSORSTATE_BAR1)
(label |BlockReadTest|)
(i%block-n-read-test arg2 arg1 arg3 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12))
(comment "Fin.")