diff options
Diffstat (limited to 'assembler/gen4asm.h')
-rw-r--r-- | assembler/gen4asm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index aa380e1d..aeb2b9cc 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -137,6 +137,7 @@ typedef struct { enum assembler_instruction_type { GEN4ASM_INSTRUCTION_GEN, + GEN4ASM_INSTRUCTION_GEN_RELOCATABLE, GEN4ASM_INSTRUCTION_LABEL, }; @@ -144,6 +145,12 @@ struct label_instruction { char *name; }; +struct relocatable_instruction { + struct brw_instruction gen; + char *first_reloc_target, *second_reloc_target; // JIP and UIP respectively + GLint first_reloc_offset, second_reloc_offset; // in number of instructions +}; + /** * This structure is just the list container for instructions accumulated by * the parser and labels. @@ -153,6 +160,7 @@ struct brw_program_instruction { unsigned inst_offset; union { struct brw_instruction gen; + struct relocatable_instruction reloc; struct label_instruction label; } instruction; struct brw_program_instruction *next; @@ -169,6 +177,11 @@ static inline char *label_name(struct brw_program_instruction *i) return i->instruction.label.name; } +static inline bool is_relocatable(struct brw_program_instruction *intruction) +{ + return intruction->type == GEN4ASM_INSTRUCTION_GEN_RELOCATABLE; +} + /** * This structure is a list of instructions. It is the final output of the * parser. |