X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firreflect.h;h=781f4a102274c52d5c2248205cf8b04eda350fc0;hb=cb91bddc9cacdab7c28e4336847bd3dc248aa549;hp=b9394833460906a2f51418be96c24aa93008cf06;hpb=16d8de24b7945a58705aa754530955768ca35486;p=libfirm diff --git a/ir/ir/irreflect.h b/ir/ir/irreflect.h index b93948334..781f4a102 100644 --- a/ir/ir/irreflect.h +++ b/ir/ir/irreflect.h @@ -4,7 +4,11 @@ * @author Sebastian Hack * @brief Reflection for Firm operations. * +<<<<<<< irreflect.h * $Id$ +======= + * $Id$ +>>>>>>> 1.2 */ #ifndef __REFLECT_H @@ -62,24 +66,9 @@ typedef struct { must be the same. If false, they can differ. */ } rflct_arg_t; -typedef unsigned int rflct_mode_set_t; - -#define rflct_modeset_contains(mode_set,modecode) \ - (((mode_set) & (1 << modecode)) != 0) - -#define rflct_modeset_issubset(s1,s2) \ - (((s1) & (s2)) == (s1)) - -#define rflct_modeset_union(s1,s2) \ - ((s1) | (s2)) - -#define rflct_modeset_intersect(s1,s2) \ - ((s1) & (s2)) - -#define rflct_modeset_diff(s1,s2) \ - ((s1) & ~(s2)) - +#define RFLCT_ARG_IS_A(arg,modes) (((arg)->accepted_modes & modes) != 0) #define RFLCT_ARG_VALID(arg) ((arg)->name != NULL) +#define RFLCT_SIG_VALID(sig) ((sig) != INT_MAX) /** * Get the mode class for an IR mode. @@ -143,8 +132,23 @@ const rflct_arg_t *rflct_get_in_args(opcode opc, int sig); */ const rflct_arg_t *rflct_get_out_args(opcode opc, int sig); +/** + * Make a string representation of a signature of an opcode. + * @param buf The buffer to put the string to. + * @param n The size of buf. + * @param opc The opcode. + * @param sig The signature. + * @return buf. + */ char *rflct_to_string(char *buf, int n, opcode opc, int sig); +/** + * Get a string representation of a mode class. + * @param str The buffer to put the string to. + * @param n The size of the buffer. + * @param mc The mode class. + * @return str. + */ char *rflct_mode_class_name(char *str, int n, rflct_mode_class_t mc); #endif