Mul Instruction Call Example; Cmp2 Instruction Call Example - Motorola M68060 User Manual

Table of Contents

Advertisement

* mulu.l <ea>,Dh:Dl
* mulu.l _multiplier,d1:d0
subq.l
pea
move.l
move.l
bsr.l
add.l
move.l
move.l
* cmp2.l <ea>,Rn
* cmp2.l _bounds,d0
pea
move.l
bsr.l
add.l
divide and the source operand is a zero, then the library routine (as it is last instruction) exe-
cutes an implemented divide using a zero source operand so that an integer divide-by-zero
exception will be taken. Although the exception stack frame will not point to the correct
instruction, the user can at least be able to record that such an event occurred.
C.3 FLOATING-POINT EMULATION PACKAGE (MC68060FPSP)
The MC68060 does not implement some floating-point instructions, addressing modes, and
data types on-chip in order to streamline internal operations. This results in an overall sys-
tem performance improvement at the expense of software emulation of these unimple-
mented instructions, addressing modes, and data types. The M68060SP provides three
separate modules that are related to floating-point operations. The first floating-point module
is the full floating-point kernel module. This module is used for applications that require emu-
lation of the full MC68881 floating-point instruction set, data-types, and IEEE-754 exception
handling. The second floating-point module is the floating-point library. This library is pro-
vided as a separate module for applications that need to avoid the latency incurred by the
F-line exception processing for unimplemented floating-point instructions. However, this
method requires recompiling of existing software to implement subroutine calls. The third
floating-point module, the partial floating-point kernel module, is optional and is used prima-
rily in systems that also integrate the floating-point library. The partial floating-point kernel
module is similar in function to the full floating-point kernel except that it does not contain
the unimplemented floating-point instruction exception handler. This module is provided for
the purpose of saving memory space. Otherwise, the full floating-point kernel module must
be used instead.
MOTOROLA
#$8,sp
(sp)
d0,-(sp)
_multiplier,-(sp)
_060LISP_TOP+$18
#$c,sp
(sp)+,d1
(sp)+,d0
Figure C-6. MUL Instruction Call Example
_bounds
d0,-(sp)
_060LSP_TOP_+$48
#$8,sp
Figure C-7. CMP2 Instruction Call Example
M68060 USER'S MANUAL
; make room for result on stack
; pass: result addr on stack
; pass: multiplicand on stack
; pass: multiplier on stack
; branch to multiply routine
; clear arguments from stack
; load result[63:32]
; load result[31:0]
; pass ptr to bounds
; pass Rn
; branch to "cmp2" routine
; clear arguments from stack
MC68060 Software Package
C-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68060Mc68lc060Mc68ec060

Table of Contents