changed signature of sign_extend()
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 31 Jul 2007 15:23:12 +0000 (15:23 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 31 Jul 2007 15:23:12 +0000 (15:23 +0000)
[r15392]

ir/tv/strcalc.c
ir/tv/strcalc.h

index 698483e..fefa802 100644 (file)
@@ -924,10 +924,11 @@ int sc_get_buffer_length(void) {
 /**
  * Do sign extension if the mode is signed, otherwise to zero extension.
  */
-void sign_extend(char *calc_buffer, ir_mode *mode) {
-       int bits    = get_mode_size_bits(mode) - 1;
-       int nibble  = bits >> 2;
-       int max     = max_digit[bits & 3];
+void sign_extend(void *buffer, ir_mode *mode) {
+       char *calc_buffer = buffer;
+       int bits          = get_mode_size_bits(mode) - 1;
+       int nibble        = bits >> 2;
+       int max           = max_digit[bits & 3];
        int i;
 
        if (mode_is_signed(mode)) {
index dedcfbf..3a854c5 100644 (file)
@@ -163,7 +163,7 @@ void sc_rot(const void *value1, const void *value2, int radius, int sign, void *
 const void *sc_get_buffer(void);
 int sc_get_buffer_length(void);
 
-void sign_extend(char *calc_buffer, ir_mode *mode);
+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);