Commit 7eef29cd authored by Matthias Braun's avatar Matthias Braun
Browse files

irmode: record bit size for non-arithmetic data modes

parent 81a9ef29
......@@ -111,7 +111,7 @@ FIRM_API ir_mode *new_float_mode(const char *name,
* Creates a new mode for data values which are not used to perform arithmetic.
* Arithmetic will be set to irma_none.
*/
FIRM_API ir_mode *new_non_arithmetic_mode(const char *name);
FIRM_API ir_mode *new_non_arithmetic_mode(const char *name, unsigned bit_size);
/** Returns the ident* of the mode */
FIRM_API ident *get_mode_ident(const ir_mode *mode);
......
......@@ -329,7 +329,7 @@ static void arm_init(void)
{
arm_mode_gp = new_int_mode("arm_gp", irma_twos_complement,
ARM_MACHINE_SIZE, 0, ARM_MODULO_SHIFT);
arm_mode_flags = new_non_arithmetic_mode("arm_flags");
arm_mode_flags = new_non_arithmetic_mode("arm_flags", 32);
arm_register_init();
arm_create_opcodes(&arm_irn_ops);
......
......@@ -1480,8 +1480,8 @@ static void ia32_init(void)
init_asm_constraints();
ia32_mode_fpcw = new_non_arithmetic_mode("fpcw");
ia32_mode_flags = new_non_arithmetic_mode("flags");
ia32_mode_fpcw = new_non_arithmetic_mode("fpcw", 16);
ia32_mode_flags = new_non_arithmetic_mode("flags", 32);
/* note mantissa is 64bit but with explicitely encoded 1 so the really
* usable part as counted by firm is only 63 bits */
......
......@@ -200,9 +200,9 @@ ir_mode *new_float_mode(const char *name, ir_mode_arithmetic arithmetic,
return register_mode(result);
}
ir_mode *new_non_arithmetic_mode(const char *name)
ir_mode *new_non_arithmetic_mode(const char *name, unsigned bit_size)
{
ir_mode *result = alloc_mode(name, irms_data, irma_none, 0, 0, 0);
ir_mode *result = alloc_mode(name, irms_data, irma_none, bit_size, 0, 0);
return register_mode(result);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment