<commit_before>/**************************************************************************
 * 
 * Copyright 2008 Tungsten Graphics, Inc., <NAME>, Texas.
 * All Rights Reserved.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * 
 **************************************************************************/

#include "util/u_debug.h"
#include "tgsi_info.h"

static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{
   { 1, 1, 0, 0, "ARL" },
   { 1, 1, 0, 0, "MOV" },
   { 1, 1, 0, 0, "LIT" },
   { 1, 1, 0, 0, "RCP", "RECIP" },
   { 1, 1, 0, 0, "RSQ", "RECIPSQRT" },
   { 1, 1, 0, 0, "EXP", "EXPP" },
   { 1, 1, 0, 0, "LOG" },
   { 1, 2, 0, 0, "MUL" },
   { 1, 2, 0, 0, "ADD" },
   { 1, 2, 0, 0, "DP3", "DOT3" },
   { 1, 2, 0, 0, "DP4", "DOT4" },
   { 1, 2, 0, 0, "DST" },
   { 1, 2, 0, 0, "MIN" },
   { 1, 2, 0, 0, "MAX" },
   { 1, 2, 0, 0, "SLT", "SETLT" },
   { 1, 2, 0, 0, "SGE", "SETGE" },
   { 1, 3, 0, 0, "MAD", "MADD" },
   { 1, 2, 0, 0, "SUB" },
   { 1, 3, 0, 0, "LRP", "LERP" },
   { 1, 3, 0, 0, "CND" },
   { 1, 3, 0, 0, "CND0" },
   { 1, 3, 0, 0, "DP2A", "DP2ADD", "DOT2ADD" },
   { 1, 2, 0, 0, "INDEX" },
   { 1, 1, 0, 0, "NEGATE" },
   { 1, 1, 0, 0, "FRC", "FRAC" },
   { 1, 3, 0, 0, "CLAMP" },
   { 1, 1, 0, 0, "FLR", "FLOOR" },
   { 1, 1, 0, 0, "ROUND" },
   { 1, 1, 0, 0, "EX2", "EXPBASE2" },
   { 1, 1, 0, 0, "LG2", "LOGBASE2", "LOGP" },
   { 1, 2, 0, 0, "POW", "POWER" },
   { 1, 2, 0, 0, "XPD", "CRS", "CROSSPRODUCT" },
   { 1, 2, 0, 0, "M4X4", "MULTIPLYMATRIX" },
   { 1, 1, 0, 0, "ABS" },
   { 1, 1, 0, 0, "RCC" },
   { 1, 2, 0, 0, "DPH" },
   { 1, 1, 0, 0, "COS" },
   { 1, 1, 0, 0, "DDX", "DSX" },
   { 1, 1, 0, 0, "DDY", "DSY" },
   { 0, 0, 0, 0, "KILP" },
   { 1, 1, 0, 0, "PK2H" },
   { 1, 1, 0, 0, "PK2US" },
   { 1, 1, 0, 0, "PK4B" },
   { 1, 1, 0, 0, "PK4UB" },
   { 1, 2, 0, 0, "RFL" },
   { 1, 2, 0, 0, "SEQ" },
   { 1, 2, 0, 0, "SFL" },
   { 1, 2, 0, 0, "SGT" },
   { 1, 1, 0, 0, "SIN" },
   { 1, 2, 0, 0, "SLE" },
   { 1, 2, 0, 0, "SNE" },
   { 1, 2, 0, 0, "STR" },
   { 1, 2, 1, 0, "TEX", "TEXLD" },
   { 1, 4, 1, 0, "TXD", "TEXLDD" },
   { 1, 2, 1, 0, "TXP" },
   { 1, 1, 0, 0, "UP2H" },
   { 1, 1, 0, 0, "UP2US" },
   { 1, 1, 0, 0, "UP4B" },
   { 1, 1, 0, 0, "UP4UB" },
   { 1, 3, 0, 0, "X2D" },
   { 1, 1, 0, 0, "ARA" },
   { 1, 1, 0, 0, "ARR", "MOVA" },
   { 0, 1, 0, 0, "BRA" },
   { 0, 0, 0, 1, "CAL", "CALL" },
   { 0, 0, 0, 0, "RET" },
   { 1, 1, 0, 0, "SGN", "SSG" },
   { 1, 3, 0, 0, "CMP" },
   { 1, 1, 0, 0, "SCS", "SINCOS" },
   { 1, 2, 1, 0, "TXB", "TEXLDB" },
   { 1, 1, 0, 0, "NRM" },
   { 1, 2, 0, 0, "DIV" },
   { 1, 2, 0, 0, "DP2" },
   { 1, 2, 1, 0, "TXL" },
   { 0, 0, 0, 0, "BRK", "BREAK" },
   { 0, 1, 0, 1, "IF" },
   { 0, 0, 0, 0, "LOOP" },
   { 0, 1, 0, 0, "REP" },
   { 0, 0, 0, 1, "ELSE" },
   { 0, 0, 0, 0, "ENDIF" },
   { 0, 0, 0, 0, "ENDLOOP" },
   { 0, 0, 0, 0, "ENDREP" },
   { 0, 1, 0, 0, "PUSHA" },
   { 1, 0, 0, 0, "POPA" },
   { 1, 1, 0, 0, "CEIL" },
   { 1, 1, 0, 0, "I2F" },
   { 1, 1, 0, 0, "NOT" },
   { 1, 1, 0, 0, "INT", "TRUNC" },
   { 1, 2, 0, 0, "SHL" },
   { 1, 2, 0, 0, "SHR" },
   { 1, 2, 0, 0, "AND" },
   { 1, 2, 0, 0, "OR" },
   { 1, 2, 0, 0, "MOD" },
   { 1, 2, 0, 0, "XOR" },
   { 1, 3, 0, 0, "SAD" },
   { 1, 2, 1, 0, "TXF" },
   { 1, 2, 1, 0, "TXQ" },
   { 0, 0, 0, 0, "CONT" },
   { 0, 0, 0, 0, "EMIT" },
   { 0, 0, 0, 0, "ENDPRIM" },
   { 0, 0, 0, 1, "BGNLOOP2" },
   { 0, 0, 0, 0, "BGNSUB" },
   { 0, 0, 0, 1, "ENDLOOP2" },
   { 0, 0, 0, 0, "ENDSUB" },
   { 1, 1, 0, 0, "NOISE1" },
   { 1, 1, 0, 0, "NOISE2" },
   { 1, 1, 0, 0, "NOISE3" },
   { 1, 1, 0, 0, "NOISE4" },
   { 0, 0, 0, 0, "NOP" },
   { 1, 2, 0, 0, "M4X3" },
   { 1, 2, 0, 0, "M3X4" },
   { 1, 2, 0, 0, "M3X3" },
   { 1, 2, 0, 0, "M3X2" },
   { 1, 1, 0, 0, "NRM4" },
   { 0, 1, 0, 0, "CALLNZ" },
   { 0, 1, 0, 0, "IFC" },
   { 0, 1, 0, 0, "BREAKC" },
   { 0, 1, 0, 0, "KIL", "TEXKILL" },
   { 0, 0, 0, 0, "END" },
   { 1, 1, 0, 0, "SWZ" }
};

const struct tgsi_opcode_info *
tgsi_get_opcode_info( uint opcode )
{
   if (opcode < TGSI_OPCODE_LAST)
      return &opcode_info[opcode];
   assert( 0 );
   return NULL;<commit_msg>tgsi: Fix structure members initialisation.<commit_after>/**************************************************************************
 * 
 * Copyright 2008 Tungsten Graphics, Inc., <NAME>, Texas.
 * All Rights Reserved.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * 
 **************************************************************************/

#include "util/u_debug.h"
#include "tgsi_info.h"

static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{
   { 1, 1, 0, 0, "ARL", NULL, NULL },
   { 1, 1, 0, 0, "MOV", NULL, NULL },
   { 1, 1, 0, 0, "LIT", NULL, NULL },
   { 1, 1, 0, 0, "RCP", "RECIP", NULL },
   { 1, 1, 0, 0, "RSQ", "RECIPSQRT", NULL },
   { 1, 1, 0, 0, "EXP", "EXPP", NULL },
   { 1, 1, 0, 0, "LOG", NULL, NULL },
   { 1, 2, 0, 0, "MUL", NULL, NULL },
   { 1, 2, 0, 0, "ADD", NULL, NULL },
   { 1, 2, 0, 0, "DP3", "DOT3", NULL },
   { 1, 2, 0, 0, "DP4", "DOT4", NULL },
   { 1, 2, 0, 0, "DST", NULL, NULL },
   { 1, 2, 0, 0, "MIN", NULL, NULL },
   { 1, 2, 0, 0, "MAX", NULL, NULL },
   { 1, 2, 0, 0, "SLT", "SETLT", NULL },
   { 1, 2, 0, 0, "SGE", "SETGE", NULL },
   { 1, 3, 0, 0, "MAD", "MADD", NULL },
   { 1, 2, 0, 0, "SUB", NULL, NULL },
   { 1, 3, 0, 0, "LRP", "LERP", NULL },
   { 1, 3, 0, 0, "CND", NULL, NULL },
   { 1, 3, 0, 0, "CND0", NULL, NULL },
   { 1, 3, 0, 0, "DP2A", "DP2ADD", "DOT2ADD" },
   { 1, 2, 0, 0, "INDEX", NULL, NULL },
   { 1, 1, 0, 0, "NEGATE", NULL, NULL },
   { 1, 1, 0, 0, "FRC", "FRAC", NULL },
   { 1, 3, 0, 0, "CLAMP", NULL, NULL },
   { 1, 1, 0, 0, "FLR", "FLOOR", NULL },
   { 1, 1, 0, 0, "ROUND", NULL, NULL },
   { 1, 1, 0, 0, "EX2", "EXPBASE2", NULL },
   { 1, 1, 0, 0, "LG2", "LOGBASE2", "LOGP" },
   { 1, 2, 0, 0, "POW", "POWER", NULL },
   { 1, 2, 0, 0, "XPD", "CRS", "CROSSPRODUCT" },
   { 1, 2, 0, 0, "M4X4", "MULTIPLYMATRIX", NULL },
   { 1, 1, 0, 0, "ABS", NULL, NULL },
   { 1, 1, 0, 0, "RCC", NULL, NULL },
   { 1, 2, 0, 0, "DPH", NULL, NULL },
   { 1, 1, 0, 0, "COS", NULL, NULL },
   { 1, 1, 0, 0, "DDX", "DSX", NULL },
   { 1, 1, 0, 0, "DDY", "DSY", NULL },
   { 0, 0, 0, 0, "KILP", NULL, NULL },
   { 1, 1, 0, 0, "PK2H", NULL, NULL },
   { 1, 1, 0, 0, "PK2US", NULL, NULL },
   { 1, 1, 0, 0, "PK4B", NULL, NULL },
   { 1, 1, 0, 0, "PK4UB", NULL, NULL },
   { 1, 2, 0, 0, "RFL", NULL, NULL },
   { 1, 2, 0, 0, "SEQ", NULL, NULL },
   { 1, 2, 0, 0, "SFL", NULL, NULL },
   { 1, 2, 0, 0, "SGT", NULL, NULL },
   { 1, 1, 0, 0, "SIN", NULL, NULL },
   { 1, 2, 0, 0, "SLE", NULL, NULL },
   { 1, 2, 0, 0, "SNE", NULL, NULL },
   { 1, 2, 0, 0, "STR", NULL, NULL },
   { 1, 2, 1, 0, "TEX", "TEXLD", NULL },
   { 1, 4, 1, 0, "TXD", "TEXLDD", NULL },
   { 1, 2, 1, 0, "TXP", NULL, NULL },
   { 1, 1, 0, 0, "UP2H", NULL, NULL },
   { 1, 1, 0, 0, "UP2US", NULL, NULL },
   { 1, 1, 0, 0, "UP4B", NULL, NULL },
   { 1, 1, 0, 0, "UP4UB", NULL, NULL },
   { 1, 3, 0, 0, "X2D", NULL, NULL },
   { 1, 1, 0, 0, "ARA", NULL, NULL },
   { 1, 1, 0, 0, "ARR", "MOVA", NULL },
   { 0, 1, 0, 0, "BRA", NULL, NULL },
   { 0, 0, 0, 1, "CAL", "CALL", NULL },
   { 0, 0, 0, 0, "RET", NULL, NULL },
   { 1, 1, 0, 0, "SGN", "SSG", NULL },
   { 1, 3, 0, 0, "CMP", NULL, NULL },
   { 1, 1, 0, 0, "SCS", "SINCOS", NULL },
   { 1, 2, 1, 0, "TXB", "TEXLDB", NULL },
   { 1, 1, 0, 0, "NRM", NULL, NULL },
   { 1, 2, 0, 0, "DIV", NULL, NULL },
   { 1, 2, 0, 0, "DP2", NULL, NULL },
   { 1, 2, 1, 0, "TXL", NULL, NULL },
   { 0, 0, 0, 0, "BRK", "BREAK", NULL },
   { 0, 1, 0, 1, "IF", NULL, NULL },
   { 0, 0, 0, 0, "LOOP", NULL, NULL },
   { 0, 1, 0, 0, "REP", NULL, NULL },
   { 0, 0, 0, 1, "ELSE", NULL, NULL },
   { 0, 0, 0, 0, "ENDIF", NULL, NULL },
   { 0, 0, 0, 0, "ENDLOOP", NULL, NULL },
   { 0, 0, 0, 0, "ENDREP", NULL, NULL },
   { 0, 1, 0, 0, "PUSHA", NULL, NULL },
   { 1, 0, 0, 0, "POPA", NULL, NULL },
   { 1, 1, 0, 0, "CEIL", NULL, NULL },
   { 1, 1, 0, 0, "I2F", NULL, NULL },
   { 1, 1, 0, 0, "NOT", NULL, NULL },
   { 1, 1, 0, 0, "INT", "TRUNC", NULL },
   { 1, 2, 0, 0, "SHL", NULL, NULL },
   { 1, 2, 0, 0, "SHR", NULL, NULL },
   { 1, 2, 0, 0, "AND", NULL, NULL },
   { 1, 2, 0, 0, "OR", NULL, NULL },
   { 1, 2, 0, 0, "MOD", NULL, NULL },
   { 1, 2, 0, 0, "XOR", NULL, NULL },
   { 1, 3, 0, 0, "SAD", NULL, NULL },
   { 1, 2, 1, 0, "TXF", NULL, NULL },
   { 1, 2, 1, 0, "TXQ", NULL, NULL },
   { 0, 0, 0, 0, "CONT", NULL, NULL },
   { 0, 0, 0, 0, "EMIT", NULL, NULL },
   { 0, 0, 0, 0, "ENDPRIM", NULL, NULL },
   { 0, 0, 0, 1, "BGNLOOP2", NULL, NULL },
   { 0, 0, 0, 0, "BGNSUB", NULL, NULL },
   { 0, 0, 0, 1, "ENDLOOP2", NULL, NULL },
   { 0, 0, 0, 0, "ENDSUB", NULL, NULL },
   { 1, 1, 0, 0, "NOISE1", NULL, NULL },
   { 1, 1, 0, 0, "NOISE2", NULL, NULL },
   { 1, 1, 0, 0, "NOISE3", NULL, NULL },
   { 1, 1, 0, 0, "NOISE4", NULL, NULL },
   { 0, 0, 0, 0, "NOP", NULL, NULL },
   { 1, 2, 0, 0, "M4X3", NULL, NULL },
   { 1, 2, 0, 0, "M3X4", NULL, NULL },
   { 1, 2, 0, 0, "M3X3", NULL, NULL },
   { 1, 2, 0, 0, "M3X2", NULL, NULL },
   { 1, 1, 0, 0, "NRM4", NULL, NULL },
   { 0, 1, 0, 0, "CALLNZ", NULL, NULL },
   { 0, 1, 0, 0, "IFC", NULL, NULL },
   { 0, 1, 0, 0, "BREAKC", NULL, NULL },
   { 0, 1, 0, 0, "KIL", "TEXKILL", NULL },
   { 0, 0, 0, 0, "END", NULL, NULL },
   { 1, 1, 0, 0, "SWZ", NULL, NULL }
};

const struct tgsi_opcode_info *
tgsi_get_opcode_info( uint opcode )
{
   if (opcode < TGSI_OPCODE_LAST)
      return &opcode_info[opcode];
   assert( 0 );
   return NULL;
{'fraction_non_alphanumeric': 0.2622781320006893, 'fraction_numerical': 0.08978114768223333, 'mean_word_length': 2.5735837438423643, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4214089', 'n_tokens_mistral': 6335, 'n_tokens_neox': 5307, 'n_words': 1867}