X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=ir.h;h=cdf097bed4e17d31a2da7fc41a28e16497a7b93a;hp=1d3503872efefb16a0d6328d822b82f0e76a5e19;hb=b640049912e2a8caa5164a9718ad5a7903600d70;hpb=1d745fd1f9b0448a00140cef0b68d9a3aa73f1f1 diff --git a/ir.h b/ir.h index 1d35038..cdf097b 100644 --- a/ir.h +++ b/ir.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2013 + * Copyright (C) 2012, 2013, 2014, 2015 * Wolfgang Bumiller * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -43,11 +43,14 @@ typedef struct { } ir_life_entry_t; enum { - IR_FLAG_HAS_ARRAYS = 1 << 0, - IR_FLAG_HAS_UNINITIALIZED = 1 << 1, - IR_FLAG_HAS_GOTO = 1 << 2, - IR_FLAG_INCLUDE_DEF = 1 << 3, - IR_FLAG_ERASEABLE = 1 << 4, + IR_FLAG_HAS_ARRAYS = 1 << 0, + IR_FLAG_HAS_UNINITIALIZED = 1 << 1, + IR_FLAG_HAS_GOTO = 1 << 2, + IR_FLAG_INCLUDE_DEF = 1 << 3, + IR_FLAG_ERASABLE = 1 << 4, + IR_FLAG_BLOCK_COVERAGE = 1 << 5, + + IR_FLAG_SPLIT_VECTOR = 1 << 6, IR_FLAG_LAST, IR_FLAG_MASK_NO_OVERLAP = (IR_FLAG_HAS_ARRAYS | IR_FLAG_HAS_UNINITIALIZED), @@ -169,6 +172,7 @@ bool GMQCC_WARN ir_block_create_store_op(ir_block*, lex_ctx_t, int op, ir_value bool GMQCC_WARN ir_block_create_storep(ir_block*, lex_ctx_t, ir_value *target, ir_value *what); ir_value* ir_block_create_load_from_ent(ir_block*, lex_ctx_t, const char *label, ir_value *ent, ir_value *field, int outype); ir_value* ir_block_create_fieldaddress(ir_block*, lex_ctx_t, const char *label, ir_value *entity, ir_value *field); +bool GMQCC_WARN ir_block_create_state_op(ir_block*, lex_ctx_t, ir_value *frame, ir_value *think); /* This is to create an instruction of the form * %label := opcode a, b @@ -252,6 +256,7 @@ struct ir_builder_s { ir_function **functions; ir_value **globals; ir_value **fields; + ir_value **const_floats; /* for reusing them in vector-splits, TODO: sort this or use a radix-tree */ ht htfunctions; ht htglobals; @@ -273,6 +278,7 @@ struct ir_builder_s { /* there should just be this one nil */ ir_value *nil; ir_value *reserved_va_count; + ir_value *coverage_func; /* some virtual instructions require temps, and their code is isolated * so that we don't need to keep track of their liveness. */