|
@@ -207,26 +207,30 @@ begin
|
|
|
if codegenerror then
|
|
|
exit;
|
|
|
|
|
|
- { Explicit typecasts from any ordinal type to a boolean type }
|
|
|
- { must not change the ordinal value }
|
|
|
- if (nf_explicit in flags) and
|
|
|
- not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
|
|
- begin
|
|
|
- location_copy(location,left.location);
|
|
|
- newsize:=def_cgsize(resultdef);
|
|
|
- { change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
|
|
- if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
|
|
- ((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
|
|
- hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,true)
|
|
|
- else
|
|
|
- location.size:=newsize;
|
|
|
- current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
|
|
- current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
|
|
- exit;
|
|
|
- end;
|
|
|
+ { Explicit typecasts from any ordinal type to a boolean type }
|
|
|
+ { must not change the ordinal value }
|
|
|
+ if (nf_explicit in flags) and
|
|
|
+ not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
|
|
+ begin
|
|
|
+ location_copy(location,left.location);
|
|
|
+ newsize:=def_cgsize(resultdef);
|
|
|
+ { change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
|
|
+ if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
|
|
+ ((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
|
|
+ hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,true)
|
|
|
+ else
|
|
|
+ location.size:=newsize;
|
|
|
+ current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
|
|
+ current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
|
|
+ exit;
|
|
|
+ end;
|
|
|
|
|
|
location_reset(location, LOC_REGISTER, def_cgsize(resultdef));
|
|
|
opsize := def_cgsize(left.resultdef);
|
|
|
+
|
|
|
+ if (left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF]) then
|
|
|
+ hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,true);
|
|
|
+
|
|
|
case left.location.loc of
|
|
|
LOC_CREFERENCE, LOC_REFERENCE, LOC_REGISTER, LOC_CREGISTER:
|
|
|
begin
|