also generate _y and _z data for fieldpointers

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-11 19:34:58 +02:00
parent 228b3cca41
commit bb1f38de5d

8
ir.c
View file

@ -2150,10 +2150,18 @@ static bool gen_global_field(ir_value *global)
/* copy the field's value */
ir_value_code_setaddr(global, code_globals_add(code_globals_data[fld->code.globaladdr]));
if (global->fieldtype == TYPE_VECTOR) {
code_globals_add(code_globals_data[fld->code.globaladdr]+1);
code_globals_add(code_globals_data[fld->code.globaladdr]+2);
}
}
else
{
ir_value_code_setaddr(global, code_globals_add(0));
if (global->fieldtype == TYPE_VECTOR) {
code_globals_add(0);
code_globals_add(0);
}
}
if (global->code.globaladdr < 0)
return false;