mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 03:46:00 +02:00
+ sanity checks in mips and sparc register allocator
This commit is contained in:
parent
c6874df5c8
commit
03f4685455
@ -150,7 +150,7 @@ implementation
|
||||
else
|
||||
InternalError(2013061003);
|
||||
end;
|
||||
if get_alias(getsupreg(instr.oper[1]^.reg))=orgreg then
|
||||
if (getregtype(instr.oper[1]^.reg)=regtype) and (get_alias(getsupreg(instr.oper[1]^.reg))=orgreg) then
|
||||
begin
|
||||
case instr.opcode of
|
||||
A_MOVE: instr.opcode:=A_LW;
|
||||
@ -160,7 +160,7 @@ implementation
|
||||
InternalError(2013061004);
|
||||
end;
|
||||
end
|
||||
else if get_alias(getsupreg(instr.oper[0]^.reg))=orgreg then
|
||||
else if (getregtype(instr.oper[0]^.reg)=regtype) and (get_alias(getsupreg(instr.oper[0]^.reg))=orgreg) then
|
||||
begin
|
||||
case instr.opcode of
|
||||
A_MOVE: instr.opcode:=A_SW;
|
||||
|
@ -207,7 +207,7 @@ implementation
|
||||
(getregtype(instr.oper[1]^.reg)<>regtype) then
|
||||
exit;
|
||||
opidx:=-1;
|
||||
if get_alias(getsupreg(instr.oper[0]^.reg))=orgreg then
|
||||
if (getregtype(instr.oper[0]^.reg)=regtype) and (get_alias(getsupreg(instr.oper[0]^.reg))=orgreg) then
|
||||
begin
|
||||
if (regtype=R_INTREGISTER) then
|
||||
instr.opcode:=A_LD_R
|
||||
@ -217,7 +217,7 @@ implementation
|
||||
instr.opcode:=A_LDDF;
|
||||
opidx:=0;
|
||||
end
|
||||
else if get_alias(getsupreg(instr.oper[1]^.reg))=orgreg then
|
||||
else if (getregtype(instr.oper[1]^.reg)=regtype) and (get_alias(getsupreg(instr.oper[1]^.reg))=orgreg) then
|
||||
begin
|
||||
if (regtype=R_INTREGISTER) then
|
||||
instr.opcode:=A_ST_R
|
||||
|
Loading…
Reference in New Issue
Block a user