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

TOMOYO Linux Cross Reference
Linux/arch/arm/nwfpe/fpa11_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/fpa11_cpdo.c (Version linux-6.12-rc7) and /arch/i386/nwfpe/fpa11_cpdo.c (Version linux-6.1.116)


  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 "fpopcode.h"                             
 13                                                   
 14 unsigned int SingleCPDO(struct roundingData *r    
 15 unsigned int DoubleCPDO(struct roundingData *r    
 16 unsigned int ExtendedCPDO(struct roundingData     
 17                                                   
 18 unsigned int EmulateCPDO(const unsigned int op    
 19 {                                                 
 20         FPA11 *fpa11 = GET_FPA11();               
 21         FPREG *rFd;                               
 22         unsigned int nType, nDest, nRc;           
 23         struct roundingData roundData;            
 24                                                   
 25         /* Get the destination size.  If not v    
 26            an invalid instruction trap. */        
 27         nDest = getDestinationSize(opcode);       
 28         if (typeNone == nDest)                    
 29                 return 0;                         
 30                                                   
 31         roundData.mode = SetRoundingMode(opcod    
 32         roundData.precision = SetRoundingPreci    
 33         roundData.exception = 0;                  
 34                                                   
 35         /* Compare the size of the operands in    
 36            Choose the largest size and perform    
 37            in order to make use of all the pre    
 38            If Fm is a constant, we just grab a    
 39            matching the size of the operand in    
 40         if (MONADIC_INSTRUCTION(opcode))          
 41                 nType = nDest;                    
 42         else                                      
 43                 nType = fpa11->fType[getFn(opc    
 44                                                   
 45         if (!CONSTANT_FM(opcode)) {               
 46                 register unsigned int Fm = get    
 47                 if (nType < fpa11->fType[Fm])     
 48                         nType = fpa11->fType[F    
 49                 }                                 
 50         }                                         
 51                                                   
 52         rFd = &fpa11->fpreg[getFd(opcode)];       
 53                                                   
 54         switch (nType) {                          
 55         case typeSingle:                          
 56                 nRc = SingleCPDO(&roundData, o    
 57                 break;                            
 58         case typeDouble:                          
 59                 nRc = DoubleCPDO(&roundData, o    
 60                 break;                            
 61 #ifdef CONFIG_FPE_NWFPE_XP                        
 62         case typeExtended:                        
 63                 nRc = ExtendedCPDO(&roundData,    
 64                 break;                            
 65 #endif                                            
 66         default:                                  
 67                 nRc = 0;                          
 68         }                                         
 69                                                   
 70         /* The CPDO functions used to always s    
 71            to be the same as their working siz    
 72                                                   
 73         if (nRc != 0) {                           
 74                 /* If the operation succeeded,    
 75                    destination register is the    
 76                    to be. */                      
 77                                                   
 78                 fpa11->fType[getFd(opcode)] =     
 79                                                   
 80 #ifdef CONFIG_FPE_NWFPE_XP                        
 81                 if (nDest != nType) {             
 82                         switch (nDest) {          
 83                         case typeSingle:          
 84                                 {                 
 85                                         if (ty    
 86                                                   
 87                                         else      
 88                                                   
 89                                 }                 
 90                                 break;            
 91                                                   
 92                         case typeDouble:          
 93                                 {                 
 94                                         if (ty    
 95                                                   
 96                                         else      
 97                                                   
 98                                 }                 
 99                                 break;            
100                                                   
101                         case typeExtended:        
102                                 {                 
103                                         if (ty    
104                                                   
105                                         else      
106                                                   
107                                 }                 
108                                 break;            
109                         }                         
110                 }                                 
111 #else                                             
112                 if (nDest != nType) {             
113                         if (nDest == typeSingl    
114                                 rFd->fSingle =    
115                         else                      
116                                 rFd->fDouble =    
117                 }                                 
118 #endif                                            
119         }                                         
120                                                   
121         if (roundData.exception)                  
122                 float_raise(roundData.exceptio    
123                                                   
124         return nRc;                               
125 }                                                 
126                                                   

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