|
@@ -101,22 +101,18 @@ implementation
|
|
|
|
|
|
procedure tcgsetelementnode.pass_generate_code;
|
|
procedure tcgsetelementnode.pass_generate_code;
|
|
begin
|
|
begin
|
|
- { load first value in 32bit register }
|
|
|
|
- secondpass(left);
|
|
|
|
- if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
|
|
|
|
- hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,u32inttype,false);
|
|
|
|
|
|
+ { load first value in 32bit register }
|
|
|
|
+ secondpass(left);
|
|
|
|
+ if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
|
|
|
|
+ hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,u32inttype,false);
|
|
|
|
|
|
- { also a second value ? }
|
|
|
|
|
|
+ { also a second value ? }
|
|
if assigned(right) then
|
|
if assigned(right) then
|
|
- begin
|
|
|
|
- secondpass(right);
|
|
|
|
- if codegenerror then
|
|
|
|
- exit;
|
|
|
|
- if right.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
|
|
|
|
- hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,u32inttype,false);
|
|
|
|
- end;
|
|
|
|
|
|
+ internalerror(2015111106);
|
|
|
|
|
|
- { we doesn't modify the left side, we check only the type }
|
|
|
|
|
|
+ { we don't modify the left side, we only check the location type; our
|
|
|
|
+ parent node (an add-node) will use the resulting location to perform
|
|
|
|
+ the set operation without creating an intermediate set }
|
|
location_copy(location,left.location);
|
|
location_copy(location,left.location);
|
|
end;
|
|
end;
|
|
|
|
|