SPLIT_MOVEL_PD now affects movem too

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@241 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-09-08 20:04:20 +00:00
parent 7a7c6476f3
commit e28a980fb7
4 changed files with 23 additions and 11 deletions

View file

@ -415,13 +415,22 @@ int OpMovem(int op)
} }
else else
{ {
// if (size == 2 && decr && SPLIT_MOVEL_PD) we should do 2xWrite16 here
// (same as in movel.l ?, -(An)), but as this is not likely to be needed and
// we do not want the performance hit, we do single Write32 instead.
ot(" ;@ Copy register to memory:\n",1<<size); ot(" ;@ Copy register to memory:\n",1<<size);
ot(" ldr r1,[r7,r10] ;@ Load value from Dn/An\n"); ot(" ldr r1,[r7,r10] ;@ Load value from Dn/An\n");
#if SPLIT_MOVEL_PD
if (decr && size==2) { // -(An)
ot(" add r0,r6,#2\n");
EaWrite(0,1,ea,1,0x003f,0,0);
ot(" ldr r1,[r7,r10] ;@ Load value from Dn/An\n");
ot(" mov r0,r6\n");
EaWrite(0,1,ea,1,0x003f,1);
}
else
#endif
{
EaWrite(6,1,ea,size,0x003f); EaWrite(6,1,ea,size,0x003f);
} }
}
if (decr==0) ot(" add r6,r6,#%d ;@ Post-increment address\n",1<<size); if (decr==0) ot(" add r6,r6,#%d ;@ Post-increment address\n",1<<size);

View file

@ -133,8 +133,8 @@
/* /*
* When this option is enabled Cyclone will do two word writes instead of one * When this option is enabled Cyclone will do two word writes instead of one
* long write when handling MOVE.L with pre-decrementing destination, as described in * long write when handling MOVE.L or MOVEM.L with pre-decrementing destination,
* Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt). * as described in Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).
* Enable this if you are emulating a 16 bit system. * Enable this if you are emulating a 16 bit system.
*/ */
#define SPLIT_MOVEL_PD 1 #define SPLIT_MOVEL_PD 1

View file

@ -58,7 +58,7 @@
* MEMHANDLERS_NEED_CYCLES, or else Cyclone will keep reloading the same cycle * MEMHANDLERS_NEED_CYCLES, or else Cyclone will keep reloading the same cycle
* count and this will screw timing (if not cause a deadlock). * count and this will screw timing (if not cause a deadlock).
*/ */
#define MEMHANDLERS_NEED_PC 0 #define MEMHANDLERS_NEED_PC 1
#define MEMHANDLERS_NEED_PREV_PC 0 #define MEMHANDLERS_NEED_PREV_PC 0
#define MEMHANDLERS_NEED_FLAGS 0 #define MEMHANDLERS_NEED_FLAGS 0
#define MEMHANDLERS_NEED_CYCLES 1 #define MEMHANDLERS_NEED_CYCLES 1
@ -133,8 +133,8 @@
/* /*
* When this option is enabled Cyclone will do two word writes instead of one * When this option is enabled Cyclone will do two word writes instead of one
* long write when handling MOVE.L with pre-decrementing destination, as described in * long write when handling MOVE.L or MOVEM.L with pre-decrementing destination,
* Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt). * as described in Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).
* Enable this if you are emulating a 16 bit system. * Enable this if you are emulating a 16 bit system.
*/ */
#define SPLIT_MOVEL_PD 1 #define SPLIT_MOVEL_PD 1

View file

@ -7133,9 +7133,12 @@ M68KMAKE_OP(movem, 32, re, pd)
if(register_list & (1 << i)) if(register_list & (1 << i))
{ {
ea -= 4; ea -= 4;
#if 0
m68ki_write_32(ea, REG_DA[15-i] ); // notaz Cyclone hack m68ki_write_32(ea, REG_DA[15-i] ); // notaz Cyclone hack
//m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF ); #else
//m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF ); m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );
m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );
#endif
count++; count++;
} }
AY = ea; AY = ea;