ack/mach/vax4/libem/cfu.s

39 lines
606 B
ArmAsm
Raw Normal View History

1985-01-18 14:30:03 +00:00
#include "em_abs.h"
1990-01-12 10:29:26 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define .cfu
1985-01-18 14:30:03 +00:00
1994-06-24 14:02:31 +00:00
! $Id$
1985-01-18 14:30:03 +00:00
.cfu:
movl (sp)+,r2
movpsl r1
bicl2 $~040,r1
1990-01-12 10:29:26 +00:00
bicpsw $040 ! integer overflow traps must be ignored
1985-01-18 14:30:03 +00:00
movl (sp)+,r0
cmpl (sp),$4
1990-01-12 10:29:26 +00:00
bneq 1f
1985-01-18 14:30:03 +00:00
tstl (sp)+
tstf (sp)
1990-01-12 10:29:26 +00:00
bgeq 5f
1985-01-18 14:30:03 +00:00
mnegf (sp),(sp)
1990-01-12 10:29:26 +00:00
5:
1985-01-18 14:30:03 +00:00
cvtfl (sp)+,-(sp)
1990-01-12 10:29:26 +00:00
2:
1985-01-18 14:30:03 +00:00
cmpl r0,$4
1990-01-12 10:29:26 +00:00
bneq 4f
bispsw r1 ! restore trap enable bit
1985-01-18 14:30:03 +00:00
jmp (r2)
1990-01-12 10:29:26 +00:00
1:
1985-01-18 14:30:03 +00:00
cmpl (sp)+,$8
1990-01-12 10:29:26 +00:00
bneq 4f
1985-01-18 14:30:03 +00:00
tstd (sp)
1990-01-12 10:29:26 +00:00
bgeq 3f
1985-01-18 14:30:03 +00:00
mnegd (sp),(sp)
1990-01-12 10:29:26 +00:00
3:
1985-01-18 14:30:03 +00:00
cvtdl (sp)+,-(sp)
1990-01-12 10:29:26 +00:00
br 2b
4:
1985-01-18 14:30:03 +00:00
pushl $EILLINS
jmp .fat