mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
m68k: use R_SUBNONE instead of R_SUBWHOLE for FPU regs, indentation fixes of some old code and various cleanups
git-svn-id: trunk@32659 -
This commit is contained in:
parent
c82328e3fd
commit
aa424fc81f
@ -176,7 +176,7 @@ interface
|
|||||||
for i:=RS_FP0 to RS_FP7 do
|
for i:=RS_FP0 to RS_FP7 do
|
||||||
begin
|
begin
|
||||||
if i in o.fpuregset^ then
|
if i in o.fpuregset^ then
|
||||||
hs:=hs+gas_regname(newreg(R_FPUREGISTER,i,R_SUBWHOLE))+'/';
|
hs:=hs+gas_regname(newreg(R_FPUREGISTER,i,R_SUBNONE))+'/';
|
||||||
end;
|
end;
|
||||||
delete(hs,length(hs),1);
|
delete(hs,length(hs),1);
|
||||||
getopstr := hs;
|
getopstr := hs;
|
||||||
@ -204,19 +204,20 @@ interface
|
|||||||
hs:=o.ref^.symbol.name
|
hs:=o.ref^.symbol.name
|
||||||
else
|
else
|
||||||
hs:='';
|
hs:='';
|
||||||
if o.ref^.offset>0 then
|
if o.ref^.offset>0 then
|
||||||
hs:=hs+'+'+tostr(o.ref^.offset)
|
hs:=hs+'+'+tostr(o.ref^.offset)
|
||||||
else
|
else
|
||||||
if o.ref^.offset<0 then
|
if o.ref^.offset<0 then
|
||||||
hs:=hs+tostr(o.ref^.offset)
|
hs:=hs+tostr(o.ref^.offset)
|
||||||
else
|
else
|
||||||
if not(assigned(o.ref^.symbol)) then
|
if not(assigned(o.ref^.symbol)) then
|
||||||
hs:=hs+'0';
|
hs:=hs+'0';
|
||||||
getopstr_jmp:=hs;
|
getopstr_jmp:=hs;
|
||||||
end;
|
end;
|
||||||
top_const:
|
top_const:
|
||||||
getopstr_jmp:=tostr(o.val);
|
getopstr_jmp:=tostr(o.val);
|
||||||
else internalerror(200405022);
|
else
|
||||||
|
internalerror(200405022);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -228,35 +229,24 @@ interface
|
|||||||
function getopcodestring(hp : tai) : string;
|
function getopcodestring(hp : tai) : string;
|
||||||
var
|
var
|
||||||
op : tasmop;
|
op : tasmop;
|
||||||
s : string;
|
|
||||||
begin
|
begin
|
||||||
op:=taicpu(hp).opcode;
|
op:=taicpu(hp).opcode;
|
||||||
{ old versions of GAS don't like PEA.L and LEA.L }
|
{ old versions of GAS don't like PEA.L and LEA.L }
|
||||||
if (op in [
|
if (op in [
|
||||||
A_LEA,A_PEA,A_ABCD,A_BCHG,A_BCLR,A_BSET,A_BTST,
|
A_LEA,A_PEA,A_ABCD,A_BCHG,A_BCLR,A_BSET,A_BTST,
|
||||||
A_EXG,A_NBCD,A_SBCD,A_SWAP,A_TAS,A_SCC,A_SCS,
|
A_EXG,A_NBCD,A_SBCD,A_SWAP,A_TAS,A_SCC,A_SCS,
|
||||||
A_SEQ,A_SGE,A_SGT,A_SHI,A_SLE,A_SLS,A_SLT,A_SMI,
|
A_SEQ,A_SGE,A_SGT,A_SHI,A_SLE,A_SLS,A_SLT,A_SMI,
|
||||||
A_SNE,A_SPL,A_ST,A_SVC,A_SVS,A_SF]) then
|
A_SNE,A_SPL,A_ST,A_SVC,A_SVS,A_SF]) then
|
||||||
s:=gas_op2str[op]
|
result:=gas_op2str[op]
|
||||||
else
|
else
|
||||||
if op in [A_SXX, A_FSXX] then
|
{ Scc/FScc is always BYTE, DBRA/DBcc is always WORD, doesn't need opsize (KB) }
|
||||||
s:=gas_op2str[op]+cond2str[taicpu(hp).condition]
|
if op in [A_SXX, A_FSXX, A_DBXX, A_DBRA] then
|
||||||
|
result:=gas_op2str[op]+cond2str[taicpu(hp).condition]
|
||||||
else
|
else
|
||||||
{ size of DBRA is always WORD, doesn't need opsize (KB) }
|
if op in [a_bxx,a_fbxx] then
|
||||||
if op = A_DBRA then
|
result:=gas_op2str[op]+cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
|
||||||
s:=gas_op2str[op]+cond2str[taicpu(hp).condition]
|
|
||||||
else
|
else
|
||||||
if op in [a_dbxx,a_bxx,a_fbxx] then
|
result:=gas_op2str[op]+gas_opsize2str[taicpu(hp).opsize];
|
||||||
s:=gas_op2str[op]+cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
|
|
||||||
else
|
|
||||||
s:=gas_op2str[op]+gas_opsize2str[taicpu(hp).opsize];
|
|
||||||
if op = A_FMOVE then
|
|
||||||
begin
|
|
||||||
{$ifdef DEBUG_CHARLIE}
|
|
||||||
writeln('fmove! opsize:',dword(taicpu(hp).opsize));
|
|
||||||
{$endif DEBUG_CHARLIE}
|
|
||||||
end;
|
|
||||||
getopcodestring:=s;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user