3
$Id: flinstr1.scm,v 1.4 2002/02/22 03:14:49 cph Exp $
5
Copyright (c) 1988-1989, 1999, 2001-2002 Massachusetts Institute of Technology
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or (at
10
your option) any later version.
12
This program is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23
;;;; Instruction set description for 68881 floating point processor
24
;;; Originally provided courtesy of BBN ACI.
26
;;; These instructions are not handled: FDBcc FMOVECR FMOVEM FNOP FRESTORE FSAVE
27
;;; FScc FSINCOS FTRAPcc
29
(declare (usual-integrations))
31
(define FPC #b001) ; Floating point chip identifier for
32
; coprocessor instructions.
33
(define-symbol-transformer
35
(L . 0) ; long word integer
36
(S . 1) ; single precision real
37
(X . 2) ; extended precision real
38
(P . 3) ; packed decimal real
39
(W . 4) ; word integer
40
(D . 5) ; double precision real
41
(B . 6)) ; byte integer
43
(define-symbol-transformer
44
float-destination-format
45
(L . 0) ; long word integer
46
(S . 1) ; single precision real
47
(X . 2) ; extended precision real
48
(W . 4) ; word integer
49
(D . 5) ; double precision real
50
(B . 6)) ; byte integer
52
(define-symbol-transformer float-reg
53
(FP0 . 0) (FP1 . 1) (FP2 . 2) (FP3 . 3)
54
(FP4 . 4) (FP5 . 5) (FP6 . 6) (FP7 . 7))
56
(define-symbol-transformer float-ctl-reg
57
(FPCR . 4) (FPSR . 2) (FPIAR 1))
59
(define-symbol-transformer float-cc
60
(EQ . 1) (NE . 14) (GT . 2) (NGT . 13)
61
(GE . 3) (NGE . 12) (LT . 4) (NLT . 11)
62
(LE . 5) (NLE . 10) (GL . 6) (NGL . 9)
64
(GLE . 7) (NGLE . 8) (F . 0) (T . 15))
66
(define-instruction FMOVE
68
(((? type float-source-format) (? source ea-d) (? destination float-reg))
72
(6 source SOURCE-EA 'L))
73
(EXTENSION-WORD (3 #b010)
78
(((? source float-reg) (? destination float-reg))
83
(EXTENSION-WORD (3 #b000)
88
(((? type float-destination-format)
90
(? destination ea-d&a))
94
(6 destination DESTINATION-EA 'L))
95
(EXTENSION-WORD (3 #b011)
100
(((P (? k-factor)) (? source float-reg) (? destination ea-d&a))
104
(6 destination DESTINATION-EA 'L))
105
(EXTENSION-WORD (3 #b011)
110
(((PD (? k-reg)) (? source float-reg) (? destination ea-d&a))
114
(6 destination DESTINATION-EA 'L))
115
(EXTENSION-WORD (3 #b011)
121
((L (? source ea-d) (? destination float-ctl-reg))
125
(6 source SOURCE-EA 'L))
126
(EXTENSION-WORD (3 #b100)
130
((L (? source float-ctl-reg) (? destination ea-d))
134
(6 destination DESTINATION-EA 'L))
135
(EXTENSION-WORD (3 #b101)
141
(sc-macro-transformer
142
(lambda (form environment)
144
`(DEFINE-INSTRUCTION ,(cadr form)
146
(((? type float-source-format)
148
(? destination float-reg))
152
(6 source SOURCE-EA 'L))
153
(EXTENSION-WORD (3 #b010)
158
(((? source float-reg) (? destination float-reg))
163
(EXTENSION-WORD (3 #b000)
173
(EXTENSION-WORD (3 #b000)
176
(7 ,(caddr form)))))))))
177
(define-unary-flop FABS #b0011000)
178
(define-unary-flop FACOS #b0011100)
179
(define-unary-flop FASIN #b0001100)
180
(define-unary-flop FATAN #b0001010)
181
(define-unary-flop FATANH #b0001101)
182
(define-unary-flop FCOS #b0011101)
183
(define-unary-flop FCOSH #b0011001)
184
(define-unary-flop FETOX #b0010000)
185
(define-unary-flop FETOXM1 #b0001000)
186
(define-unary-flop FGETEXP #b0011110)
187
(define-unary-flop FGETMAN #b0011111)
188
(define-unary-flop FINT #b0000001)
189
(define-unary-flop FINTRZ #b0000011)
190
(define-unary-flop FLOG10 #b0010101)
191
(define-unary-flop FLOG2 #b0010110)
192
(define-unary-flop FLOGN #b0010100)
193
(define-unary-flop FLOGNP1 #b0000110)
194
(define-unary-flop FNEG #b0011010)
195
(define-unary-flop FSIN #b0001110)
196
(define-unary-flop FSINH #b0000010)
197
(define-unary-flop FSQRT #b0000100)
198
(define-unary-flop FTAN #b0001111)
199
(define-unary-flop FTANH #b0001001)
200
(define-unary-flop FTENTOX #b0010010)
201
(define-unary-flop FTWOTOX #b0010001))
b'\\ No newline at end of file'