Commit 5a756c76 authored by Matthias Braun's avatar Matthias Braun
Browse files

use length parameter and not sc_get_buffer_length

[r15833]
parent c7310bd4
...@@ -168,9 +168,11 @@ static tarval *get_tarval(const void *value, int length, ir_mode *mode) { ...@@ -168,9 +168,11 @@ static tarval *get_tarval(const void *value, int length, ir_mode *mode) {
if (length > 0) { if (length > 0) {
/* if there already is such a value, it is returned, else value /* if there already is such a value, it is returned, else value
* is copied into the set */ * is copied into the set */
char *temp = alloca(sc_get_buffer_length()); char *temp = alloca(length);
memcpy(temp, value, sc_get_buffer_length()); memcpy(temp, value, length);
sign_extend(temp, mode); if(mode_is_float(mode)) {
sign_extend(temp, mode);
}
tv.value = INSERT_VALUE(temp, length); tv.value = INSERT_VALUE(temp, length);
} else { } else {
tv.value = value; tv.value = value;
......
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