Commit 3f9156da authored by Matthias Braun's avatar Matthias Braun
Browse files

amd64: support frame entities as immediates

parent 664cda3b
......@@ -617,9 +617,7 @@ static void perform_address_matching(ir_node *ptr, int *arity,
{
x86_address_t maddr;
memset(&maddr, 0, sizeof(maddr));
x86_create_address_mode(&maddr, ptr, x86_create_am_normal);
assert(maddr.frame_entity == NULL);
if (maddr.base != NULL) {
int base_input = (*arity)++;
......@@ -635,7 +633,16 @@ static void perform_address_matching(ir_node *ptr, int *arity,
} else {
addr->index_input = NO_INPUT;
}
if (maddr.frame_entity != NULL) {
assert(maddr.entity == NULL);
addr->immediate.entity = maddr.frame_entity;
/* not supported yet */
assert(!is_parameter_entity(maddr.frame_entity)
|| get_entity_parameter_number(maddr.frame_entity)
!= IR_VA_START_PARAMETER_NUMBER);
} else {
addr->immediate.entity = maddr.entity;
}
addr->immediate.offset = maddr.offset;
addr->log_scale = maddr.scale;
}
......
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