X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftv%2Fstrcalc.h;h=8d74b8158bfeff751963e64c49c1d2a46d791b50;hb=64252961a7d41265ff28353949e63f0662a1cd03;hp=2f0294e8376362a0e5f9d6a94746b40feb867a03;hpb=226176ca6c81ef05c7232af425c218ab57e5314a;p=libfirm diff --git a/ir/tv/strcalc.h b/ir/tv/strcalc.h index 2f0294e83..8d74b8158 100644 --- a/ir/tv/strcalc.h +++ b/ir/tv/strcalc.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -22,8 +22,7 @@ * @brief Provides basic mathematical operations on values represented as strings. * @date 2003 * @author Mathias Heil - * @version $Id$ - * @summary + * @brief * * The module uses a string to represent values, and provides operations * to perform calculations with these values. @@ -107,6 +106,11 @@ void sc_neg(const void *value, void *buffer); */ void sc_and(const void *value1, const void *value2, void *buffer); +/** + * buffer = value1 & ~value2 + */ +void sc_andnot(const void *value1, const void *value2, void *buffer); + /** * buffer = value1 | value2 */ @@ -163,6 +167,11 @@ void sc_shrI(const void *val1, long shift_cnt, int bitsize, int sign, void *buff */ void sc_shr(const void *value1, const void *value2, int bitsize, int sign, void *buffer); +/** + * buffer = value1 >>s offset + */ +void sc_shrsI(const void *val1, long shift_cnt, int bitsize, int sign, void *buffer); + /** * buffer = value1 >>s value2 */ @@ -186,8 +195,12 @@ int sc_get_buffer_length(void); void sign_extend(void *buffer, ir_mode *mode); -/** create an value form a string representation */ -void sc_val_from_str(const char *str, unsigned int len, void *buffer, ir_mode *mode); +/** + * create an value form a string representation + * @return 1 if ok, 0 in case of parse error + */ +int sc_val_from_str(char sign, unsigned base, const char *str, + size_t len, void *buffer); /** create a value from a long */ void sc_val_from_long(long l, void *buffer);