Author: greatlrd
Date: Sat Jan 20 16:33:42 2007
New Revision: 25543
URL:
http://svn.reactos.org/svn/reactos?rev=25543&view=rev
Log:
start add mr op code causeome new bug for ppc
Modified:
trunk/rosapps/devutils/cputointel/From/PPC/PPC.h
trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c
trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.h
trunk/rosapps/devutils/cputointel/From/PPC/PPCopcode.c
Modified: trunk/rosapps/devutils/cputointel/From/PPC/PPC.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/From/P…
==============================================================================
--- trunk/rosapps/devutils/cputointel/From/PPC/PPC.h (original)
+++ trunk/rosapps/devutils/cputointel/From/PPC/PPC.h Sat Jan 20 16:33:42 2007
@@ -12,6 +12,7 @@
/* here we put the prototype for the opcode api that brain need we show a example for it
*/
CPU_INT PPC_Blr( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
CPU_INT PPC_Li( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT PPC_mr( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
CPU_INT PPC_Stw( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
CPU_INT PPC_Stwu( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
Modified: trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/From/P…
==============================================================================
--- trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c (original)
+++ trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c Sat Jan 20 16:33:42 2007
@@ -80,6 +80,17 @@
cpu_pos += retsize;
}
+ /* mr */
+ if ((cpuint - (cpuint & GetMaskByte32(cpuPPCInit_mr))) ==
ConvertBitToByte32(cpuPPCInit_mr))
+ {
+ retsize = PPC_mr( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
/* stw */
if ((cpuint - (cpuint & GetMaskByte32(cpuPPCInit_stw))) ==
ConvertBitToByte32(cpuPPCInit_stw))
{
@@ -90,7 +101,6 @@
else
cpu_pos += retsize;
}
- retcode = 0;
/* stwu */
if ((cpuint - (cpuint & GetMaskByte32(cpuPPCInit_stwu))) ==
ConvertBitToByte32(cpuPPCInit_stwu))
Modified: trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/From/P…
==============================================================================
--- trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.h (original)
+++ trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.h Sat Jan 20 16:33:42 2007
@@ -14,6 +14,7 @@
CPU_BYTE cpuPPCInit_Li[32] =
{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,1,1,1,0,2,2};
CPU_BYTE cpuPPCInit_stw[32] =
{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,0,1,0,0,2,2};
CPU_BYTE cpuPPCInit_stwu[32] =
{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0,0,1,0,1,2,2};
+CPU_BYTE cpuPPCInit_mr[32] =
{0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,2,2,2,2,2,2,2,2,0,1,1,1,1,1,2,2};
/* mask */
/*
* no mask we implement function getting the reg right
Modified: trunk/rosapps/devutils/cputointel/From/PPC/PPCopcode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/From/P…
==============================================================================
--- trunk/rosapps/devutils/cputointel/From/PPC/PPCopcode.c (original)
+++ trunk/rosapps/devutils/cputointel/From/PPC/PPCopcode.c Sat Jan 20 16:33:42 2007
@@ -95,6 +95,31 @@
}
+CPU_INT PPC_mr( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ CPU_UNINT opcode;
+
+ opcode = GetData32Le(&cpu_buffer[cpu_pos]);
+
+ BaseAddress +=cpu_pos;
+
+ /* own translatons langues */
+ if (AllocAny()!=0) /* alloc memory for pMyBrainAnalys */
+ {
+ return -1;
+ }
+ pMyBrainAnalys->op = OP_ANY_mov;
+ pMyBrainAnalys->type= 2 + 8 + 16; /* 8 dst reg, 2 src reg */
+ pMyBrainAnalys->src_size = 32;
+ pMyBrainAnalys->src = PPC_GetBitArraySrcReg(opcode);
+ pMyBrainAnalys->dst = PPC_GetBitArrayBto31xx(opcode);
+ pMyBrainAnalys->memAdr=BaseAddress;
+
+ return 4;
+}
+
+
CPU_INT PPC_Stw( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{