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

use length parameter and not sc_get_buffer_length

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