~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/fpsp040/sto_res.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/fpsp040/sto_res.S (Architecture i386) and /arch/m68k/fpsp040/sto_res.S (Architecture m68k)


  1 |                                                   1 |
  2 |       sto_res.sa 3.1 12/10/90                     2 |       sto_res.sa 3.1 12/10/90
  3 |                                                   3 |
  4 |       Takes the result and puts it in where       4 |       Takes the result and puts it in where the user expects it.
  5 |       Library functions return result in fp0      5 |       Library functions return result in fp0. If fp0 is not the
  6 |       users destination register then fp0 is      6 |       users destination register then fp0 is moved to the
  7 |       correct floating-point destination reg      7 |       correct floating-point destination register.  fp0 and fp1
  8 |       are then restored to the original cont      8 |       are then restored to the original contents.
  9 |                                                   9 |
 10 |       Input:  result in fp0,fp1                  10 |       Input:  result in fp0,fp1
 11 |                                                  11 |
 12 |               d2 & a0 should be kept unmodif     12 |               d2 & a0 should be kept unmodified
 13 |                                                  13 |
 14 |       Output: moves the result to the true d     14 |       Output: moves the result to the true destination reg or mem
 15 |                                                  15 |
 16 |       Modifies: destination floating point r     16 |       Modifies: destination floating point register
 17 |                                                  17 |
 18                                                    18 
 19 |               Copyright (C) Motorola, Inc. 1     19 |               Copyright (C) Motorola, Inc. 1990
 20 |                       All Rights Reserved        20 |                       All Rights Reserved
 21 |                                                  21 |
 22 |       For details on the license for this fi     22 |       For details on the license for this file, please see the
 23 |       file, README, in this same directory.      23 |       file, README, in this same directory.
 24                                                    24 
 25 STO_RES:        |idnt   2,1 | Motorola 040 Flo     25 STO_RES:        |idnt   2,1 | Motorola 040 Floating Point Software Package
 26                                                    26 
 27                                                    27 
 28         |section        8                          28         |section        8
 29                                                    29 
 30 #include "fpsp.h"                                  30 #include "fpsp.h"
 31                                                    31 
 32         .global sto_cos                            32         .global sto_cos
 33 sto_cos:                                           33 sto_cos:
 34         bfextu          CMDREG1B(%a6){#13:#3},     34         bfextu          CMDREG1B(%a6){#13:#3},%d0       |extract cos destination
 35         cmpib           #3,%d0          |check     35         cmpib           #3,%d0          |check for fp0/fp1 cases
 36         bles            c_fp0123                   36         bles            c_fp0123
 37         fmovemx %fp1-%fp1,-(%a7)                   37         fmovemx %fp1-%fp1,-(%a7)
 38         moveql          #7,%d1                     38         moveql          #7,%d1
 39         subl            %d0,%d1         |d1 =      39         subl            %d0,%d1         |d1 = 7- (dest. reg. no.)
 40         clrl            %d0                        40         clrl            %d0
 41         bsetl           %d1,%d0         |d0 is     41         bsetl           %d1,%d0         |d0 is dynamic register mask
 42         fmovemx (%a7)+,%d0                         42         fmovemx (%a7)+,%d0
 43         rts                                        43         rts
 44 c_fp0123:                                          44 c_fp0123:
 45         cmpib           #0,%d0                     45         cmpib           #0,%d0
 46         beqs            c_is_fp0                   46         beqs            c_is_fp0
 47         cmpib           #1,%d0                     47         cmpib           #1,%d0
 48         beqs            c_is_fp1                   48         beqs            c_is_fp1
 49         cmpib           #2,%d0                     49         cmpib           #2,%d0
 50         beqs            c_is_fp2                   50         beqs            c_is_fp2
 51 c_is_fp3:                                          51 c_is_fp3:
 52         fmovemx %fp1-%fp1,USER_FP3(%a6)            52         fmovemx %fp1-%fp1,USER_FP3(%a6)
 53         rts                                        53         rts
 54 c_is_fp2:                                          54 c_is_fp2:
 55         fmovemx %fp1-%fp1,USER_FP2(%a6)            55         fmovemx %fp1-%fp1,USER_FP2(%a6)
 56         rts                                        56         rts
 57 c_is_fp1:                                          57 c_is_fp1:
 58         fmovemx %fp1-%fp1,USER_FP1(%a6)            58         fmovemx %fp1-%fp1,USER_FP1(%a6)
 59         rts                                        59         rts
 60 c_is_fp0:                                          60 c_is_fp0:
 61         fmovemx %fp1-%fp1,USER_FP0(%a6)            61         fmovemx %fp1-%fp1,USER_FP0(%a6)
 62         rts                                        62         rts
 63                                                    63 
 64                                                    64 
 65         .global sto_res                            65         .global sto_res
 66 sto_res:                                           66 sto_res:
 67         bfextu          CMDREG1B(%a6){#6:#3},%     67         bfextu          CMDREG1B(%a6){#6:#3},%d0        |extract destination register
 68         cmpib           #3,%d0          |check     68         cmpib           #3,%d0          |check for fp0/fp1 cases
 69         bles            fp0123                     69         bles            fp0123
 70         fmovemx %fp0-%fp0,-(%a7)                   70         fmovemx %fp0-%fp0,-(%a7)
 71         moveql          #7,%d1                     71         moveql          #7,%d1
 72         subl            %d0,%d1         |d1 =      72         subl            %d0,%d1         |d1 = 7- (dest. reg. no.)
 73         clrl            %d0                        73         clrl            %d0
 74         bsetl           %d1,%d0         |d0 is     74         bsetl           %d1,%d0         |d0 is dynamic register mask
 75         fmovemx (%a7)+,%d0                         75         fmovemx (%a7)+,%d0
 76         rts                                        76         rts
 77 fp0123:                                            77 fp0123:
 78         cmpib           #0,%d0                     78         cmpib           #0,%d0
 79         beqs            is_fp0                     79         beqs            is_fp0
 80         cmpib           #1,%d0                     80         cmpib           #1,%d0
 81         beqs            is_fp1                     81         beqs            is_fp1
 82         cmpib           #2,%d0                     82         cmpib           #2,%d0
 83         beqs            is_fp2                     83         beqs            is_fp2
 84 is_fp3:                                            84 is_fp3:
 85         fmovemx %fp0-%fp0,USER_FP3(%a6)            85         fmovemx %fp0-%fp0,USER_FP3(%a6)
 86         rts                                        86         rts
 87 is_fp2:                                            87 is_fp2:
 88         fmovemx %fp0-%fp0,USER_FP2(%a6)            88         fmovemx %fp0-%fp0,USER_FP2(%a6)
 89         rts                                        89         rts
 90 is_fp1:                                            90 is_fp1:
 91         fmovemx %fp0-%fp0,USER_FP1(%a6)            91         fmovemx %fp0-%fp0,USER_FP1(%a6)
 92         rts                                        92         rts
 93 is_fp0:                                            93 is_fp0:
 94         fmovemx %fp0-%fp0,USER_FP0(%a6)            94         fmovemx %fp0-%fp0,USER_FP0(%a6)
 95         rts                                        95         rts
 96                                                    96 
 97         |end                                       97         |end
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php