2 * Routines for floating point emulation testing.
5 #include <machine/regdef.h>
6 #include <machine/machAsmDefs.h>
7 #include <machine/machConst.h>
67 lw t1
, 16(sp
) # get 4th arg
72 ctc1 zero
, MACH_FPC_CSR
73 sll a0
, a0
, 2 # index into jump table
233 cfc1 t0
, MACH_FPC_CSR
244 .word 0x46062000 # add.s f0,f4,f6
245 .word 0x46262000 # add.d f0,f4,f6
246 .word 0x46062001 # sub.s f0,f4,f6
247 .word 0x46262001 # sub.d f0,f4,f6
248 .word 0x46062002 # mul.s f0,f4,f6
249 .word 0x46262002 # mul.d f0,f4,f6
250 .word 0x46062003 # div.s f0,f4,f6
251 .word 0x46262003 # div.d f0,f4,f6
252 .word 0x46002005 # abs.s f0,f4
253 .word 0x46202005 # abs.d f0,f4
254 .word 0x46002006 # mov.s f0,f4
255 .word 0x46202006 # mov.d f0,f4
256 .word 0x46002007 # neg.s f0,f4,f0
257 .word 0x46202007 # neg.d f0,f4,f0
258 .word 0x46202020 # cvt.s.d f0,f4
259 .word 0x46802020 # cvt.s.w f0,f4
260 .word 0x46002021 # cvt.d.s f0,f4
261 .word 0x46802021 # cvt.d.w f0,f4
262 .word 0x46002024 # cvt.w.s f0,f4
263 .word 0x46202024 # cvt.w.d f0,f4
264 .word 0x46062030 # c.f.s f4,f6
265 .word 0x46062031 # c.un.s f4,f6
266 .word 0x46062032 # c.eq.s f4,f6
267 .word 0x46062033 # c.ueq.s f4,f6
268 .word 0x46062034 # c.olt.s f4,f6
269 .word 0x46062035 # c.ult.s f4,f6
270 .word 0x46062036 # c.ole.s f4,f6
271 .word 0x46062037 # c.ule.s f4,f6
272 .word 0x46062038 # c.sf.s f4,f6
273 .word 0x46062039 # c.ngle.s f4,f6
274 .word 0x4606203a # c.seq.s f4,f6
275 .word 0x4606203b # c.ngl.s f4,f6
276 .word 0x4606203c # c.lt.s f4,f6
277 .word 0x4606203d # c.nge.s f4,f6
278 .word 0x4606203e # c.le.s f4,f6
279 .word 0x4606203f # c.ngt.s f4,f6
280 .word 0x46262030 # c.f.d f4,f6
281 .word 0x46262031 # c.un.d f4,f6
282 .word 0x46262032 # c.eq.d f4,f6
283 .word 0x46262033 # c.ueq.d f4,f6
284 .word 0x46262034 # c.olt.d f4,f6
285 .word 0x46262035 # c.ult.d f4,f6
286 .word 0x46262036 # c.ole.d f4,f6
287 .word 0x46262037 # c.ule.d f4,f6
288 .word 0x46262038 # c.sf.d f4,f6
289 .word 0x46262039 # c.ngle.d f4,f6
290 .word 0x4626203a # c.seq.d f4,f6
291 .word 0x4626203b # c.ngl.d f4,f6
292 .word 0x4626203c # c.lt.d f4,f6
293 .word 0x4626203d # c.nge.d f4,f6
294 .word 0x4626203e # c.le.d f4,f6
295 .word 0x4626203f # c.ngt.d f4,f6
298 NON_LEAF
(emfp
, STAND_FRAME_SIZE
, ra
)
299 subu sp
, sp
, STAND_FRAME_SIZE
300 sw ra
, STAND_RA_OFFSET
(sp
)
301 .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE)
303 cfc1 v0
, MACH_FPC_CSR
304 lw t1
, STAND_FRAME_SIZE+
16(sp
) # get 4th arg
309 ctc1 zero
, MACH_FPC_CSR
310 sll a0
, a0
, 2 # index into instruction table
315 cfc1 t0
, MACH_FPC_CSR
321 lw ra
, STAND_RA_OFFSET
(sp
)
322 addu sp
, sp
, STAND_FRAME_SIZE