|
From: <sv...@va...> - 2015-01-06 19:47:58
|
Author: carll
Date: Tue Jan 6 19:47:51 2015
New Revision: 3060
Log:
The following two lines of code always convert the 64-bit pointer to a 32-bit
pointer.
target = toUInt( Ptr_to_ULong(h_calc_BCDtoDPB ) );
and
target = toUInt( Ptr_to_ULong( h_calc_DPBtoBCD ) );
The toUInt() should only be used if we are running in 32-bit mode. The lines
were changed to only convert the pointer to 32-bit if running in 32-bit mode.
There is no bugzilla for this issue. It was noticed by Florian Krohm.
Modified:
trunk/priv/host_ppc_isel.c
Modified: trunk/priv/host_ppc_isel.c
==============================================================================
--- trunk/priv/host_ppc_isel.c (original)
+++ trunk/priv/host_ppc_isel.c Tue Jan 6 19:47:51 2015
@@ -3678,7 +3678,8 @@
mk_RetLoc_simple(RLPri_2Int) ) );
} else {
ULong target;
- target = toUInt( Ptr_to_ULong(h_calc_BCDtoDPB ) );
+ target = mode64 ? Ptr_to_ULong(h_calc_BCDtoDPB) :
+ toUInt( Ptr_to_ULong(h_calc_BCDtoDPB ) );
addInstr( env, PPCInstr_Call( cc, (Addr64)target,
argiregs,
mk_RetLoc_simple(RLPri_2Int) ) );
@@ -3725,7 +3726,8 @@
mk_RetLoc_simple(RLPri_2Int) ) );
} else {
ULong target;
- target = toUInt( Ptr_to_ULong( h_calc_DPBtoBCD ) );
+ target = mode64 ? Ptr_to_ULong(h_calc_DPBtoBCD) :
+ toUInt( Ptr_to_ULong( h_calc_DPBtoBCD ) );
addInstr(env, PPCInstr_Call( cc, (Addr64)target, argiregs,
mk_RetLoc_simple(RLPri_2Int) ) );
}
|