Commit 13913717 authored by Matthias Braun's avatar Matthias Braun
Browse files

x86: always accept 32bit immediates for address mode

parent 45fd0eec
......@@ -29,8 +29,15 @@ static bitset_t *non_address_mode_nodes;
static bool tarval_possible(ir_tarval *tv)
ir_mode *mode = get_tarval_mode(tv);
if (get_mode_size_bits(mode) <= 32) {
return true;
if (!tarval_is_long(tv))
return false;
/* immediates on x86_64 are at most 32bit and get sign extended */
long val = get_tarval_long(tv);
int32_t val32 = (long)val;
return val == (long)val32;
Supports Markdown
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