mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-08 16:36:14 +00:00
assembler: Cleanup visibility of a few global variables/functions
Not everything has to be exported out the compilation unit. Do a small cleanup pass. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
6d3d369535
commit
1d53e1813e
@ -42,6 +42,8 @@ typedef int GLint;
|
||||
typedef float GLfloat;
|
||||
|
||||
extern long int gen_level;
|
||||
extern int advanced_flag;
|
||||
extern int errors;
|
||||
|
||||
#define WARN_ALWAYS (1 << 0)
|
||||
#define WARN_ALL (1 << 31)
|
||||
|
@ -49,9 +49,6 @@ typedef struct YYLTYPE
|
||||
int last_column;
|
||||
} YYLTYPE;
|
||||
|
||||
extern long int gen_level;
|
||||
extern int advanced_flag;
|
||||
extern int yylineno;
|
||||
extern int need_export;
|
||||
static struct src_operand src_null_reg =
|
||||
{
|
||||
@ -83,29 +80,29 @@ static struct src_operand ip_src =
|
||||
};
|
||||
|
||||
static int get_type_size(GLuint type);
|
||||
int set_instruction_dest(struct brw_instruction *instr,
|
||||
static int set_instruction_dest(struct brw_instruction *instr,
|
||||
struct brw_reg *dest);
|
||||
int set_instruction_src0(struct brw_instruction *instr,
|
||||
static int set_instruction_src0(struct brw_instruction *instr,
|
||||
struct src_operand *src,
|
||||
YYLTYPE *location);
|
||||
int set_instruction_src1(struct brw_instruction *instr,
|
||||
static int set_instruction_src1(struct brw_instruction *instr,
|
||||
struct src_operand *src,
|
||||
YYLTYPE *location);
|
||||
int set_instruction_dest_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_dest_three_src(struct brw_instruction *instr,
|
||||
struct brw_reg *dest);
|
||||
int set_instruction_src0_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src0_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src);
|
||||
int set_instruction_src1_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src1_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src);
|
||||
int set_instruction_src2_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src2_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src);
|
||||
void set_instruction_options(struct brw_instruction *instr,
|
||||
static void set_instruction_options(struct brw_instruction *instr,
|
||||
struct brw_instruction *options);
|
||||
void set_instruction_predicate(struct brw_instruction *instr,
|
||||
static void set_instruction_predicate(struct brw_instruction *instr,
|
||||
struct brw_instruction *predicate);
|
||||
void set_direct_dst_operand(struct brw_reg *dst, struct brw_reg *reg,
|
||||
static void set_direct_dst_operand(struct brw_reg *dst, struct brw_reg *reg,
|
||||
int type);
|
||||
void set_direct_src_operand(struct src_operand *src, struct brw_reg *reg,
|
||||
static void set_direct_src_operand(struct src_operand *src, struct brw_reg *reg,
|
||||
int type);
|
||||
|
||||
enum message_level {
|
||||
@ -2826,9 +2823,6 @@ instoption: ALIGN1 { $$ = ALIGN1; }
|
||||
|
||||
%%
|
||||
extern int yylineno;
|
||||
extern char *input_filename;
|
||||
|
||||
int errors;
|
||||
|
||||
void yyerror (char *msg)
|
||||
{
|
||||
@ -2939,7 +2933,7 @@ static void reset_instruction_src_region(struct brw_instruction *instr,
|
||||
/**
|
||||
* Fills in the destination register information in instr from the bits in dst.
|
||||
*/
|
||||
int set_instruction_dest(struct brw_instruction *instr,
|
||||
static int set_instruction_dest(struct brw_instruction *instr,
|
||||
struct brw_reg *dest)
|
||||
{
|
||||
if (!validate_dst_reg(instr, dest))
|
||||
@ -2955,7 +2949,7 @@ int set_instruction_dest(struct brw_instruction *instr,
|
||||
}
|
||||
|
||||
/* Sets the first source operand for the instruction. Returns 0 on success. */
|
||||
int set_instruction_src0(struct brw_instruction *instr,
|
||||
static int set_instruction_src0(struct brw_instruction *instr,
|
||||
struct src_operand *src,
|
||||
YYLTYPE *location)
|
||||
{
|
||||
@ -2977,7 +2971,7 @@ int set_instruction_src0(struct brw_instruction *instr,
|
||||
|
||||
/* Sets the second source operand for the instruction. Returns 0 on success.
|
||||
*/
|
||||
int set_instruction_src1(struct brw_instruction *instr,
|
||||
static int set_instruction_src1(struct brw_instruction *instr,
|
||||
struct src_operand *src,
|
||||
YYLTYPE *location)
|
||||
{
|
||||
@ -3060,7 +3054,7 @@ static int reg_type_2_to_3(int reg_type)
|
||||
return r;
|
||||
}
|
||||
|
||||
int set_instruction_dest_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_dest_three_src(struct brw_instruction *instr,
|
||||
struct brw_reg *dest)
|
||||
{
|
||||
instr->bits1.da3src.dest_reg_file = dest->file;
|
||||
@ -3071,7 +3065,7 @@ int set_instruction_dest_three_src(struct brw_instruction *instr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_instruction_src0_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src0_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src)
|
||||
{
|
||||
if (advanced_flag) {
|
||||
@ -3084,7 +3078,7 @@ int set_instruction_src0_three_src(struct brw_instruction *instr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_instruction_src1_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src1_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src)
|
||||
{
|
||||
if (advanced_flag) {
|
||||
@ -3098,7 +3092,7 @@ int set_instruction_src1_three_src(struct brw_instruction *instr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_instruction_src2_three_src(struct brw_instruction *instr,
|
||||
static int set_instruction_src2_three_src(struct brw_instruction *instr,
|
||||
struct src_operand *src)
|
||||
{
|
||||
if (advanced_flag) {
|
||||
@ -3110,7 +3104,7 @@ int set_instruction_src2_three_src(struct brw_instruction *instr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_instruction_options(struct brw_instruction *instr,
|
||||
static void set_instruction_options(struct brw_instruction *instr,
|
||||
struct brw_instruction *options)
|
||||
{
|
||||
/* XXX: more instr options */
|
||||
@ -3121,7 +3115,7 @@ void set_instruction_options(struct brw_instruction *instr,
|
||||
options->header.compression_control;
|
||||
}
|
||||
|
||||
void set_instruction_predicate(struct brw_instruction *instr,
|
||||
static void set_instruction_predicate(struct brw_instruction *instr,
|
||||
struct brw_instruction *predicate)
|
||||
{
|
||||
instr->header.predicate_control = predicate->header.predicate_control;
|
||||
@ -3130,7 +3124,7 @@ void set_instruction_predicate(struct brw_instruction *instr,
|
||||
instr->bits2.da1.flag_subreg_nr = predicate->bits2.da1.flag_subreg_nr;
|
||||
}
|
||||
|
||||
void set_direct_dst_operand(struct brw_reg *dst, struct brw_reg *reg,
|
||||
static void set_direct_dst_operand(struct brw_reg *dst, struct brw_reg *reg,
|
||||
int type)
|
||||
{
|
||||
*dst = *reg;
|
||||
@ -3140,7 +3134,7 @@ void set_direct_dst_operand(struct brw_reg *dst, struct brw_reg *reg,
|
||||
dst->dw1.bits.writemask = BRW_WRITEMASK_XYZW;
|
||||
}
|
||||
|
||||
void set_direct_src_operand(struct src_operand *src, struct brw_reg *reg,
|
||||
static void set_direct_src_operand(struct src_operand *src, struct brw_reg *reg,
|
||||
int type)
|
||||
{
|
||||
memset(src, 0, sizeof(*src));
|
||||
|
@ -39,17 +39,12 @@
|
||||
|
||||
extern FILE *yyin;
|
||||
|
||||
extern int errors;
|
||||
|
||||
long int gen_level = 40;
|
||||
int advanced_flag = 0; /* 0: in unit of byte, 1: in unit of data element size */
|
||||
unsigned int warning_flags = WARN_ALWAYS;
|
||||
int binary_like_output = 0; /* 0: default output style, 1: nice C-style output */
|
||||
int need_export = 0;
|
||||
char *input_filename = "<stdin>";
|
||||
char *export_filename = NULL;
|
||||
|
||||
const char const *binary_prepend = "static const char gen_eu_bytes[] = {\n";
|
||||
int errors;
|
||||
|
||||
struct brw_context genasm_brw_context;
|
||||
struct brw_compile genasm_compile;
|
||||
@ -57,6 +52,11 @@ struct brw_compile genasm_compile;
|
||||
struct brw_program compiled_program;
|
||||
struct program_defaults program_defaults = {.register_type = BRW_REGISTER_TYPE_F};
|
||||
|
||||
/* 0: default output style, 1: nice C-style output */
|
||||
static int binary_like_output = 0;
|
||||
static char *export_filename = NULL;
|
||||
static const char binary_prepend[] = "static const char gen_eu_bytes[] = {\n";
|
||||
|
||||
#define HASH_SIZE 37
|
||||
|
||||
struct hash_item {
|
||||
|
Loading…
x
Reference in New Issue
Block a user