Fixing another bug in converting

PPC 
stwu r1,-32(r1) 

equal with intel
mov [esp-32],esp; 
mov esp, esp - 32; 

svn path=/trunk/; revision=25518
This commit is contained in:
Magnus Olsen 2007-01-18 22:09:08 +00:00
parent a286bd796f
commit 0cb4e210e1
3 changed files with 16 additions and 2 deletions

View file

@ -190,7 +190,7 @@ CPU_INT ConvertToIA32Process( FILE *outfp,
{
/* dest [eax - 0x20], source reg */
fprintf(outfp,"mov [");
fprintf(outfp,"mov dword [");
standardreg( RegTableCount,
pMystart->dst,
setup_ebp, outfp);
@ -199,6 +199,19 @@ CPU_INT ConvertToIA32Process( FILE *outfp,
pMystart->src,
setup_ebp, outfp);
fprintf(outfp,"\n");
if ((pMystart->type & 128)== 128)
{
fprintf(outfp,"mov ");
standardreg( RegTableCount,
pMystart->src,
setup_ebp, outfp);
fprintf(outfp," , ");
standardreg( RegTableCount,
pMystart->dst,
setup_ebp, outfp);
fprintf(outfp," %d\n",pMystart->dst_extra);
}
}
}

View file

@ -116,7 +116,7 @@ CPU_INT PPC_Stwu( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
tmp = _byteswap_ushort( ((CPU_SHORT)((opcode >> 16) & 0xffff)));
pMyBrainAnalys->op = OP_ANY_mov;
pMyBrainAnalys->type= 2 + 64;
pMyBrainAnalys->type= 2 + 64 + 128;
pMyBrainAnalys->src_size = 32;
pMyBrainAnalys->dst_size = 32;
pMyBrainAnalys->src = PPC_GetBitArrayBto31xx(opcode);

View file

@ -33,6 +33,7 @@ typedef struct _BrainAnalys
/* 16 = source are imm */
/* 32 = soucre -xx(r1) or [eax-xx] */
/* 64 = dest -xx(r1) or [eax-xx] */
/* 128 = update form the src be update with dest */
CPU_INT src_size; /* who many bits are src not vaild for reg*/
CPU_INT dst_size; /* who many bits are dst not vaild for reg*/