X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftv%2Ftv.h;h=8ed8a5490db577e0b03207b57c7b289fbf715dce;hb=2d09549421b49587d4680a94dab277646e9fef44;hp=0818fcff060675159dd2dec7fe24921450e414de;hpb=9baefde54f2ead26b55343ac69c837688f1e0f83;p=libfirm diff --git a/ir/tv/tv.h b/ir/tv/tv.h index 0818fcff0..8ed8a5490 100644 --- a/ir/tv/tv.h +++ b/ir/tv/tv.h @@ -215,24 +215,6 @@ long double get_tarval_double(tarval *tv); */ int tarval_is_double(tarval *tv); -/** - * Construct a tarval that represents the address of the entity. - * - * The address must be constant, the entity must have as owner the global type. - * We no more support this function: Use the new SymConst instead. -tarval *new_tarval_from_entity (entity *ent, ir_mode *mode); - */ - -/** - * Returns the associated entity of a tarval. Asserts if tarval does not - * contain an entity. -entity *get_tarval_entity(tarval *tv); - */ - -/** - * Returns non-zero if a the given tarval represents an entity. -int tarval_is_entity(tarval *tv); - */ /** ********** Access routines for tarval fields ********** **/ @@ -336,6 +318,22 @@ tarval *get_tarval_inf(ir_mode *mode); /* ******************** Arithmethic operations on tarvals ******************** */ +typedef enum _tarval_int_overflow_mode_t { + TV_OVERFLOW_BAD, /**< tarval module will return tarval_bad if a overflow occurs */ + TV_OVERFLOW_WRAP, /**< tarval module will overflow will be ignored, wrap around occurs */ + TV_OVERFLOW_SATURATE /**< tarval module will saturate the overflow */ +} tarval_int_overflow_mode_t; + +/** + * Sets the overflow mode for integer operations. + */ +void tarval_set_integer_overflow_mode(tarval_int_overflow_mode_t ov_mode); + +/** + * Get the overflow mode for integer operations. + */ +tarval_int_overflow_mode_t tarval_get_integer_overflow_mode(void); + /** * Compares two tarvals * @@ -454,6 +452,9 @@ tarval *tarval_shrs(tarval *a, tarval *b); /** Rotation. */ tarval *tarval_rot(tarval *a, tarval *b); +/** Carry flag of the last operation */ +int tarval_carry(void); + /* *********** Output of tarvals *********** */ /**