summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-09-03 19:57:46 +0000
committersergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-09-03 19:57:46 +0000
commita03bc0845389a87edf0f891bb3333c133d5544f8 (patch)
tree2736786275eefa80344d7991bded9f0cd34ba950
parentd02fe44f48b854ecb29bd8a55818afda1a1be173 (diff)
downloadfpc-a03bc0845389a87edf0f891bb3333c133d5544f8.tar.gz
* MIPS: fixed O_MOVE_SOURCE and O_MOVE_DEST constants (they were swapped, amazing that it ever worked with such a mistake).
+ Spilling for SEB and SEH * Another attempt to get spilling of 3-operand form DIV/DIVU be done correctly. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@28588 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/mips/aasmcpu.pas21
1 files changed, 15 insertions, 6 deletions
diff --git a/compiler/mips/aasmcpu.pas b/compiler/mips/aasmcpu.pas
index 6a6ac39edf..08a63e7bc9 100644
--- a/compiler/mips/aasmcpu.pas
+++ b/compiler/mips/aasmcpu.pas
@@ -33,9 +33,9 @@ uses
const
{ "mov reg,reg" source operand number }
- O_MOV_SOURCE = 0;
+ O_MOV_SOURCE = 1;
{ "mov reg,reg" source operand number }
- O_MOV_DEST = 1;
+ O_MOV_DEST = 0;
type
{ taicpu }
@@ -401,13 +401,22 @@ end;
A_SNE,
A_EXT,
A_INS,
- A_MFC0];
+ A_MFC0,
+ A_SEB,
+ A_SEH];
begin
result := operand_read;
- if opcode in op_write_set then
- if opnr = 0 then
- result := operand_write;
+ case opcode of
+ A_DIV, { these have 3 operands if used as macros }
+ A_DIVU:
+ if (ops=3) and (opnr=0) then
+ result:=operand_write;
+ else
+ if opcode in op_write_set then
+ if opnr = 0 then
+ result := operand_write;
+ end;
end;