Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
7eef29cd
Commit
7eef29cd
authored
Dec 07, 2014
by
Matthias Braun
Browse files
irmode: record bit size for non-arithmetic data modes
parent
81a9ef29
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irmode.h
View file @
7eef29cd
...
...
@@ -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
);
...
...
ir/be/arm/bearch_arm.c
View file @
7eef29cd
...
...
@@ -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
);
...
...
ir/be/ia32/bearch_ia32.c
View file @
7eef29cd
...
...
@@ -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 */
...
...
ir/ir/irmode.c
View file @
7eef29cd
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment