X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firmode_t.h;h=720c3426007d4eb320714b19d094690a3d1213b5;hb=d2dc2564b47d9c113d7e6e598574e9733627fcca;hp=6e79a80eda0e27fc622d396ed82f99975659424b;hpb=f53e1622344be40b9f08d0a208ca920794851837;p=libfirm diff --git a/ir/ir/irmode_t.h b/ir/ir/irmode_t.h index 6e79a80ed..720c34260 100644 --- a/ir/ir/irmode_t.h +++ b/ir/ir/irmode_t.h @@ -18,6 +18,7 @@ # ifndef _IRMODE_T_H_ # define _IRMODE_T_H_ +# include # include "irmode.h" # include "tv.h" @@ -54,16 +55,13 @@ struct ir_mode { /* ------------------------------- * * inline functions * * ------------------------------- */ -extern ir_mode *mode_P_mach; +extern ir_mode *mode_P_code, *mode_P_data; static INLINE ir_mode * -_get_modeP_mach(void) { return mode_P_mach; } +_get_modeP_code(void) { return mode_P_code; } -static INLINE void -_set_modeP_mach(ir_mode *p) { - assert(mode_is_reference(p)); - mode_P_mach = p; -} +static INLINE ir_mode * +_get_modeP_data(void) { return mode_P_data; } static INLINE modecode _get_mode_modecode(const ir_mode *mode) { return mode->code; } @@ -104,7 +102,7 @@ _set_mode_link(ir_mode *mode, void *l) { mode->link = l; } /* Functions to check, whether a modecode is signed, float, int, num, data, datab or dataM. For more exact definitions read the corresponding pages - in the firm documentation or the followingenumeration + in the firm documentation or the following enumeration The set of "float" is defined as: --------------------------------- @@ -217,8 +215,8 @@ void init_mode(void); /** mode module finalization. frees all memory. */ void finish_mode(void); -#define get_modeP_mach() _get_modeP_mach() -#define set_modeP_mach(p) _set_modeP_mach(p) +#define get_modeP_code() _get_modeP_code() +#define get_modeP_data() _get_modeP_data() #define get_mode_modecode(mode) _get_mode_modecode(mode) #define get_mode_ident(mode) _get_mode_ident(mode) #define get_mode_sort(mode) _get_mode_sort(mode)