* added support for BI and BO fields for branches

* correct spilling for FP values

git-svn-id: trunk@2143 -
This commit is contained in:
tom_at_work 2006-01-03 21:07:39 +00:00
parent 1318b959e0
commit 4b48a8880f
2 changed files with 37 additions and 7 deletions

View File

@ -430,12 +430,26 @@ end;
function spilling_create_load(const ref: treference; r: tregister): tai;
begin
result := taicpu.op_reg_ref(A_LD, r, ref);
case getregtype(r) of
R_INTREGISTER:
result:=taicpu.op_reg_ref(A_LD,r,ref);
R_FPUREGISTER:
result:=taicpu.op_reg_ref(A_LFD,r,ref);
else
internalerror(2005123101);
end;
end;
function spilling_create_store(r: tregister; const ref: treference): tai;
begin
result := taicpu.op_reg_ref(A_STD, r, ref);
case getregtype(r) of
R_INTREGISTER:
result:=taicpu.op_reg_ref(A_STD,r,ref);
R_FPUREGISTER:
result:=taicpu.op_reg_ref(A_STFD,r,ref);
else
internalerror(2005123102);
end;
end;
procedure InitAsm;

View File

@ -678,11 +678,27 @@ end;
procedure tppcattreader.ConvertCalljmp(instr: tppcinstruction);
begin
if instr.Operands[1].opr.typ = OPR_REFERENCE then
begin
instr.Operands[1].opr.ref.refaddr := addr_full;
if (instr.Operands[1].opr.ref.base <> NR_NO) or
(instr.Operands[1].opr.ref.index <> NR_NO) then
if instr.Operands[1].opr.typ = OPR_CONSTANT then begin
if (instr.operands[1].opr.val > 31) or
(instr.operands[2].opr.typ <> OPR_CONSTANT) or
(instr.operands[2].opr.val > 31) or
not(instr.operands[3].opr.typ in [OPR_REFERENCE,OPR_SYMBOL]) then
Message(asmr_e_syn_operand);
{ BO/BI notation }
instr.condition.simple := false;
instr.condition.bo := instr.operands[1].opr.val;
instr.condition.bi := instr.operands[2].opr.val;
instr.operands[1].free;
instr.operands[2].free;
instr.operands[2] := nil;
instr.operands[1] := instr.operands[3];
instr.operands[3] := nil;
instr.ops := 1;
end;
if instr.Operands[1].opr.typ = OPR_REFERENCE then begin
instr.Operands[1].opr.ref.refaddr:=addr_full;
if (instr.Operands[1].opr.ref.base<>NR_NO) or
(instr.Operands[1].opr.ref.index<>NR_NO) then
Message(asmr_e_syn_operand);
end;
end;