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

TOMOYO Linux Cross Reference
Linux/arch/x86/lib/inat.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/x86/lib/inat.c (Version linux-6.12-rc7) and /arch/m68k/lib/inat.c (Version linux-6.5.13)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3  * x86 instruction attribute tables               
  4  *                                                
  5  * Written by Masami Hiramatsu <mhiramat@redha    
  6  */                                               
  7 #include <asm/insn.h> /* __ignore_sync_check__    
  8                                                   
  9 /* Attribute tables are generated from opcode     
 10 #include "inat-tables.c"                          
 11                                                   
 12 /* Attribute search APIs */                       
 13 insn_attr_t inat_get_opcode_attribute(insn_byt    
 14 {                                                 
 15         return inat_primary_table[opcode];        
 16 }                                                 
 17                                                   
 18 int inat_get_last_prefix_id(insn_byte_t last_p    
 19 {                                                 
 20         insn_attr_t lpfx_attr;                    
 21                                                   
 22         lpfx_attr = inat_get_opcode_attribute(    
 23         return inat_last_prefix_id(lpfx_attr);    
 24 }                                                 
 25                                                   
 26 insn_attr_t inat_get_escape_attribute(insn_byt    
 27                                       insn_att    
 28 {                                                 
 29         const insn_attr_t *table;                 
 30         int n;                                    
 31                                                   
 32         n = inat_escape_id(esc_attr);             
 33                                                   
 34         table = inat_escape_tables[n][0];         
 35         if (!table)                               
 36                 return 0;                         
 37         if (inat_has_variant(table[opcode]) &&    
 38                 table = inat_escape_tables[n][    
 39                 if (!table)                       
 40                         return 0;                 
 41         }                                         
 42         return table[opcode];                     
 43 }                                                 
 44                                                   
 45 insn_attr_t inat_get_group_attribute(insn_byte    
 46                                      insn_attr    
 47 {                                                 
 48         const insn_attr_t *table;                 
 49         int n;                                    
 50                                                   
 51         n = inat_group_id(grp_attr);              
 52                                                   
 53         table = inat_group_tables[n][0];          
 54         if (!table)                               
 55                 return inat_group_common_attri    
 56         if (inat_has_variant(table[X86_MODRM_R    
 57                 table = inat_group_tables[n][l    
 58                 if (!table)                       
 59                         return inat_group_comm    
 60         }                                         
 61         return table[X86_MODRM_REG(modrm)] |      
 62                inat_group_common_attribute(grp    
 63 }                                                 
 64                                                   
 65 insn_attr_t inat_get_avx_attribute(insn_byte_t    
 66                                    insn_byte_t    
 67 {                                                 
 68         const insn_attr_t *table;                 
 69         if (vex_m > X86_VEX_M_MAX || vex_p > I    
 70                 return 0;                         
 71         /* At first, this checks the master ta    
 72         table = inat_avx_tables[vex_m][0];        
 73         if (!table)                               
 74                 return 0;                         
 75         if (!inat_is_group(table[opcode]) && v    
 76                 /* If this is not a group, get    
 77                 table = inat_avx_tables[vex_m]    
 78                 if (!table)                       
 79                         return 0;                 
 80         }                                         
 81         return table[opcode];                     
 82 }                                                 
 83                                                   
 84                                                   

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