Moved unused macro from .h to _t.h
[libfirm] / ir / tv / tv.h
index c4d6a32..14cecd5 100644 (file)
@@ -39,8 +39,8 @@ Discussion of new interface, proposals by Prof. Waite:
 
 */
 
-#ifndef _TV_H
-#define _TV_H
+#ifndef _TV_H_
+#define _TV_H_
 
 # include "irmode.h"
 # include "entity.h"
@@ -112,11 +112,16 @@ unsigned tarval_hash (tarval *);
 /* ************************ Constructors for tarvals ************************ */
 tarval *tarval_Z_from_str (const char *, size_t, int base);
 tarval *tarval_B_from_str (const char *, size_t);
+tarval *tarval_f_from_str (const char *, size_t);
 tarval *tarval_d_from_str (const char *, size_t);
 tarval *tarval_s_from_str (const char *, size_t);
 tarval *tarval_S_from_str (const char *, size_t);
+tarval *tarval_int_from_str (const char *, size_t, int base, ir_mode *m);
 tarval *tarval_from_long  (ir_mode *, long);
+
 tarval *tarval_p_from_str (const char *);
+/* The tarval represents the address of the entity.  As the address must
+   be constant the entity must have as owner the global type. */
 tarval *tarval_p_from_entity (entity *);
 
 tarval *tarval_convert_to (tarval *, ir_mode *);
@@ -131,22 +136,22 @@ tarval *tarval_cancel (void); /* returns tarval_bad */
 \f
 /* The flags for projecting a comparison result */
 typedef enum {
-  irpn_False=0,                /* false */
-  irpn_Eq,             /* equal */
-  irpn_Lt,             /* less */
-  irpn_Le,             /* less or equal */
-  irpn_Gt,             /* greater */
-  irpn_Ge,             /* greater of equal */
-  irpn_Lg,             /* less or greater */
-  irpn_Leg,            /* less, equal or greater = ordered */
-  irpn_Uo,             /* unordered */
-  irpn_Ue,             /* unordered or equal */
-  irpn_Ul,             /* unordered or less */
-  irpn_Ule,            /* unordered, less or equal */
-  irpn_Ug,             /* unordered or greater */
-  irpn_Uge,            /* unordered, greater or equal */
-  irpn_Ne,             /* unordered, less or greater = not equal */
-  irpn_True,           /* true */
+  irpn_False=0,                /* 0000 false */
+  irpn_Eq,             /* 0001 equal */
+  irpn_Lt,             /* 0010 less */
+  irpn_Le,             /* 0011 less or equal */
+  irpn_Gt,             /* 0100 greater */
+  irpn_Ge,             /* 0101 greater of equal */
+  irpn_Lg,             /* 0110 less or greater */
+  irpn_Leg,            /* 0111 less, equal or greater = ordered */
+  irpn_Uo,             /* 1000 unordered */
+  irpn_Ue,             /* 1001 unordered or equal */
+  irpn_Ul,             /* 1010 unordered or less */
+  irpn_Ule,            /* 1011 unordered, less or equal */
+  irpn_Ug,             /* 1100 unordered or greater */
+  irpn_Uge,            /* 1101 unordered, greater or equal */
+  irpn_Ne,             /* 1110 unordered, less or greater = not equal */
+  irpn_True,           /* 1111 true */
   irpn_notmask = irpn_Leg
 } ir_pncmp;
 
@@ -189,19 +194,11 @@ bool     tv_val_b (tarval *tv);
 tarval_B tv_val_B (tarval *tv);
 tarval_s tv_val_s (tarval *tv);
 
-#ifdef NDEBUG
-#define TARVAL_VRFY(val) ((void)0)
-#else
-#define TARVAL_VRFY(val) _tarval_vrfy ((val))
-extern void _tarval_vrfy (const tarval *);
-#endif
-
-#ifdef STATS
-void tarval_stats (void);
-#else
-#define tarval_stats() ((void)0)
-#endif
-
 ir_mode *get_tv_mode (tarval *tv);
+/* Returns the entity if the tv is a pointer to an entity, else
+   returns NULL; */
+entity *get_tv_entity(tarval *tv);
 
-#endif
+/* Returns 0 if tv is positive, else > 0. @@@ not tested! */
+int tv_is_negative(tarval *a);
+#endif  /* _TV_H_ */