DYADIC.R3V6 revision 1.1.1.1 1 1.1 mycroft * MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
2 1.1 mycroft * M68000 Hi-Performance Microprocessor Division
3 1.1 mycroft * M68040 Software Package
4 1.1 mycroft *
5 1.1 mycroft * M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
6 1.1 mycroft * All rights reserved.
7 1.1 mycroft *
8 1.1 mycroft * THE SOFTWARE is provided on an "AS IS" basis and without warranty.
9 1.1 mycroft * To the maximum extent permitted by applicable law,
10 1.1 mycroft * MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
11 1.1 mycroft * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
12 1.1 mycroft * PARTICULAR PURPOSE and any warranty against infringement with
13 1.1 mycroft * regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
14 1.1 mycroft * and any accompanying written materials.
15 1.1 mycroft *
16 1.1 mycroft * To the maximum extent permitted by applicable law,
17 1.1 mycroft * IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
18 1.1 mycroft * (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
19 1.1 mycroft * PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
20 1.1 mycroft * OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
21 1.1 mycroft * SOFTWARE. Motorola assumes no responsibility for the maintenance
22 1.1 mycroft * and support of the SOFTWARE.
23 1.1 mycroft *
24 1.1 mycroft * You are hereby granted a copyright license to use, modify, and
25 1.1 mycroft * distribute the SOFTWARE so long as this entire notice is retained
26 1.1 mycroft * without alteration in any modified and/or redistributed versions,
27 1.1 mycroft * and that such modified versions are clearly identified as such.
28 1.1 mycroft * No licenses are granted by implication, estoppel or otherwise
29 1.1 mycroft * under any patents or trademarks of Motorola, Inc.
30 1.1 mycroft
31 1.1 mycroft *
32 1.1 mycroft * DYADIC.R3V6 1.2 4/30/91
33 1.1 mycroft *
34 1.1 mycroft * DYADIC.R3V6 --- DYADIC template for MCD R3V6 native C compiler
35 1.1 mycroft *
36 1.1 mycroft * The MCD compiler is old. It returns float and double values
37 1.1 mycroft * as a double stored in d0/d1. There is no support for single or extended
38 1.1 mycroft * precision operations. It's not clear whether the float registers
39 1.1 mycroft * should be preserved, so for speed they're not.
40 1.1 mycroft *
41 1.1 mycroft
42 1.1 mycroft xref _OPa_
43 1.1 mycroft xref tag
44 1.1 mycroft
45 1.1 mycroft xdef _OPd_
46 1.1 mycroft _OPd_:
47 1.1 mycroft link a6,#-LOCAL_SIZE
48 1.1 mycroft fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
49 1.1 mycroft fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
50 1.1 mycroft *
51 1.1 mycroft * copy and convert arguments to ETEMP, FPTEMP.
52 1.1 mycroft *
53 1.1 mycroft fmove.d 8(a6),fp0
54 1.1 mycroft fmove.x fp0,FPTEMP(a6)
55 1.1 mycroft lea FPTEMP(a6),a0
56 1.1 mycroft bsr tag
57 1.1 mycroft move.b d0,DTAG(a6)
58 1.1 mycroft
59 1.1 mycroft fmove.d 16(a6),fp0
60 1.1 mycroft fmove.x fp0,ETEMP(a6)
61 1.1 mycroft lea ETEMP(a6),a0
62 1.1 mycroft bsr tag
63 1.1 mycroft move.b d0,STAG(a6)
64 1.1 mycroft
65 1.1 mycroft bsr _OPa_
66 1.1 mycroft
67 1.1 mycroft fmove.d fp0,USER_D0(a6) ; result goes into d0/d1 pair
68 1.1 mycroft movem.l USER_D0(a6),d0-d1
69 1.1 mycroft unlk a6
70 1.1 mycroft rts
71