ack/mach/mantra/int/mloop7

126 lines
2.8 KiB
Plaintext
Raw Normal View History

1986-12-09 11:13:14 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1984-07-23 11:49:00 +00:00
!------------------------------------------------------------------------------
! UNSIGNED ARITHMETIC
!-----------------------------------------------------------------------------
adu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
adu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d1 ; add.w d1,(sp)
jmp (a4)
4: move.l (sp)+,d1; add.l d1,(sp)
jmp (a4)
sbu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
sbu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d1 ; sub.w d1,(sp)
jmp (a4)
1987-07-09 17:46:31 +00:00
4: move.l (sp)+,d1 ; sub.l d1,(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
!------------------------------------------------------------------------------
mlu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
mlu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d0 ; mulu (sp),d0
move.w d0,(sp) ; jmp (a4)
4: move.l (sp)+,d0 ; move.l (sp),d1
bsr mlu4 ; move.l d0,(sp)
jmp (a4)
!----------------------------------------------------------------------------
dvu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
dvu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d1 ; beq 3f
move.w (sp),d0 ; divu d1,d0
move.w d0,(sp) ; jmp (a4)
3: bsr e_idivz ; move.w #-1,(sp)
jmp (a4)
4: move.l (sp)+,d0 ; move.l (sp),d1
bsr dvu4 ; move.l d1,(sp)
jmp (a4)
!----------------------------------------------------------------------------
rmu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
rmu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d1 ; beq 3f
move.w (sp),d0 ; divu d1,d0
swap d0 ; move.w d0,(sp)
jmp (a4)
3: bsr e_idivz ; clr.w (sp)
jmp (a4)
4: move.l (sp)+,d0 ; move.l (sp),d1
bsr dvu4 ; move.l d3,(sp)
jmp (a4)
!------------------------------------------------------------------------.
slu_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
slu_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d0
bmi 7f
3: move.w (sp),d1
lsl.w d0,d1 ; move.w d1,(sp)
jmp (a4)
4: mov (sp)+,d0
bmi 9f
5: move.l (sp),d1
lsl.l d0,d1 ; move.l d1,(sp)
jmp (a4)
7: neg.w d0 ; bra 3f
9: nega d0 ; bra 5f
7: neg.w d0 ; bra 3b
9: nega d0 ; bra 5b
sru_z: mov (sp)+,d0 ; bra 0f
1987-03-31 09:23:20 +00:00
sru_l: adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.w (sp)+,d0
bmi 7b
3: move.w (sp),d1
lsr.w d0,d1 ; move.w d1,(sp)
jmp (a4)
4: mov (sp)+,d0
bmi 9b
5: move.l (sp),d1
lsr.l d0,d1 ; move.l d1,(sp)
jmp (a4)
!------------------------------------------------------------------------------
! DUMMY FLOATING POINT ROUTINES
!------------------------------------------------------------------------------
adf_l: sbf_l: mlf_l: dvf_l:
1987-03-31 09:23:20 +00:00
adroff ; move.w (a5),d0
1984-07-23 11:49:00 +00:00
1: add.l d0,sp
#ifdef FLTRAP
bra flnim
#else
jmp (a4)
#endif
adf_z: sbf_z: mlf_z: dvf_z:
mov (sp)+,d0 ; bra 1b
adf_s0: sbf_s0: mlf_s0: dvf_s0:
move.l #0,d0 ; move.b (a3)+,d0
bra 1b
fef_l: sub.l wrd,sp
fif_l: ngf_l: adroff
fef_z:
#ifdef FLTRAP
bra flnim
#else
jmp (a4)
#endif
ngf_z: fif_z: add.l wrd,sp ; bra fef_z