|
@@ -511,28 +511,27 @@ type
|
|
|
|
|
|
function taicpu.spilling_get_operation_type(opnr: longint): topertype;
|
|
|
begin
|
|
|
+ result:=operand_read;
|
|
|
+
|
|
|
case opcode of
|
|
|
- A_MOVE, A_MOVEQ, A_ADD, A_ADDQ, A_ADDX, A_SUB, A_SUBQ, A_SUBX,
|
|
|
+ A_MOVE, A_MOVEQ, A_MOVEA:
|
|
|
+ if opnr=1 then
|
|
|
+ result:=operand_write;
|
|
|
+ A_ADD, A_ADDQ, A_ADDX, A_SUB, A_SUBQ, A_SUBX,
|
|
|
A_AND, A_LSR, A_LSL, A_ASR, A_ASL, A_EOR, A_EORI, A_OR,
|
|
|
A_MULS, A_MULU, A_DIVS, A_DIVU, A_DIVSL, A_DIVUL:
|
|
|
- if opnr=1 then begin
|
|
|
- result:=operand_write;
|
|
|
- end else begin
|
|
|
- result:=operand_read;
|
|
|
- end;
|
|
|
+ if opnr=1 then
|
|
|
+ result:=operand_readwrite;
|
|
|
A_DBRA:
|
|
|
- if opnr=1 then begin
|
|
|
+ if opnr=0 then
|
|
|
result:=operand_readwrite;
|
|
|
- end else begin
|
|
|
- result:=operand_read;
|
|
|
- end;
|
|
|
- A_TST,A_CMP,A_CMPI:
|
|
|
- result:=operand_read;
|
|
|
A_CLR, A_SXX, A_SEQ, A_SNE, A_SLT, A_SLE, A_SGT, A_SGE, A_SCS, A_SCC,
|
|
|
A_SMI, A_SPL, A_SF, A_ST, A_SVS, A_SVC, A_SHI, A_SLS:
|
|
|
result:=operand_write;
|
|
|
- A_NEG, A_EXT, A_EXTB, A_NOT, A_NEGX:
|
|
|
+ A_NEG, A_NEGX, A_EXT, A_EXTB, A_NOT:
|
|
|
result:=operand_readwrite;
|
|
|
+ A_TST,A_CMP,A_CMPI:
|
|
|
+ begin end; { Do nothing, default operand_read is fine here. }
|
|
|
else begin
|
|
|
{ TODO: FIX ME!!! remove ugly debug code ... }
|
|
|
writeln('M68K: unknown opcode when spilling: ',gas_op2str[opcode]);
|