[Skyeye-developer] SF.net SVN: skyeye: [289]
skyeye-v1/trunk/arch/mips/common/decoder.c
Michael.Kang
blackfin.kang at gmail.com
Thu Aug 9 12:48:33 CST 2007
Revision: 289
http://skyeye.svn.sourceforge.net/skyeye/?rev=289&view=rev
Author: kangsh
Date: 2007-08-08 21:32:18 -0700 (Wed, 08 Aug 2007)
Log Message:
-----------
Fix a bug caused by wrong defination of date type. The bug caused
sign extend can not work correctly.
Modified Paths:
--------------
skyeye-v1/trunk/arch/mips/common/decoder.c
Modified: skyeye-v1/trunk/arch/mips/common/decoder.c
===================================================================
--- skyeye-v1/trunk/arch/mips/common/decoder.c 2007-08-04 08:00:06
UTC (rev 288)
+++ skyeye-v1/trunk/arch/mips/common/decoder.c 2007-08-09 04:32:18
UTC (rev 289)
@@ -397,7 +397,7 @@
{
// Trap If Not Equal
if( mstate->gpr[rs(instr)] !=
mstate->gpr[rt(instr)])
- fprintf(stderr,"trap
happed in %s.\n", __FUNCTION__);
+ fprintf(stderr,"trap
happened in %s at 0x%x.\n", __FUNCTION__, mstate->pc);
//process_reserved_instruction(mstate);
return nothing_special;
@@ -835,10 +835,12 @@
sync();
VA va = sign_extend_UInt32(offset(instr), 16)
+ mstate->gpr[base(instr)];
PA pa = translate_vaddr(mstate, va,
data_load); //Shi yang 2006-08-10, defined in tlb.c
- UInt8 x;
+ UInt32 x;
UInt32 y = 0;
load(mstate, va, pa, &y, 1);
+
x = sign_extend_UInt32(y & (0xff), 8); //Shi
yang 2006-08-10, Sign extend
+
mstate->gpr[rt(instr)] = x;
return nothing_special;
@@ -853,7 +855,7 @@
if (bit(va, 0)) //Check alignment
process_address_error(data_load, va);
PA pa = translate_vaddr(mstate,va, data_load);
//Shi yang 2006-08-10
- UInt16 x;
+ UInt32 x;
UInt32 y = 0;
load(mstate, va, pa, &y, 2);
x = sign_extend_UInt32(y & (0xffff), 16);
//Shi yang 2006-08-10, Sign extend
This was sent by the SourceForge.net collaborative development
platform, the world's largest Open Source development site.
--
www.skyeye.org
More information about the Skyeye-developer
mailing list