Immediate constants now work, though still not shared.

This commit is contained in:
Bill Currie 2011-01-28 21:39:01 +09:00
parent 3c95667b79
commit bc7d42d176

View file

@ -90,8 +90,13 @@ get_operand_def (operand_t *op)
//FIXME share immediates //FIXME share immediates
def = new_def (".imm", ev_types[op->type], pr.near_data, def = new_def (".imm", ev_types[op->type], pr.near_data,
st_static); st_static);
memcpy (D_POINTER (pr_type_t, def), &op->o.value, if (op->type == ev_string) {
pr_type_size[op->type]); EMIT_STRING (def->space, D_STRUCT (string_t, def),
op->o.value->v.string_val);
} else {
memcpy (D_POINTER (pr_type_t, def), &op->o.value->v,
pr_type_size[op->type]);
}
return def; return def;
case op_label: case op_label:
zero_def.type = &type_short; zero_def.type = &type_short;