projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added Dummy node which does not CSE with anything
[libfirm]
/
ir
/
ir
/
irmode_t.h
diff --git
a/ir/ir/irmode_t.h
b/ir/ir/irmode_t.h
index
2e04a62
..
e684428
100644
(file)
--- a/
ir/ir/irmode_t.h
+++ b/
ir/ir/irmode_t.h
@@
-36,50
+36,50
@@
* ------------------------------- */
extern ir_mode *mode_P_code, *mode_P_data;
* ------------------------------- */
extern ir_mode *mode_P_code, *mode_P_data;
-static
INLINE
ir_mode *
+static
inline
ir_mode *
_get_modeP_code(void) { return mode_P_code; }
_get_modeP_code(void) { return mode_P_code; }
-static
INLINE
ir_mode *
+static
inline
ir_mode *
_get_modeP_data(void) { return mode_P_data; }
_get_modeP_data(void) { return mode_P_data; }
-static
INLINE
modecode
+static
inline ir_
modecode
_get_mode_modecode(const ir_mode *mode) { return mode->code; }
_get_mode_modecode(const ir_mode *mode) { return mode->code; }
-static
INLINE
ident *
+static
inline
ident *
_get_mode_ident(const ir_mode *mode) { return mode->name; }
_get_mode_ident(const ir_mode *mode) { return mode->name; }
-static
INLINE
mode_sort
-_get_mode_sort(const ir_mode
*
mode) { return mode->sort; }
+static
inline ir_
mode_sort
+_get_mode_sort(const ir_mode
*
mode) { return mode->sort; }
-static
INLINE int
+static
inline unsigned
_get_mode_size_bits(const ir_mode *mode) { return mode->size; }
_get_mode_size_bits(const ir_mode *mode) { return mode->size; }
-static
INLINE int
+static
inline unsigned
_get_mode_size_bytes(const ir_mode *mode) {
_get_mode_size_bytes(const ir_mode *mode) {
-
int
size = _get_mode_size_bits(mode);
- if ((size & 7) != 0) return -1;
+
unsigned
size = _get_mode_size_bits(mode);
+ if ((size & 7) != 0) return
(unsigned)
-1;
return size >> 3;
}
return size >> 3;
}
-static
INLINE
int
+static
inline
int
_get_mode_sign(const ir_mode *mode) { return mode->sign; }
_get_mode_sign(const ir_mode *mode) { return mode->sign; }
-static
INLINE
mode_arithmetic
+static
inline ir_
mode_arithmetic
_get_mode_arithmetic(const ir_mode *mode) { return mode->arithmetic; }
_get_mode_arithmetic(const ir_mode *mode) { return mode->arithmetic; }
-static
INLINE
unsigned int
+static
inline
unsigned int
_get_mode_modulo_shift(const ir_mode *mode) { return mode->modulo_shift; }
_get_mode_modulo_shift(const ir_mode *mode) { return mode->modulo_shift; }
-static
INLINE
unsigned int
+static
inline
unsigned int
_get_mode_vector_elems(const ir_mode *mode) { return mode->vector_elem; }
_get_mode_vector_elems(const ir_mode *mode) { return mode->vector_elem; }
-static
INLINE
void *
+static
inline
void *
_get_mode_link(const ir_mode *mode) { return mode->link; }
_get_mode_link(const ir_mode *mode) { return mode->link; }
-static
INLINE
void
+static
inline
void
_set_mode_link(ir_mode *mode, void *l) { mode->link = l; }
_set_mode_link(ir_mode *mode, void *l) { mode->link = l; }
-/* Functions to check, whether a modecode is signed, float, int, num, data,
+/* Functions to check, whether a
ir_
modecode is signed, float, int, num, data,
datab or dataM. For more exact definitions read the corresponding pages
in the firm documentation or the following enumeration
datab or dataM. For more exact definitions read the corresponding pages
in the firm documentation or the following enumeration
@@
-116,62
+116,53
@@
_set_mode_link(ir_mode *mode, void *l) { mode->link = l; }
= {data || irm_M}
*/
= {data || irm_M}
*/
-static
INLINE
int
+static
inline
int
_mode_is_signed(const ir_mode *mode) {
_mode_is_signed(const ir_mode *mode) {
- assert(mode);
return mode->sign;
}
return mode->sign;
}
-static
INLINE
int
+static
inline
int
_mode_is_float(const ir_mode *mode) {
_mode_is_float(const ir_mode *mode) {
- assert(mode);
return (_get_mode_sort(mode) == irms_float_number);
}
return (_get_mode_sort(mode) == irms_float_number);
}
-static
INLINE
int
+static
inline
int
_mode_is_int(const ir_mode *mode) {
_mode_is_int(const ir_mode *mode) {
- assert(mode);
return (_get_mode_sort(mode) == irms_int_number);
}
return (_get_mode_sort(mode) == irms_int_number);
}
-static
INLINE
int
+static
inline
int
_mode_is_reference(const ir_mode *mode) {
_mode_is_reference(const ir_mode *mode) {
- assert(mode);
return (_get_mode_sort(mode) == irms_reference);
}
return (_get_mode_sort(mode) == irms_reference);
}
-static
INLINE
int
+static
inline
int
_mode_is_num(const ir_mode *mode) {
_mode_is_num(const ir_mode *mode) {
- assert(mode);
- return (_mode_is_int(mode) || _mode_is_float(mode));
+ return (_get_mode_sort(mode) & irmsh_is_num);
}
}
-static
INLINE
int
+static
inline
int
_mode_is_data(const ir_mode *mode) {
_mode_is_data(const ir_mode *mode) {
- return (_
mode_is_int(mode) || _mode_is_float(mode) || _mode_is_reference(mode)
);
+ return (_
get_mode_sort(mode) & irmsh_is_data
);
}
}
-static
INLINE
int
+static
inline
int
_mode_is_datab(const ir_mode *mode) {
_mode_is_datab(const ir_mode *mode) {
- assert(mode);
- return (_mode_is_data(mode) || _get_mode_sort(mode) == irms_internal_boolean);
+ return (_get_mode_sort(mode) & irmsh_is_datab);
}
}
-static
INLINE
int
+static
inline
int
_mode_is_dataM(const ir_mode *mode) {
_mode_is_dataM(const ir_mode *mode) {
- assert(mode);
- return (_mode_is_data(mode) || _get_mode_modecode(mode) == irm_M);
+ return (_get_mode_sort(mode) & irmsh_is_dataM);
}
}
-static
INLINE
int
+static
inline
int
_mode_is_float_vector(const ir_mode *mode) {
_mode_is_float_vector(const ir_mode *mode) {
- assert(mode);
return (_get_mode_sort(mode) == irms_float_number) && (_get_mode_vector_elems(mode) > 1);
}
return (_get_mode_sort(mode) == irms_float_number) && (_get_mode_vector_elems(mode) > 1);
}
-static
INLINE
int
+static
inline
int
_mode_is_int_vector(const ir_mode *mode) {
_mode_is_int_vector(const ir_mode *mode) {
- assert(mode);
return (_get_mode_sort(mode) == irms_int_number) && (_get_mode_vector_elems(mode) > 1);
}
return (_get_mode_sort(mode) == irms_int_number) && (_get_mode_vector_elems(mode) > 1);
}