Commit e1d6901b authored by Michael Beck's avatar Michael Beck
Browse files

changed signature of sign_extend()

[r15392]
parent 1bdd3d86
......@@ -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)) {
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment