Commit 24489bec authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

new mode class questioning methods

[r1247]
parent 3888789d
...@@ -206,7 +206,7 @@ static ir_mode *register_mode(ir_mode* new_mode) ...@@ -206,7 +206,7 @@ static ir_mode *register_mode(ir_mode* new_mode)
*/ */
ir_mode *new_ir_mode(const char *name, mode_sort sort, int bit_size, int align, int sign) ir_mode *new_ir_mode(const char *name, mode_sort sort, int bit_size, int align, int sign)
{ {
ir_mode mode_tmpl, *res; ir_mode mode_tmpl;
mode_tmpl.name = new_id_from_str(name); mode_tmpl.name = new_id_from_str(name);
mode_tmpl.sort = sort; mode_tmpl.sort = sort;
...@@ -411,6 +411,20 @@ mode_is_int (ir_mode *mode) ...@@ -411,6 +411,20 @@ mode_is_int (ir_mode *mode)
return (get_mode_sort(mode) == irms_int_number); return (get_mode_sort(mode) == irms_int_number);
} }
int mode_is_character (ir_mode *mode)
{
ANNOUNCE();
assert(mode);
return (get_mode_sort(mode) == irms_character);
}
int mode_is_reference (ir_mode *mode)
{
ANNOUNCE();
assert(mode);
return (get_mode_sort(mode) == irms_reference);
}
int int
mode_is_num (ir_mode *mode) mode_is_num (ir_mode *mode)
{ {
......
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