* fixed <= and >= for sets

This commit is contained in:
Jonas Maebe 1999-08-23 10:35:13 +00:00
parent 618547adf0
commit 1ef759bc9a

View File

@ -378,42 +378,33 @@ implementation
{$EndIf NoSetInclusion} {$EndIf NoSetInclusion}
: begin : begin
cmpop:=true; cmpop:=true;
{$IfNDef regallocfix}
del_location(p^.left^.location); del_location(p^.left^.location);
del_location(p^.right^.location); del_location(p^.right^.location);
pushusedregisters(pushedregs,$ff); pushusedregisters(pushedregs,$ff);
{$EndIf regallocfix}
{$IfNDef NoSetInclusion} {$IfNDef NoSetInclusion}
If (p^.treetype in [equaln, unequaln, lten]) Then If (p^.treetype in [equaln, unequaln, lten]) Then
Begin Begin
{$EndIf NoSetInclusion} {$EndIf NoSetInclusion}
emitpushreferenceaddr(p^.right^.location.reference); emitpushreferenceaddr(p^.right^.location.reference);
{$IfDef regallocfix}
del_location(p^.right^.location);
{$EndIf regallocfix}
emitpushreferenceaddr(p^.left^.location.reference); emitpushreferenceaddr(p^.left^.location.reference);
{$IfDef regallocfix}
del_location(p^.left^.location);
{$EndIf regallocfix}
{$IfNDef NoSetInclusion} {$IfNDef NoSetInclusion}
End End
Else {gten = lten, if the arguments are reversed} Else {gten = lten, if the arguments are reversed}
Begin Begin
emitpushreferenceaddr(p^.left^.location.reference); emitpushreferenceaddr(p^.left^.location.reference);
{$IfDef regallocfix}
del_location(p^.left^.location);
{$EndIf regallocfix}
emitpushreferenceaddr(p^.right^.location.reference); emitpushreferenceaddr(p^.right^.location.reference);
{$IfDef regallocfix}
del_location(p^.right^.location);
{$EndIf regallocfix}
End; End;
Case p^.treetype of Case p^.treetype of
equaln, unequaln: equaln, unequaln:
{$EndIf NoSetInclusion} {$EndIf NoSetInclusion}
emitcall('FPC_SET_COMP_SETS'); emitcall('FPC_SET_COMP_SETS');
{$IfNDef NoSetInclusion} {$IfNDef NoSetInclusion}
lten, gten: emitcall('FPC_SET_CONTAINS_SETS') lten, gten:
Begin
emitcall('FPC_SET_CONTAINS_SETS');
{ we need a jne afterwards, not a jnbe/jnae }
p^.treetype := equaln;
End;
End; End;
{$EndIf NoSetInclusion} {$EndIf NoSetInclusion}
maybe_loadesi; maybe_loadesi;
@ -954,7 +945,7 @@ implementation
Case p^.treetype of Case p^.treetype of
lten,gten: lten,gten:
Begin Begin
If p^.treetype = gten then If p^.treetype = lten then
swaptree(p); swaptree(p);
if p^.left^.location.loc in [LOC_MEM,LOC_REFERENCE] then if p^.left^.location.loc in [LOC_MEM,LOC_REFERENCE] then
begin begin
@ -2122,7 +2113,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.74 1999-08-19 13:08:43 pierre Revision 1.75 1999-08-23 10:35:13 jonas
* fixed <= and >= for sets
Revision 1.74 1999/08/19 13:08:43 pierre
* emit_??? used * emit_??? used
Revision 1.73 1999/08/07 11:29:26 peter Revision 1.73 1999/08/07 11:29:26 peter