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:
Károly Balogh 2015-12-13 19:24:44 +00:00
parent c82328e3fd
commit aa424fc81f

View File

@ -176,7 +176,7 @@ interface
for i:=RS_FP0 to RS_FP7 do
begin
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;
delete(hs,length(hs),1);
getopstr := hs;
@ -216,7 +216,8 @@ interface
end;
top_const:
getopstr_jmp:=tostr(o.val);
else internalerror(200405022);
else
internalerror(200405022);
end;
end;
@ -228,7 +229,6 @@ interface
function getopcodestring(hp : tai) : string;
var
op : tasmop;
s : string;
begin
op:=taicpu(hp).opcode;
{ old versions of GAS don't like PEA.L and LEA.L }
@ -237,26 +237,16 @@ interface
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_SNE,A_SPL,A_ST,A_SVC,A_SVS,A_SF]) then
s:=gas_op2str[op]
result:=gas_op2str[op]
else
if op in [A_SXX, A_FSXX] then
s:=gas_op2str[op]+cond2str[taicpu(hp).condition]
{ Scc/FScc is always BYTE, DBRA/DBcc is always WORD, doesn't need opsize (KB) }
if op in [A_SXX, A_FSXX, A_DBXX, A_DBRA] then
result:=gas_op2str[op]+cond2str[taicpu(hp).condition]
else
{ size of DBRA is always WORD, doesn't need opsize (KB) }
if op = A_DBRA then
s:=gas_op2str[op]+cond2str[taicpu(hp).condition]
if op in [a_bxx,a_fbxx] then
result:=gas_op2str[op]+cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
else
if op in [a_dbxx,a_bxx,a_fbxx] then
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;
result:=gas_op2str[op]+gas_opsize2str[taicpu(hp).opsize];
end;