2 | sto_res.sa 3.1 12/10/90
4 | Takes the result and puts it in where the user expects it.
5 | Library functions return result in fp0. If fp0 is not the
6 | users destination register then fp0 is moved to the
7 | correct floating-point destination register. fp0 and fp1
8 | are then restored to the original contents.
10 | Input: result in fp0,fp1
12 | d2 & a0 should be kept unmodified
14 | Output: moves the result to the true destination reg or mem
16 | Modifies: destination floating point register
19 | Copyright (C) Motorola, Inc. 1990
22 | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
23 | The copyright notice above does not evidence any
24 | actual or intended publication of such source code.
26 STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package
35 bfextu CMDREG1B(%a6){#13:#3},%d0 |extract cos destination
36 cmpib #3,%d0 |check for fp0/fp1 cases
38 fmovemx %fp1-%fp1,-(%a7)
40 subl %d0,%d1 |d1 = 7- (dest. reg. no.)
42 bsetl %d1,%d0 |d0 is dynamic register mask
53 fmovemx %fp1-%fp1,USER_FP3(%a6)
56 fmovemx %fp1-%fp1,USER_FP2(%a6)
59 fmovemx %fp1-%fp1,USER_FP1(%a6)
62 fmovemx %fp1-%fp1,USER_FP0(%a6)
68 bfextu CMDREG1B(%a6){#6:#3},%d0 |extract destination register
69 cmpib #3,%d0 |check for fp0/fp1 cases
71 fmovemx %fp0-%fp0,-(%a7)
73 subl %d0,%d1 |d1 = 7- (dest. reg. no.)
75 bsetl %d1,%d0 |d0 is dynamic register mask
86 fmovemx %fp0-%fp0,USER_FP3(%a6)
89 fmovemx %fp0-%fp0,USER_FP2(%a6)
92 fmovemx %fp0-%fp0,USER_FP1(%a6)
95 fmovemx %fp0-%fp0,USER_FP0(%a6)