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

TOMOYO Linux Cross Reference
Linux/arch/arm/nwfpe/single_cpdo.c

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/arm/nwfpe/single_cpdo.c (Version linux-6.12-rc7) and /arch/i386/nwfpe/single_cpdo.c (Version linux-4.13.16)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3     NetWinder Floating Point Emulator             
  4     (c) Rebel.COM, 1998,1999                      
  5     (c) Philip Blundell, 2001                     
  6                                                   
  7     Direct questions, comments to Scott Bambro    
  8                                                   
  9 */                                                
 10                                                   
 11 #include "fpa11.h"                                
 12 #include "softfloat.h"                            
 13 #include "fpopcode.h"                             
 14                                                   
 15 float32 float32_exp(float32 Fm);                  
 16 float32 float32_ln(float32 Fm);                   
 17 float32 float32_sin(float32 rFm);                 
 18 float32 float32_cos(float32 rFm);                 
 19 float32 float32_arcsin(float32 rFm);              
 20 float32 float32_arctan(float32 rFm);              
 21 float32 float32_log(float32 rFm);                 
 22 float32 float32_tan(float32 rFm);                 
 23 float32 float32_arccos(float32 rFm);              
 24 float32 float32_pow(float32 rFn, float32 rFm);    
 25 float32 float32_pol(float32 rFn, float32 rFm);    
 26                                                   
 27 static float32 float32_rsf(struct roundingData    
 28 {                                                 
 29         return float32_sub(roundData, rFm, rFn    
 30 }                                                 
 31                                                   
 32 static float32 float32_rdv(struct roundingData    
 33 {                                                 
 34         return float32_div(roundData, rFm, rFn    
 35 }                                                 
 36                                                   
 37 static float32 (*const dyadic_single[16])(stru    
 38         [ADF_CODE >> 20] = float32_add,           
 39         [MUF_CODE >> 20] = float32_mul,           
 40         [SUF_CODE >> 20] = float32_sub,           
 41         [RSF_CODE >> 20] = float32_rsf,           
 42         [DVF_CODE >> 20] = float32_div,           
 43         [RDF_CODE >> 20] = float32_rdv,           
 44         [RMF_CODE >> 20] = float32_rem,           
 45                                                   
 46         [FML_CODE >> 20] = float32_mul,           
 47         [FDV_CODE >> 20] = float32_div,           
 48         [FRD_CODE >> 20] = float32_rdv,           
 49 };                                                
 50                                                   
 51 static float32 float32_mvf(struct roundingData    
 52 {                                                 
 53         return rFm;                               
 54 }                                                 
 55                                                   
 56 static float32 float32_mnf(struct roundingData    
 57 {                                                 
 58         return rFm ^ 0x80000000;                  
 59 }                                                 
 60                                                   
 61 static float32 float32_abs(struct roundingData    
 62 {                                                 
 63         return rFm & 0x7fffffff;                  
 64 }                                                 
 65                                                   
 66 static float32 (*const monadic_single[16])(str    
 67         [MVF_CODE >> 20] = float32_mvf,           
 68         [MNF_CODE >> 20] = float32_mnf,           
 69         [ABS_CODE >> 20] = float32_abs,           
 70         [RND_CODE >> 20] = float32_round_to_in    
 71         [URD_CODE >> 20] = float32_round_to_in    
 72         [SQT_CODE >> 20] = float32_sqrt,          
 73         [NRM_CODE >> 20] = float32_mvf,           
 74 };                                                
 75                                                   
 76 unsigned int SingleCPDO(struct roundingData *r    
 77 {                                                 
 78         FPA11 *fpa11 = GET_FPA11();               
 79         float32 rFm;                              
 80         unsigned int Fm, opc_mask_shift;          
 81                                                   
 82         Fm = getFm(opcode);                       
 83         if (CONSTANT_FM(opcode)) {                
 84                 rFm = getSingleConstant(Fm);      
 85         } else if (fpa11->fType[Fm] == typeSin    
 86                 rFm = fpa11->fpreg[Fm].fSingle    
 87         } else {                                  
 88                 return 0;                         
 89         }                                         
 90                                                   
 91         opc_mask_shift = (opcode & MASK_ARITHM    
 92         if (!MONADIC_INSTRUCTION(opcode)) {       
 93                 unsigned int Fn = getFn(opcode    
 94                 float32 rFn;                      
 95                                                   
 96                 if (fpa11->fType[Fn] == typeSi    
 97                     dyadic_single[opc_mask_shi    
 98                         rFn = fpa11->fpreg[Fn]    
 99                         rFd->fSingle = dyadic_    
100                 } else {                          
101                         return 0;                 
102                 }                                 
103         } else {                                  
104                 if (monadic_single[opc_mask_sh    
105                         rFd->fSingle = monadic    
106                 } else {                          
107                         return 0;                 
108                 }                                 
109         }                                         
110                                                   
111         return 1;                                 
112 }                                                 
113                                                   

~ [ 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