Home | History | Annotate | Download | only in cpu

Lines Matching full:fmax

1 ; Toshiba MeP FMAX Coprocessor description.  -*- Scheme -*-
29 (define-pmacro fmax-core-isa () (ISA ext_core2))
30 (define-pmacro all-fmax-isas () (ISA ext_core2))
37 (dnf f-fmax-0-4 "opcode" (all-fmax-isas) 0 4)
38 (dnf f-fmax-4-4 "opcode" (all-fmax-isas) 4 4)
39 (dnf f-fmax-8-4 "opcode" (all-fmax-isas) 8 4)
40 (dnf f-fmax-12-4 "opcode" (all-fmax-isas) 12 4)
41 (dnf f-fmax-16-4 "opcode" (all-fmax-isas) 16 4)
42 (dnf f-fmax-20-4 "opcode" (all-fmax-isas) 20 4)
43 (dnf f-fmax-24-4 "opcode" (all-fmax-isas) 24 4)
44 (dnf f-fmax-28-1 "opcode" (all-fmax-isas) 28 1)
45 (dnf f-fmax-29-1 "opcode" (all-fmax-isas) 29 1)
46 (dnf f-fmax-30-1 "opcode" (all-fmax-isas) 30 1)
47 (dnf f-fmax-31-1 "opcode" (all-fmax-isas) 31 1)
52 (name f-fmax-frd)
54 (attrs all-fmax-isas)
56 (subfields f-fmax-28-1 f-fmax-4-4)
58 (set (ifield f-fmax-4-4) (and (ifield f-fmax-frd) #xf))
59 (set (ifield f-fmax-28-1) (srl (ifield f-fmax-frd) 4))))
60 (extract (set (ifield f-fmax-frd)
61 (or (sll (ifield f-fmax-28-1) 4) (ifield f-fmax-4-4))))
64 (name f-fmax-frn)
66 (attrs all-fmax-isas)
68 (subfields f-fmax-29-1 f-fmax-20-4)
70 (set (ifield f-fmax-20-4) (and (ifield f-fmax-frn) #xf))
71 (set (ifield f-fmax-29-1) (srl (ifield f-fmax-frn) 4))))
72 (extract (set (ifield f-fmax-frn)
73 (or (sll (ifield f-fmax-29-1) 4) (ifield f-fmax-20-4))))
76 (name f-fmax-frm)
78 (attrs all-fmax-isas)
80 (subfields f-fmax-30-1 f-fmax-24-4)
82 (set (ifield f-fmax-24-4) (and (ifield f-fmax-frm) #xf))
83 (set (ifield f-fmax-30-1) (srl (ifield f-fmax-frm) 4))))
84 (extract (set (ifield f-fmax-frm)
85 (or (sll (ifield f-fmax-30-1) 4) (ifield f-fmax-24-4))))
90 (dnf f-fmax-rm "opcode" (all-fmax-isas) 8 4)
94 (define-normal-insn-enum fmax-cond "condition opcode enum" (all-fmax-isas) FMAX_ f-fmax-8-4
106 (define-pmacro (-fmax-fr-reg-pair n) ((.sym "fr" n) n))
107 (define-pmacro (-fmax-cr-reg-pair n) ((.sym "c" n) n))
115 (name h-cr-fmax)
117 (attrs all-fmax-isas VIRTUAL IS_FLOAT)
120 (.splice (.unsplice (.map -fmax-fr-reg-pair (.iota 32)))
121 (.unsplice (.map -fmax-cr-reg-pair (.iota 32))))
135 (name h-ccr-fmax)
137 (attrs all-fmax-isas VIRTUAL)
152 (name h-fmax-compare-i-p)
154 (attrs all-fmax-isas)
162 (define-full-operand fmax-FRd "FRd" (all-fmax-isas (CDATA FMAX_FLOAT)) h-cr SF f-fmax-frd ((parse "fmax_cr") (print "fmax_cr")) () ())
163 (define-full-operand fmax-FRn "FRn" (all-fmax-isas (CDATA FMAX_FLOAT)) h-cr SF f-fmax-frn ((parse "fmax_cr") (print "fmax_cr")) () ())
164 (define-full-operand fmax-FRm "FRm" (all-fmax-isas (CDATA FMAX_FLOAT)) h-cr SF f-fmax-frm ((parse "fmax_cr") (print "fmax_cr")) () ())
166 (define-full-operand fmax-FRd-int "FRd as an integer" (all-fmax-isas (CDATA FMAX_INT)) h-cr SI f-fmax-frd ((parse "fmax_cr") (print "fmax_cr")) () ())
167 (define-full-operand fmax-FRn-int "FRn as an integer" (all-fmax-isas (CDATA FMAX_INT)) h-cr SI f-fmax-frn ((parse "fmax_cr") (print "fmax_cr")) () ())
171 (define-full-operand fmax-CCRn "CCRn" (all-fmax-isas (CDATA REGNUM)) h-ccr DFLT f-fmax-4-4 ((parse "fmax_ccr") (print "fmax_ccr")) () ())
173 (dnop fmax-CIRR "CIRR" (all-fmax-isas SEM-ONLY) h-ccr 0)
174 (dnop fmax-CBCR "CBCR" (all-fmax-isas SEM-ONLY) h-ccr 1)
175 (dnop fmax-CERR "CERR" (all-fmax-isas SEM-ONLY) h-ccr 15)
179 (dnop fmax-Rm "Rm" (all-fmax-isas) h-gpr f-fmax-rm)
183 (dnop fmax-Compare-i-p "flag" (all-fmax-isas SEM-ONLY) h-fmax-compare-i-p f-nil)
189 (define-pmacro (fmax-binary-arith op opc sem)
192 (all-fmax-isas MAY_TRAP)
193 (.str op " ${fmax-FRd},${fmax-FRn},${fmax-FRm}")
194 (+ (f-fmax-0-4 #xF) fmax-FRd (f-fmax-8-4 opc) (f-fmax-12-4 #x7) (f-fmax-16-4 0)
195 fmax-FRn fmax-FRm (f-fmax-31-1 0))
201 (fmax-binary-arith fadds #x0 (set fmax-FRd (add fmax-FRn fmax-FRm)))
202 (fmax-binary-arith fsubs #x1 (set fmax-FRd (sub fmax-FRn fmax-FRm)))
203 (fmax-binary-arith fmuls #x2 (set fmax-FRd (mul fmax-FRn fmax-FRm)))
204 (fmax-binary-arith fdivs #x3 (set fmax-FRd (div fmax-FRn fmax-FRm)))
208 (define-pmacro (fmax-unary-arith op opc sem)
211 (all-fmax-isas MAY_TRAP)
212 (.str op " ${fmax-FRd},${fmax-FRn}")
213 (+ (f-fmax-0-4 #xF) fmax-FRd (f-fmax-8-4 opc) (f-fmax-12-4 #x7)
214 (f-fmax-16-4 0) fmax-FRn (f-fmax-24-4 0) (f-fmax-30-1 0) (f-fmax-31-1 0))
220 (fmax-unary-arith fsqrts #x4 (set fmax-FRd (sqrt fmax-FRn)))
221 (fmax-unary-arith fabss #x5 (set fmax-FRd (abs fmax-FRn)))
222 (fmax-unary-arith fnegs #x7 (set fmax-FRd (neg fmax-FRn)))
223 (fmax-unary-arith fmovs #x6 (set fmax-FRd fmax-FRn))
227 (define-pmacro (fmax-conv op opc1 opc2 opnd1 opnd2 sem)
230 (all-fmax-isas MAY_TRAP)
232 (+ (f-fmax-0-4 #xF) opnd1 (f-fmax-8-4 opc1) (f-fmax-12-4 #x7)
233 (f-fmax-16-4 opc2) opnd2 (f-fmax-24-4 0) (f-fmax-30-1 0) (f-fmax-31-1 0))
239 (fmax-conv froundws #xC #x0 fmax-FRd-int fmax-FRn (set fmax-FRd-int (c-call SI "fmax_froundws" fmax-FRn)))
240 (fmax-conv ftruncws #xD #x0 fmax-FRd-int fmax-FRn (set fmax-FRd-int (c-call SI "fmax_ftruncws" fmax-FRn)))
241 (fmax-conv fceilws #xE #x0 fmax-FRd-int fmax-FRn (set fmax-FRd-int (c-call SI "fmax_fceilws" fmax-FRn)))
242 (fmax-conv ffloorws #xF #x0 fmax-FRd-int fmax-FRn (set fmax-FRd-int (c-call SI "fmax_ffloorws" fmax-FRn)))
243 (fmax-conv fcvtws #x4 #x1 fmax-FRd-int fmax-FRn (set fmax-FRd-int (c-call SI "fmax_fcvtws" fmax-FRn)))
244 (fmax-conv fcvtsw #x0 #x9 fmax-FRd fmax-FRn-int (set fmax-FRd (float SF FPCONV-DEFAULT fmax-FRn-int)))
250 (define-pmacro (fmax-f-sem x y) (andif (gt x y) (lt x y))) ; do this to get exception detection
251 (define-pmacro (fmax-u-sem x y) (not (orif (lt x y) (orif (eq x y) (gt x y)))))
252 (define-pmacro (fmax-e-sem x y) (eq x y))
253 (define-pmacro (fmax-ue-sem x y) (not (orif (lt x y) (gt x y))))
254 (define-pmacro (fmax-l-sem x y) (lt x y))
255 (define-pmacro (fmax-ul-sem x y) (not (orif (gt x y) (eq x y))))
256 (define-pmacro (fmax-le-sem x y) (orif (lt x y) (eq x y)))
257 (define-pmacro (fmax-ule-sem x y) (not (gt x y)))
259 (define-pmacro (fmax-comp cond suffix exceptions)
266 (all-fmax-isas MAY_TRAP)
267 (.str "fcmp" cond suffix "s ${fmax-FRn},${fmax-FRm}")
268 (+ (f-fmax-0-4 #xF) (f-fmax-4-4 0) (.sym FMAX_ cond suffix) (f-fmax-12-4 #x7)
269 (f-fmax-16-4 #x2) (f-fmax-28-1 0) fmax-FRn fmax-FRm (f-fmax-31-1 0))
271 (set fmax-Compare-i-p exceptions)
272 (set fmax-CBCR ((.sym fmax- cond -sem) fmax-FRn fmax-FRm))
273 (set fmax-Compare-i-p 0)
280 (fmax-comp f "" 0)
281 (fmax-comp u "" 0)
282 (fmax-comp e "" 0)
283 (fmax-comp ue "" 0)
284 (fmax-comp l "" 0)
285 (fmax-comp ul "" 0)
286 (fmax-comp le "" 0)
287 (fmax-comp ule "" 0)
290 (fmax-comp f i 1)
291 (fmax-comp u i 1)
292 (fmax-comp e i 1)
293 (fmax-comp ue i 1)
294 (fmax-comp l i 1)
295 (fmax-comp ul i 1)
296 (fmax-comp le i 1)
297 (fmax-comp ule i 1)
303 (all-fmax-isas (INTRINSIC "cmov1"))
304 "cmov ${fmax-FRd-int},${fmax-Rm}"
305 (+ (f-fmax-0-4 #xF) fmax-FRd-int fmax-Rm (f-fmax-12-4 #x7)
306 (f-fmax-16-4 #xF) (f-fmax-20-4 0) (f-fmax-24-4 0)
307 (f-fmax-29-1 0) (f-fmax-30-1 0) (f-fmax-31-1 0))
308 (set fmax-FRd-int fmax-Rm)
313 (all-fmax-isas (INTRINSIC "cmov2"))
314 "cmov ${fmax-Rm},${fmax-FRd-int}"
315 (+ (f-fmax-0-4 #xF) fmax-FRd-int fmax-Rm (f-fmax-12-4 #x7)
316 (f-fmax-16-4 #xF) (f-fmax-20-4 0) (f-fmax-24-4 0)
317 (f-fmax-29-1 0) (f-fmax-30-1 0) (f-fmax-31-1 1))
318 (set fmax-Rm fmax-FRd-int)
323 (all-fmax-isas (INTRINSIC "cmovc1"))
324 "cmovc ${fmax-CCRn},${fmax-Rm}"
325 (+ (f-fmax-0-4 #xF) fmax-CCRn fmax-Rm (f-fmax-12-4 #x7)
326 (f-fmax-16-4 #xF) (f-fmax-20-4 0) (f-fmax-24-4 0)
327 (f-fmax-28-1 0) (f-fmax-29-1 0) (f-fmax-30-1 1) (f-fmax-31-1 0))
328 (set fmax-CCRn fmax-Rm)
333 (all-fmax-isas (INTRINSIC "cmovc2"))
334 "cmovc ${fmax-Rm},${fmax-CCRn}"
335 (+ (f-fmax-0-4 #xF) fmax-CCRn fmax-Rm (f-fmax-12-4 #x7)
336 (f-fmax-16-4 #xF) (f-fmax-20-4 0) (f-fmax-24-4 0)
337 (f-fmax-28-1 0) (f-fmax-29-1 0) (f-fmax-30-1 1) (f-fmax-31-1 1))
338 (set fmax-Rm fmax-CCRn)