diff options
Diffstat (limited to 'compiler/m68k/aasmcpu.pas')
-rw-r--r-- | compiler/m68k/aasmcpu.pas | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/compiler/m68k/aasmcpu.pas b/compiler/m68k/aasmcpu.pas index c9689eea24..f2d0f34104 100644 --- a/compiler/m68k/aasmcpu.pas +++ b/compiler/m68k/aasmcpu.pas @@ -464,6 +464,7 @@ type result:=operand_read; case opcode of + // CPU opcodes A_MOVE, A_MOVEQ, A_MOVEA, A_MVZ, A_MVS, A_MOV3Q, A_LEA: if opnr=1 then result:=operand_write; @@ -479,10 +480,21 @@ type 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_NEGX, A_EXT, A_EXTB, A_NOT: + A_NEG, A_NEGX, A_EXT, A_EXTB, A_NOT, A_SWAP: result:=operand_readwrite; A_TST,A_CMP,A_CMPI: begin end; { Do nothing, default operand_read is fine here. } + + // FPU opcodes + A_FMOVE: + if opnr=1 then + result:=operand_write; + A_FADD, A_FSUB, A_FMUL, A_FDIV: + if opnr=1 then + result:=operand_readwrite; + A_FCMP: + begin end; { operand_read } + else begin internalerror(2004040903); end; @@ -508,17 +520,17 @@ type function spilling_create_store(r:tregister; const ref:treference):Taicpu; begin - case getregtype(r) of - R_INTREGISTER : - result:=taicpu.op_reg_ref(A_MOVE,S_L,r,ref); - R_ADDRESSREGISTER : - result:=taicpu.op_reg_ref(A_MOVE,S_L,r,ref); - R_FPUREGISTER : + case getregtype(r) of + R_INTREGISTER : + result:=taicpu.op_reg_ref(A_MOVE,S_L,r,ref); + R_ADDRESSREGISTER : + result:=taicpu.op_reg_ref(A_MOVE,S_L,r,ref); + R_FPUREGISTER : // no need to handle sizes here result:=taicpu.op_reg_ref(A_FMOVE,S_FS,r,ref); else internalerror(200602012); - end; + end; end; |