|
@@ -123,7 +123,8 @@ implementation
|
|
|
case ops of
|
|
|
1 :
|
|
|
begin
|
|
|
- if (oper[0]^.typ=top_reg) then
|
|
|
+ if (oper[0]^.typ=top_reg) and
|
|
|
+ (getregtype(oper[n+0]^.reg)=regtype) then
|
|
|
begin
|
|
|
if get_alias(getsupreg(oper[0]^.reg))<>orgreg then
|
|
|
internalerror(200410101);
|
|
@@ -142,21 +143,16 @@ implementation
|
|
|
if ops=3 then
|
|
|
n:=1;
|
|
|
if (oper[n+0]^.typ=top_reg) and
|
|
|
- (oper[n+1]^.typ=top_reg) and
|
|
|
- (get_alias(getsupreg(oper[n+0]^.reg))<>get_alias(getsupreg(oper[n+1]^.reg))) then
|
|
|
+ (oper[n+1]^.typ=top_reg) then
|
|
|
begin
|
|
|
- { One of the arguments shall be able to be replaced }
|
|
|
if (getregtype(oper[n+0]^.reg)=regtype) and
|
|
|
(get_alias(getsupreg(oper[n+0]^.reg))=orgreg) then
|
|
|
replaceoper:=0+n
|
|
|
- else
|
|
|
- if (getregtype(oper[n+1]^.reg)=regtype) and
|
|
|
- (get_alias(getsupreg(oper[n+1]^.reg))=orgreg) then
|
|
|
- replaceoper:=1+n
|
|
|
- else
|
|
|
- internalerror(200704281);
|
|
|
- end;
|
|
|
- if (oper[n+0]^.typ=top_reg) and
|
|
|
+ else if (getregtype(oper[n+1]^.reg)=regtype) and
|
|
|
+ (get_alias(getsupreg(oper[n+1]^.reg))=orgreg) then
|
|
|
+ replaceoper:=1+n;
|
|
|
+ end
|
|
|
+ else if (oper[n+0]^.typ=top_reg) and
|
|
|
(oper[n+1]^.typ=top_const) then
|
|
|
begin
|
|
|
if (getregtype(oper[0+n]^.reg)=regtype) and
|
|
@@ -164,8 +160,8 @@ implementation
|
|
|
replaceoper:=0+n
|
|
|
else
|
|
|
internalerror(200704282);
|
|
|
- end;
|
|
|
- if (oper[n+0]^.typ=top_const) and
|
|
|
+ end
|
|
|
+ else if (oper[n+0]^.typ=top_const) and
|
|
|
(oper[n+1]^.typ=top_reg) then
|
|
|
begin
|
|
|
if (getregtype(oper[1+n]^.reg)=regtype) and
|