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

TOMOYO Linux Cross Reference
Linux/arch/arm/nwfpe/extended_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/extended_cpdo.c (Version linux-6.12-rc7) and /arch/i386/nwfpe/extended_cpdo.c (Version ccs-tools-1.8.12)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3     NetWinder Floating Point Emulator             
  4     (c) Rebel.COM, 1998,1999                      
  5                                                   
  6     Direct questions, comments to Scott Bambro    
  7                                                   
  8 */                                                
  9                                                   
 10 #include "fpa11.h"                                
 11 #include "softfloat.h"                            
 12 #include "fpopcode.h"                             
 13                                                   
 14 floatx80 floatx80_exp(floatx80 Fm);               
 15 floatx80 floatx80_ln(floatx80 Fm);                
 16 floatx80 floatx80_sin(floatx80 rFm);              
 17 floatx80 floatx80_cos(floatx80 rFm);              
 18 floatx80 floatx80_arcsin(floatx80 rFm);           
 19 floatx80 floatx80_arctan(floatx80 rFm);           
 20 floatx80 floatx80_log(floatx80 rFm);              
 21 floatx80 floatx80_tan(floatx80 rFm);              
 22 floatx80 floatx80_arccos(floatx80 rFm);           
 23 floatx80 floatx80_pow(floatx80 rFn, floatx80 r    
 24 floatx80 floatx80_pol(floatx80 rFn, floatx80 r    
 25                                                   
 26 static floatx80 floatx80_rsf(struct roundingDa    
 27 {                                                 
 28         return floatx80_sub(roundData, rFm, rF    
 29 }                                                 
 30                                                   
 31 static floatx80 floatx80_rdv(struct roundingDa    
 32 {                                                 
 33         return floatx80_div(roundData, rFm, rF    
 34 }                                                 
 35                                                   
 36 static floatx80 (*const dyadic_extended[16])(s    
 37         [ADF_CODE >> 20] = floatx80_add,          
 38         [MUF_CODE >> 20] = floatx80_mul,          
 39         [SUF_CODE >> 20] = floatx80_sub,          
 40         [RSF_CODE >> 20] = floatx80_rsf,          
 41         [DVF_CODE >> 20] = floatx80_div,          
 42         [RDF_CODE >> 20] = floatx80_rdv,          
 43         [RMF_CODE >> 20] = floatx80_rem,          
 44                                                   
 45         /* strictly, these opcodes should not     
 46         [FML_CODE >> 20] = floatx80_mul,          
 47         [FDV_CODE >> 20] = floatx80_div,          
 48         [FRD_CODE >> 20] = floatx80_rdv,          
 49 };                                                
 50                                                   
 51 static floatx80 floatx80_mvf(struct roundingDa    
 52 {                                                 
 53         return rFm;                               
 54 }                                                 
 55                                                   
 56 static floatx80 floatx80_mnf(struct roundingDa    
 57 {                                                 
 58         rFm.high ^= 0x8000;                       
 59         return rFm;                               
 60 }                                                 
 61                                                   
 62 static floatx80 floatx80_abs(struct roundingDa    
 63 {                                                 
 64         rFm.high &= 0x7fff;                       
 65         return rFm;                               
 66 }                                                 
 67                                                   
 68 static floatx80 (*const monadic_extended[16])(    
 69         [MVF_CODE >> 20] = floatx80_mvf,          
 70         [MNF_CODE >> 20] = floatx80_mnf,          
 71         [ABS_CODE >> 20] = floatx80_abs,          
 72         [RND_CODE >> 20] = floatx80_round_to_i    
 73         [URD_CODE >> 20] = floatx80_round_to_i    
 74         [SQT_CODE >> 20] = floatx80_sqrt,         
 75         [NRM_CODE >> 20] = floatx80_mvf,          
 76 };                                                
 77                                                   
 78 unsigned int ExtendedCPDO(struct roundingData     
 79 {                                                 
 80         FPA11 *fpa11 = GET_FPA11();               
 81         floatx80 rFm;                             
 82         unsigned int Fm, opc_mask_shift;          
 83                                                   
 84         Fm = getFm(opcode);                       
 85         if (CONSTANT_FM(opcode)) {                
 86                 rFm = getExtendedConstant(Fm);    
 87         } else {                                  
 88                 switch (fpa11->fType[Fm]) {       
 89                 case typeSingle:                  
 90                         rFm = float32_to_float    
 91                         break;                    
 92                                                   
 93                 case typeDouble:                  
 94                         rFm = float64_to_float    
 95                         break;                    
 96                                                   
 97                 case typeExtended:                
 98                         rFm = fpa11->fpreg[Fm]    
 99                         break;                    
100                                                   
101                 default:                          
102                         return 0;                 
103                 }                                 
104         }                                         
105                                                   
106         opc_mask_shift = (opcode & MASK_ARITHM    
107         if (!MONADIC_INSTRUCTION(opcode)) {       
108                 unsigned int Fn = getFn(opcode    
109                 floatx80 rFn;                     
110                                                   
111                 switch (fpa11->fType[Fn]) {       
112                 case typeSingle:                  
113                         rFn = float32_to_float    
114                         break;                    
115                                                   
116                 case typeDouble:                  
117                         rFn = float64_to_float    
118                         break;                    
119                                                   
120                 case typeExtended:                
121                         rFn = fpa11->fpreg[Fn]    
122                         break;                    
123                                                   
124                 default:                          
125                         return 0;                 
126                 }                                 
127                                                   
128                 if (dyadic_extended[opc_mask_s    
129                         rFd->fExtended = dyadi    
130                 } else {                          
131                         return 0;                 
132                 }                                 
133         } else {                                  
134                 if (monadic_extended[opc_mask_    
135                         rFd->fExtended = monad    
136                 } else {                          
137                         return 0;                 
138                 }                                 
139         }                                         
140                                                   
141         return 1;                                 
142 }                                                 
143                                                   

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