-/*
- * Copyright (C) 2012, 2013, 2014
- * Wolfgang Bumiller
- *
- * 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, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS 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.
- */
#ifndef GMQCC_IR_HDR
#define GMQCC_IR_HDR
#include "gmqcc.h"
} 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_BLOCK_COVERAGE = 1 << 5,
+ 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),
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
* <outtype>%label := opcode a, b
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;