Commit 09e0ebc7 authored by Michael Beck's avatar Michael Beck
Browse files

mode_wrap_around() added

CVS---------------------------------------------------------------------

[r6075]
parent d16af32d
......@@ -960,6 +960,18 @@ int mode_overflow_on_unary_Minus(const ir_mode *mode)
return 1;
}
/*
* Returns non-zero if the mode has a reversed wrap-aound
* logic, especially (a + x) - x == a.
*
* This is normally true for integer modes, not for floating
* point modes.
*/
int mode_wrap_around(const ir_mode *mode) {
/* FIXME: better would be an extra mode property */
return mode_is_int(mode);
}
void finish_mode(void) {
obstack_free(&modes, 0);
......
......@@ -452,4 +452,12 @@ int mode_honor_signed_zeros(const ir_mode *mode);
*/
int mode_overflow_on_unary_Minus(const ir_mode *mode);
/**
* Returns non-zero if the mode has a reversed wrap-aound
* logic, especially (a + x) - x == a.
* This is normally true for integer modes, not for floating
* point modes.
*/
int mode_wrap_around(const ir_mode *mode);
#endif /* _IRMODE_H_ */
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