Annotation of sys/arch/m68k/fpsp/DYADIC.CI5, Revision 1.1.1.1
1.1 nbrk 1: * $OpenBSD: DYADIC.CI5,v 1.2 1996/05/29 21:05:18 niklas Exp $
2: * $NetBSD: DYADIC.CI5,v 1.2 1994/10/26 07:48:26 cgd Exp $
3:
4: * MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
5: * M68000 Hi-Performance Microprocessor Division
6: * M68040 Software Package
7: *
8: * M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
9: * All rights reserved.
10: *
11: * THE SOFTWARE is provided on an "AS IS" basis and without warranty.
12: * To the maximum extent permitted by applicable law,
13: * MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
14: * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
15: * PARTICULAR PURPOSE and any warranty against infringement with
16: * regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
17: * and any accompanying written materials.
18: *
19: * To the maximum extent permitted by applicable law,
20: * IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
21: * (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
22: * PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
23: * OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
24: * SOFTWARE. Motorola assumes no responsibility for the maintenance
25: * and support of the SOFTWARE.
26: *
27: * You are hereby granted a copyright license to use, modify, and
28: * distribute the SOFTWARE so long as this entire notice is retained
29: * without alteration in any modified and/or redistributed versions,
30: * and that such modified versions are clearly identified as such.
31: * No licenses are granted by implication, estoppel or otherwise
32: * under any patents or trademarks of Motorola, Inc.
33:
34: *
35: * DYADIC.CI5 1.2 4/30/91
36: *
37: * DYADIC.CI5 --- DYADIC template for CI5 compiler
38: *
39:
40: xref _OPa_
41: xref tag
42:
43: xdef _OPd_
44: _OPd_:
45: link a6,#-LOCAL_SIZE
46: fmovem.x fp2-fp3,USER_FP2(a6)
47: fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
48: fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
49: *
50: * copy, convert and tag input arguments
51: *
52: fmove.d 8(a6),fp0
53: fmove.x fp0,FPTEMP(a6)
54: lea FPTEMP(a6),a0
55: bsr tag
56: move.b d0,DTAG(a6)
57:
58: fmove.d 16(a6),fp0
59: fmove.x fp0,ETEMP(a6)
60: lea ETEMP(a6),a0
61: bsr tag
62: move.b d0,STAG(a6)
63:
64: bsr _OPa_
65:
66: fmove.l fpsr,d0 ; update status register
67: or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
68: swap.w d0
69: or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
70: swap.w d0
71: fmove.l d0,fpsr
72: *
73: * Result is now in FP0
74: *
75: fmovem.x USER_FP2(a6),fp2-fp3 ; note: FP0/FP1 not restored
76: unlk a6
77: rts
78:
CVSweb