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 | For details on the license for this file, please see the
23 | file, README, in this same directory.
25 STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package
34 bfextu CMDREG1B(%a6){#13:#3},%d0 |extract cos destination
35 cmpib #3,%d0 |check for fp0/fp1 cases
37 fmovemx %fp1-%fp1,-(%a7)
39 subl %d0,%d1 |d1 = 7- (dest. reg. no.)
41 bsetl %d1,%d0 |d0 is dynamic register mask
52 fmovemx %fp1-%fp1,USER_FP3(%a6)
55 fmovemx %fp1-%fp1,USER_FP2(%a6)
58 fmovemx %fp1-%fp1,USER_FP1(%a6)
61 fmovemx %fp1-%fp1,USER_FP0(%a6)
67 bfextu CMDREG1B(%a6){#6:#3},%d0 |extract destination register
68 cmpib #3,%d0 |check for fp0/fp1 cases
70 fmovemx %fp0-%fp0,-(%a7)
72 subl %d0,%d1 |d1 = 7- (dest. reg. no.)
74 bsetl %d1,%d0 |d0 is dynamic register mask
85 fmovemx %fp0-%fp0,USER_FP3(%a6)
88 fmovemx %fp0-%fp0,USER_FP2(%a6)
91 fmovemx %fp0-%fp0,USER_FP1(%a6)
94 fmovemx %fp0-%fp0,USER_FP0(%a6)