You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by mc...@apache.org on 2008/05/22 15:34:09 UTC
svn commit: r659108 [2/19] - in /harmony/enhanced/drlvm/trunk/vm: em/src/
gc_gen/src/common/ gc_gen/src/mark_compact/ gc_gen/src/mark_sweep/
gc_gen/src/semi_space/ gc_gen/src/trace_forward/ include/open/
interpreter/src/ jitrino/src/codegenerator/ jitr...
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h Thu May 22 06:33:38 2008
@@ -546,11 +546,11 @@
* @param The parameters are the following:
* arg\ Object reference for the source array. Must be non-null and refer to an array
* of 16 bit chars
- * arg\ int32 containing the starting index of the source array to copy
+ * arg\ I_32 containing the starting index of the source array to copy
* arg\ Object reference for the destination array. Must be non-null and refer to an array
* of 16 bit chars.
- * arg\ int32 containing the starting index of the destination array to copy into.
- * arg\ int32 containing the number of 16 bit chars to copy.
+ * arg\ I_32 containing the starting index of the destination array to copy into.
+ * arg\ I_32 containing the number of 16 bit chars to copy.
*
* @return None.
*
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/rt_types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/rt_types.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/rt_types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/rt_types.h Thu May 22 06:33:38 2008
@@ -199,7 +199,7 @@
uint64 * p_r11;
// To restore processor flags during transfer
- uint32 eflags;
+ U_32 eflags;
Boolean is_ip_past;
} JitFrameContext;
@@ -208,22 +208,22 @@
typedef
struct JitFrameContext {
- uint32 esp;
- uint32 *p_ebp;
- uint32 *p_eip;
+ U_32 esp;
+ U_32 *p_ebp;
+ U_32 *p_eip;
// Callee-saved registers
- uint32 *p_edi;
- uint32 *p_esi;
- uint32 *p_ebx;
+ U_32 *p_edi;
+ U_32 *p_esi;
+ U_32 *p_ebx;
// The scratch registers are currently only valid during GC enumeration.
- uint32 *p_eax;
- uint32 *p_ecx;
- uint32 *p_edx;
+ U_32 *p_eax;
+ U_32 *p_ecx;
+ U_32 *p_edx;
// To restore processor flags during transfer
- uint32 eflags;
+ U_32 eflags;
Boolean is_ip_past;
} JitFrameContext;
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu May 22 06:33:38 2008
@@ -89,7 +89,7 @@
/**
* @return <code>TRUE</code> if all instances of this class are pinned.
*/
- VMEXPORT void* class_alloc_via_classloader(Class_Handle ch, int32 size);
+ VMEXPORT void* class_alloc_via_classloader(Class_Handle ch, I_32 size);
/**
* This exactly what I want.
@@ -208,7 +208,7 @@
* Return the length of a vector. The caller must ensure that GC will not
* move or deallocate the vector while vector_get_length() is active.
*/
-VMEXPORT int32 vector_get_length(Vector_Handle vector);
+VMEXPORT I_32 vector_get_length(Vector_Handle vector);
/**
* Return the address to an element of a vector of references.
@@ -216,7 +216,7 @@
* while vector_get_element_address_ref() is active.
*/
VMEXPORT Managed_Object_Handle *
-vector_get_element_address_ref(Vector_Handle vector, int32 idx);
+vector_get_element_address_ref(Vector_Handle vector, I_32 idx);
/**
* Return the size of a vector of a given number of elements.
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_method_access.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_method_access.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_method_access.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_method_access.h Thu May 22 06:33:38 2008
@@ -359,7 +359,7 @@
*
* @return The method bytecode size.
*/
-DECLARE_OPEN(uint32, method_get_bytecode_length, (Method_Handle method));
+DECLARE_OPEN(U_32, method_get_bytecode_length, (Method_Handle method));
/**
* Returns the method bytecode array.
@@ -393,7 +393,7 @@
* @note An assertion is raised if the method equals to <code>NULL</code>.
* @note Replaces functions method_get_max_local and method_vars_get_number.
*/
-DECLARE_OPEN(uint32, method_get_max_locals, (Method_Handle method));
+DECLARE_OPEN(U_32, method_get_max_locals, (Method_Handle method));
/**
* Returns the maximum stack depth for the given method.
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h Thu May 22 06:33:38 2008
@@ -84,8 +84,8 @@
# define uword uint64
# define word int64
#else
-# define uword uint32
-# define word int32
+# define uword U_32
+# define word I_32
#endif
#if defined(POINTER64) && defined(REFS_USE_COMPRESSED)
@@ -179,9 +179,9 @@
/** Holds 32-bit values.*/
union Value {
/** The unsigned integer value.*/
- uint32 u;
+ U_32 u;
/** The integer value.*/
- int32 i;
+ I_32 i;
/** The float value.*/
float f;
///** Compressed/uncompressed reference.*/
@@ -238,9 +238,9 @@
/** The value to the object reference.*/
uint8 *refs;
/** The number of elements on the stack.*/
- int32 index;
+ I_32 index;
/** The stack size.*/
- int32 size;
+ I_32 size;
public:
/** The empty constructor.*/
@@ -354,7 +354,7 @@
// references to the local variable type
uint8 *refs;
// locals size
- uint32 varNum;
+ U_32 varNum;
public:
/** The empty constructor.*/
@@ -368,7 +368,7 @@
* @param[in] ptr - the pointer to the data
* @param[in] size - the locals size value
*/
- inline void init(void *ptr, uint32 size);
+ inline void init(void *ptr, U_32 size);
/**
* Returns the reference to the local variable of the specifie ID.
@@ -376,7 +376,7 @@
* @param[in] id - the local variable ID
* @return The reference to the requested local variable.
*/
- inline Value& operator () (uint32 id);
+ inline Value& operator () (U_32 id);
/**
* Sets the value of an object of the <code>Long</code> or <code>Double</code>
@@ -403,7 +403,7 @@
* @return The reference to the local variable type.
* @sa FLAG_NONE, FLAG_RET_ADDR, FLAG_OBJECT
*/
- inline uint8& ref(uint32 id);
+ inline uint8& ref(U_32 id);
/**
* Returns the size of the allocated locals area by its size in elements.
@@ -417,7 +417,7 @@
* Returns the number of local variables in this object.
*
* @return The number of local variables.*/
- inline uint32 getLocalsNumber() { return varNum; }
+ inline U_32 getLocalsNumber() { return varNum; }
/**
* Enumerates references associated with the thread.
@@ -677,11 +677,11 @@
}
void
-Locals::init(void *ptr, uint32 size) {
+Locals::init(void *ptr, U_32 size) {
vars = (Value*) ptr;
refs = (uint8*)(vars + size);
varNum = size;
- for(uint32 i = 0; i < varNum; i++) refs[i] = 0;
+ for(U_32 i = 0; i < varNum; i++) refs[i] = 0;
}
int
@@ -690,7 +690,7 @@
}
Value&
-Locals::operator () (uint32 id) {
+Locals::operator () (U_32 id) {
assert(id < varNum);
return vars[id];
}
@@ -718,7 +718,7 @@
}
uint8&
-Locals::ref(uint32 id) {
+Locals::ref(U_32 id) {
assert(id < varNum);
return refs[id];
}
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp Thu May 22 06:33:38 2008
@@ -41,7 +41,7 @@
typedef ManagedObject** (*RefFuncPtr)(uword*,uword,word,GenericFunctionPointer);
typedef void* (*ObjFuncPtr)(uword*,uword,word,GenericFunctionPointer);
typedef float (*FloatFuncPtr)(uword*,uword,word,GenericFunctionPointer);
-typedef int32 (*IntFuncPtr)(uword*,uword,word,GenericFunctionPointer);
+typedef I_32 (*IntFuncPtr)(uword*,uword,word,GenericFunctionPointer);
typedef int16 (*ShortFuncPtr)(uword*,uword,word,GenericFunctionPointer);
typedef int8 (*ByteFuncPtr)(uword*,uword,word,GenericFunctionPointer);
typedef uint16 (*CharFuncPtr)(uword*,uword,word,GenericFunctionPointer);
@@ -462,7 +462,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32)res;
+ prevFrame.stack.pick().i = (I_32)res;
}
break;
@@ -473,7 +473,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -484,7 +484,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -741,7 +741,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -752,7 +752,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -763,7 +763,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp Thu May 22 06:33:38 2008
@@ -29,7 +29,7 @@
using namespace std;
#ifdef _WIN32
-static int64 __declspec(naked) __stdcall invokeJNI(uint32 *args, int sz, GenericFunctionPointer f) {
+static int64 __declspec(naked) __stdcall invokeJNI(U_32 *args, int sz, GenericFunctionPointer f) {
__asm {
push ebp
mov ebp, esp
@@ -50,7 +50,7 @@
}
#else /* Linux */
extern "C" {
- int64 invokeJNI(uint32 *args, int sz, GenericFunctionPointer f);
+ int64 invokeJNI(U_32 *args, int sz, GenericFunctionPointer f);
}
#endif
@@ -59,7 +59,7 @@
typedef ManagedObject** (*RefFuncPtr)(uword*,int,GenericFunctionPointer);
typedef void* (*ObjFuncPtr)(uword*,int,GenericFunctionPointer);
typedef float (*FloatFuncPtr)(uword*,int,GenericFunctionPointer);
-typedef int32 (*IntFuncPtr)(uword*,int,GenericFunctionPointer);
+typedef I_32 (*IntFuncPtr)(uword*,int,GenericFunctionPointer);
typedef int16 (*ShortFuncPtr)(uword*,int,GenericFunctionPointer);
typedef int8 (*ByteFuncPtr)(uword*,int,GenericFunctionPointer);
typedef uint16 (*CharFuncPtr)(uword*,int,GenericFunctionPointer);
@@ -375,7 +375,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32)res;
+ prevFrame.stack.pick().i = (I_32)res;
}
break;
@@ -386,7 +386,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -397,7 +397,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -597,7 +597,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -608,7 +608,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -619,7 +619,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp Thu May 22 06:33:38 2008
@@ -56,7 +56,7 @@
void* invokeJNI_Obj(uword*,uword*,int64,int64,GenericFunctionPointer);
float invokeJNI_Float(uword*,uword*,int64,int64,GenericFunctionPointer);
double invokeJNI_Double(uword*,uword*,int64,int64,GenericFunctionPointer);
- int32 invokeJNI_Int(uword*,uword*,int64,int64,GenericFunctionPointer);
+ I_32 invokeJNI_Int(uword*,uword*,int64,int64,GenericFunctionPointer);
int16 invokeJNI_Short(uword*,uword*,int64,int64,GenericFunctionPointer);
int8 invokeJNI_Byte(uword*,uword*,int64,int64,GenericFunctionPointer);
uint16 invokeJNI_Char(uword*,uword*,int64,int64,GenericFunctionPointer);
@@ -435,7 +435,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32)res;
+ prevFrame.stack.pick().i = (I_32)res;
}
break;
@@ -446,7 +446,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -457,7 +457,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -703,7 +703,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
@@ -714,7 +714,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().u = (uint32) res;
+ prevFrame.stack.pick().u = (U_32) res;
}
break;
@@ -725,7 +725,7 @@
prevFrame.stack.popClearRef(sz);
prevFrame.stack.push();
- prevFrame.stack.pick().i = (int32) res;
+ prevFrame.stack.pick().i = (I_32) res;
}
break;
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Thu May 22 06:33:38 2008
@@ -125,14 +125,14 @@
return (int16)((addr[0] << 8) + addr[1]);
}
-static inline int32
+static inline I_32
read_int32(uint8 *addr) {
- uint32 res = (addr[0] << 24) + (addr[1] << 16) + (addr[2] << 8) + addr[3];
- return (int32) res;
+ U_32 res = (addr[0] << 24) + (addr[1] << 16) + (addr[2] << 8) + addr[3];
+ return (I_32) res;
}
-static void throwAIOOBE(int32 index) {
+static void throwAIOOBE(I_32 index) {
char buf[64];
sprintf(buf, "%i", index);
DEBUG("****** ArrayIndexOutOfBoundsException ******\n");
@@ -222,7 +222,7 @@
static inline void
Opcode_ALOAD(StackFrame& frame) {
// get value from local variable
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
Value& val = frame.locals(varId);
ASSERT_TAGS(frame.locals.ref(varId));
@@ -238,7 +238,7 @@
static inline void
Opcode_WIDE_ALOAD(StackFrame& frame) {
// get value from local variable
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
Value& val = frame.locals(varId);
ASSERT_TAGS(frame.locals.ref(varId));
@@ -253,7 +253,7 @@
static inline void
Opcode_ILOAD(StackFrame& frame) {
// get value from local variable
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
Value& val = frame.locals(varId);
ASSERT_TAGS(!frame.locals.ref(varId));
@@ -267,7 +267,7 @@
static inline void
Opcode_WIDE_ILOAD(StackFrame& frame) {
// get value from local variable
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
Value& val = frame.locals(varId);
ASSERT_TAGS(!frame.locals.ref(varId));
@@ -315,7 +315,7 @@
static inline void
Opcode_LLOAD(StackFrame& frame) {
// store value to local variable
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
frame.stack.push(2);
frame.stack.pick(s1) = frame.locals(varId + l1);
@@ -330,7 +330,7 @@
static inline void
Opcode_WIDE_LLOAD(StackFrame& frame) {
// store value to local variable
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
frame.stack.push(2);
frame.stack.pick(s1) = frame.locals(varId + l1);
@@ -368,7 +368,7 @@
ASSERT_TAGS(frame.stack.ref());
// store value to local variable
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
frame.locals(varId) = val;
frame.locals.ref(varId) = frame.stack.ref();
@@ -384,7 +384,7 @@
ASSERT_TAGS(!frame.stack.ref());
// store value to local variable
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
frame.locals(varId) = val;
frame.locals.ref(varId) = FLAG_NONE;
@@ -399,7 +399,7 @@
ASSERT_TAGS(frame.stack.ref());
// store value to local variable
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
frame.locals(varId) = val;
frame.locals.ref(varId) = frame.stack.ref();
@@ -416,7 +416,7 @@
ASSERT_TAGS(!frame.stack.ref());
// store value to local variable
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
frame.locals(varId) = val;
frame.locals.ref(varId) = FLAG_NONE;
@@ -462,7 +462,7 @@
static inline void
Opcode_LSTORE(StackFrame& frame) {
- uint32 varId = read_uint8(frame.ip + 1);
+ U_32 varId = read_uint8(frame.ip + 1);
ASSERT_TAGS(!frame.stack.ref(0));
ASSERT_TAGS(!frame.stack.ref(1));
frame.locals(varId + l1) = frame.stack.pick(s1);
@@ -476,7 +476,7 @@
static inline void
Opcode_WIDE_LSTORE(StackFrame& frame) {
- uint32 varId = read_uint16(frame.ip + 2);
+ U_32 varId = read_uint16(frame.ip + 2);
ASSERT_TAGS(!frame.stack.ref(0));
ASSERT_TAGS(!frame.stack.ref(1));
frame.locals(varId + l1) = frame.stack.pick(s1);
@@ -648,7 +648,7 @@
DEF_OPCODE_MATH_32_32_TO_32(IXOR, res.i = arg1.i ^ arg0.i) // Opcode_IXOR
DEF_OPCODE_MATH_32_32_TO_32(ISHL, res.i = arg1.i << (arg0.i & 0x1f)) // Opcode_ISHL
DEF_OPCODE_MATH_32_32_TO_32(ISHR, res.i = arg1.i >> (arg0.i & 0x1f)) // Opcode_ISHR
-DEF_OPCODE_MATH_32_32_TO_32(IUSHR, res.i = ((uint32)arg1.i) >> (arg0.i & 0x1f)) // Opcode_IUSHR
+DEF_OPCODE_MATH_32_32_TO_32(IUSHR, res.i = ((U_32)arg1.i) >> (arg0.i & 0x1f)) // Opcode_IUSHR
DEF_OPCODE_MATH_32_32_TO_32(FADD, res.f = arg1.f + arg0.f) // Opcode_FADD
DEF_OPCODE_MATH_32_32_TO_32(FSUB, res.f = arg1.f - arg0.f) // Opcode_FSUB
@@ -687,7 +687,7 @@
DEF_OPCODE_MATH_32_TO_32(I2F, res.f = (float) arg.i) // Opcode_I2F
-//DEF_OPCODE_MATH_32_TO_32(F2I, res.i = (int32) arg.f) // Opcode_F2I
+//DEF_OPCODE_MATH_32_TO_32(F2I, res.i = (I_32) arg.f) // Opcode_F2I
DEF_OPCODE_MATH_32_TO_32(I2B, res.i = (int8) arg.i) // Opcode_I2B
DEF_OPCODE_MATH_32_TO_32(I2S, res.i = (int16) arg.i) // Opcode_I2S
DEF_OPCODE_MATH_32_TO_32(I2C, res.i = (uint16) arg.i) // Opcode_I2C
@@ -706,9 +706,9 @@
#endif
DEF_OPCODE_MATH_64_TO_32(D2F, res.f = (float) arg.d) // Opcode_D2F
-//DEF_OPCODE_MATH_64_TO_32(D2I, res.i = (int32) arg.d) // Opcode_D2I
+//DEF_OPCODE_MATH_64_TO_32(D2I, res.i = (I_32) arg.d) // Opcode_D2I
DEF_OPCODE_MATH_64_TO_32(L2F, res.f = (float) arg.i64) // Opcode_L2F
-DEF_OPCODE_MATH_64_TO_32(L2I, res.i = (int32) arg.i64) // Opcode_L2I
+DEF_OPCODE_MATH_64_TO_32(L2I, res.i = (I_32) arg.i64) // Opcode_L2I
#if defined (__INTEL_COMPILER)
#pragma warning( pop )
@@ -730,9 +730,9 @@
if (isnan(arg.d)) {
res.i = 0;
} else if (arg.d > 0) {
- res.i = (int32)2147483647;
+ res.i = (I_32)2147483647;
} else {
- res.i = (int32)2147483648u;
+ res.i = (I_32)2147483648u;
}
}
@@ -750,14 +750,14 @@
int max_exp = (0x7F + 31) << 23;
if (exponent < max_exp) {
- arg.i = (int32) arg.f;
+ arg.i = (I_32) arg.f;
} else {
if (isnan(arg.f)) {
arg.i = 0;
} else if (arg.f > 0) {
- arg.i = (int32)2147483647;
+ arg.i = (I_32)2147483647;
} else {
- arg.i = (int32)2147483648u;
+ arg.i = (I_32)2147483648u;
}
}
frame.ip++;
@@ -836,8 +836,8 @@
#pragma warning (disable:1683) // to get rid of remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type
#endif
-DEF_OPCODE_DIV_32_32_TO_32(IDIV, res.i = (int32)((int64) arg1.i / arg0.i)) // Opcode_IDIV
-DEF_OPCODE_DIV_32_32_TO_32(IREM, res.i = (int32)((int64) arg1.i % arg0.i)) // Opcode_IREM
+DEF_OPCODE_DIV_32_32_TO_32(IDIV, res.i = (I_32)((int64) arg1.i / arg0.i)) // Opcode_IDIV
+DEF_OPCODE_DIV_32_32_TO_32(IREM, res.i = (I_32)((int64) arg1.i % arg0.i)) // Opcode_IREM
#if defined (__INTEL_COMPILER)
#pragma warning( pop )
@@ -896,7 +896,7 @@
#define DEF_OPCODE_CMP(CMP,check) \
static inline void \
Opcode_##CMP(StackFrame& frame) { \
- int32 val = frame.stack.pick().i; \
+ I_32 val = frame.stack.pick().i; \
frame.stack.ref() = FLAG_NONE; /* for OPCODE_IFNULL */ \
DEBUG_BYTECODE("val = " << (int)val); \
if (val check) { \
@@ -921,8 +921,8 @@
#define DEF_OPCODE_IF_ICMPXX(NAME,cmp) \
static inline void \
Opcode_IF_ICMP ## NAME(StackFrame& frame) { \
- int32 val0 = frame.stack.pick(1).i; \
- int32 val1 = frame.stack.pick(0).i; \
+ I_32 val0 = frame.stack.pick(1).i; \
+ I_32 val1 = frame.stack.pick(0).i; \
frame.stack.ref(1) = FLAG_NONE; \
frame.stack.ref(0) = FLAG_NONE; \
if (val0 cmp val1) { \
@@ -961,7 +961,7 @@
}
static bool
-ldc(StackFrame& frame, uint32 index) {
+ldc(StackFrame& frame, U_32 index) {
Class* clazz = frame.method->get_class();
ConstantPool& cp = clazz->get_constant_pool();
@@ -1016,21 +1016,21 @@
static inline void
Opcode_LDC(StackFrame& frame) {
- uint32 index = read_uint8(frame.ip + 1);
+ U_32 index = read_uint8(frame.ip + 1);
if (!ldc(frame, index)) return;
frame.ip += 2;
}
static inline void
Opcode_LDC_W(StackFrame& frame) {
- uint32 index = read_uint16(frame.ip + 1);
+ U_32 index = read_uint16(frame.ip + 1);
if(!ldc(frame, index)) return;
frame.ip += 3;
}
static inline void
Opcode_LDC2_W(StackFrame& frame) {
- uint32 index = read_uint16(frame.ip + 1);
+ U_32 index = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
ConstantPool& cp = clazz->get_constant_pool();
@@ -1078,7 +1078,7 @@
// TODO: is it possible to optimize?
// array data size = length << (type & 3);
// how it can be usable?
- int32 length = frame.stack.pick().i;
+ I_32 length = frame.stack.pick().i;
if (length < 0) {
interp_throw_exception("java/lang/NegativeArraySizeException");
@@ -1107,7 +1107,7 @@
Class *arrayClass = interp_class_get_array_of_class(objClass);
- int32 length = frame.stack.pick().i;
+ I_32 length = frame.stack.pick().i;
if (length < 0) {
interp_throw_exception("java/lang/NegativeArraySizeException");
@@ -1235,7 +1235,7 @@
static inline void
Opcode_NEW(StackFrame& frame) {
- uint32 classId = read_uint16(frame.ip + 1);
+ U_32 classId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Class *objClass = interp_resolve_class_new(clazz, classId);
@@ -1378,7 +1378,7 @@
static inline void
Opcode_IINC(StackFrame& frame) {
- uint32 varNum = read_uint8(frame.ip + 1);
+ U_32 varNum = read_uint8(frame.ip + 1);
int incr = read_int8(frame.ip + 2);
frame.locals(varNum).i += incr;
DEBUG_BYTECODE("var" << (int)varNum << " += " << incr);
@@ -1387,7 +1387,7 @@
static inline void
Opcode_WIDE_IINC(StackFrame& frame) {
- uint32 varNum = read_uint16(frame.ip + 2);
+ U_32 varNum = read_uint16(frame.ip + 2);
int incr = read_int16(frame.ip + 4);
frame.locals(varNum).i += incr;
DEBUG_BYTECODE(" += " << incr);
@@ -1417,8 +1417,8 @@
return;
}
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(st_ref);
- uint32 length = get_vector_length(array);
- uint32 pos = frame.stack.pick(0).u;
+ U_32 length = get_vector_length(array);
+ U_32 pos = frame.stack.pick(0).u;
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos);
@@ -1448,8 +1448,8 @@
return; \
} \
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(ref); \
- uint32 length = get_vector_length(array); \
- uint32 pos = frame.stack.pick(0).u; \
+ U_32 length = get_vector_length(array); \
+ U_32 pos = frame.stack.pick(0).u; \
\
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos); \
\
@@ -1469,7 +1469,7 @@
DEF_OPCODE_XALOAD(BALOAD, int8, int8, i)
DEF_OPCODE_XALOAD(CALOAD, uint16, uint16, u)
DEF_OPCODE_XALOAD(SALOAD, int16, int16, i)
-DEF_OPCODE_XALOAD(IALOAD, int32, int32, i)
+DEF_OPCODE_XALOAD(IALOAD, int32, I_32, i)
DEF_OPCODE_XALOAD(FALOAD, f32, float, f)
static inline void
@@ -1480,8 +1480,8 @@
return;
}
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(ref);
- uint32 length = get_vector_length(array);
- uint32 pos = frame.stack.pick(0).u;
+ U_32 length = get_vector_length(array);
+ U_32 pos = frame.stack.pick(0).u;
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos);
@@ -1505,8 +1505,8 @@
return;
}
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(ref);
- uint32 length = get_vector_length(array);
- uint32 pos = frame.stack.pick(1).u;
+ U_32 length = get_vector_length(array);
+ U_32 pos = frame.stack.pick(1).u;
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos);
@@ -1546,8 +1546,8 @@
return; \
} \
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(ref); \
- uint32 length = get_vector_length(array); \
- uint32 pos = frame.stack.pick(1).u; \
+ U_32 length = get_vector_length(array); \
+ U_32 pos = frame.stack.pick(1).u; \
\
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos); \
\
@@ -1571,7 +1571,7 @@
DEF_OPCODE_IASTORE(CASTORE, uint16, uint16, u)
DEF_OPCODE_IASTORE(BASTORE, int8, int8, i)
DEF_OPCODE_IASTORE(SASTORE, int16, int16, i)
-DEF_OPCODE_IASTORE(IASTORE, int32, int32, i)
+DEF_OPCODE_IASTORE(IASTORE, int32, I_32, i)
DEF_OPCODE_IASTORE(FASTORE, f32, float, f)
#if defined (__INTEL_COMPILER)
@@ -1586,8 +1586,8 @@
return;
}
Vector_Handle array = (Vector_Handle) UNCOMPRESS_INTERP(ref);
- uint32 length = get_vector_length(array);
- uint32 pos = frame.stack.pick(2).u;
+ U_32 length = get_vector_length(array);
+ U_32 pos = frame.stack.pick(2).u;
DEBUG_BYTECODE("length = " << (int)length << " pos = " << (int)pos);
@@ -1606,7 +1606,7 @@
static inline void
Opcode_PUTSTATIC(StackFrame& frame) {
- uint32 fieldId = read_uint16(frame.ip + 1);
+ U_32 fieldId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Field *field = interp_resolve_static_field(clazz, fieldId, true);
@@ -1656,26 +1656,26 @@
#else // ia32 not using compact fields
case VM_DATA_TYPE_BOOLEAN:
- *(uint32*)addr = (uint8) frame.stack.pick().u;
+ *(U_32*)addr = (uint8) frame.stack.pick().u;
frame.stack.pop();
break;
case VM_DATA_TYPE_CHAR:
- *(uint32*)addr = (uint16) frame.stack.pick().u;
+ *(U_32*)addr = (uint16) frame.stack.pick().u;
frame.stack.pop();
break;
case VM_DATA_TYPE_INT8:
- *(int32*)addr = (int8) frame.stack.pick().i;
+ *(I_32*)addr = (int8) frame.stack.pick().i;
frame.stack.pop();
break;
case VM_DATA_TYPE_INT16:
- *(int32*)addr = (int16) frame.stack.pick().i;
+ *(I_32*)addr = (int16) frame.stack.pick().i;
frame.stack.pop();
break;
#endif
case VM_DATA_TYPE_INT32:
case VM_DATA_TYPE_F4:
- *(int32*)addr = frame.stack.pick().i;
+ *(I_32*)addr = frame.stack.pick().i;
frame.stack.pop();
break;
@@ -1705,7 +1705,7 @@
static inline void
Opcode_GETSTATIC(StackFrame& frame) {
- uint32 fieldId = read_uint16(frame.ip + 1);
+ U_32 fieldId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Field *field = interp_resolve_static_field(clazz, fieldId, false);
@@ -1750,7 +1750,7 @@
#else // ia32 not using compact fields
case VM_DATA_TYPE_BOOLEAN:
case VM_DATA_TYPE_CHAR:
- frame.stack.pick().u = *(uint32*)addr;
+ frame.stack.pick().u = *(U_32*)addr;
break;
case VM_DATA_TYPE_INT8:
@@ -1758,7 +1758,7 @@
#endif
case VM_DATA_TYPE_INT32:
case VM_DATA_TYPE_F4:
- frame.stack.pick().i = *(int32*)addr;
+ frame.stack.pick().i = *(I_32*)addr;
break;
case VM_DATA_TYPE_ARRAY:
case VM_DATA_TYPE_CLASS:
@@ -1788,7 +1788,7 @@
static inline void
Opcode_PUTFIELD(StackFrame& frame) {
- uint32 fieldId = read_uint16(frame.ip + 1);
+ U_32 fieldId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Field *field = interp_resolve_nonstatic_field(clazz, fieldId, true);
@@ -1845,32 +1845,32 @@
#else // ia32 not using compact fields
case VM_DATA_TYPE_BOOLEAN:
- *(uint32*)addr = (uint8)frame.stack.pick(0).u;
+ *(U_32*)addr = (uint8)frame.stack.pick(0).u;
frame.stack.ref(1) = FLAG_NONE;
frame.stack.pop(2);
break;
case VM_DATA_TYPE_INT8:
- *(int32*)addr = (int8)frame.stack.pick(0).i;
+ *(I_32*)addr = (int8)frame.stack.pick(0).i;
frame.stack.ref(1) = FLAG_NONE;
frame.stack.pop(2);
break;
case VM_DATA_TYPE_CHAR:
- *(uint32*)addr = (uint16)frame.stack.pick(0).u;
+ *(U_32*)addr = (uint16)frame.stack.pick(0).u;
frame.stack.ref(1) = FLAG_NONE;
frame.stack.pop(2);
break;
case VM_DATA_TYPE_INT16:
- *(int32*)addr = (int16)frame.stack.pick(0).i;
+ *(I_32*)addr = (int16)frame.stack.pick(0).i;
frame.stack.ref(1) = FLAG_NONE;
frame.stack.pop(2);
break;
#endif
case VM_DATA_TYPE_INT32:
case VM_DATA_TYPE_F4:
- *(int32*)addr = frame.stack.pick(0).i;
+ *(I_32*)addr = frame.stack.pick(0).i;
frame.stack.ref(1) = FLAG_NONE;
frame.stack.pop(2);
break;
@@ -1903,7 +1903,7 @@
static inline void
Opcode_GETFIELD(StackFrame& frame) {
- uint32 fieldId = read_uint16(frame.ip + 1);
+ U_32 fieldId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Field *field = interp_resolve_nonstatic_field(clazz, fieldId, false);
@@ -1930,32 +1930,32 @@
#ifdef COMPACT_FIELDS // use compact fields on ipf
case VM_DATA_TYPE_BOOLEAN:
- frame.stack.pick(0).u = (uint32) *(uint8*)addr;
+ frame.stack.pick(0).u = (U_32) *(uint8*)addr;
break;
case VM_DATA_TYPE_INT8:
- frame.stack.pick(0).i = (int32) *(int8*)addr;
+ frame.stack.pick(0).i = (I_32) *(int8*)addr;
break;
case VM_DATA_TYPE_CHAR:
- frame.stack.pick(0).u = (uint32) *(uint16*)addr;
+ frame.stack.pick(0).u = (U_32) *(uint16*)addr;
break;
case VM_DATA_TYPE_INT16:
- frame.stack.pick(0).i = (int32) *(int16*)addr;
+ frame.stack.pick(0).i = (I_32) *(int16*)addr;
break;
#else // ia32 - not using compact fields
case VM_DATA_TYPE_BOOLEAN:
case VM_DATA_TYPE_CHAR:
- frame.stack.pick(0).u = *(uint32*)addr;
+ frame.stack.pick(0).u = *(U_32*)addr;
break;
case VM_DATA_TYPE_INT8:
case VM_DATA_TYPE_INT16:
#endif
case VM_DATA_TYPE_INT32:
case VM_DATA_TYPE_F4:
- frame.stack.pick(0).i = *(int32*)addr;
+ frame.stack.pick(0).i = *(I_32*)addr;
break;
case VM_DATA_TYPE_ARRAY:
@@ -1987,7 +1987,7 @@
static inline void
Opcode_INVOKEVIRTUAL(StackFrame& frame) {
- uint32 methodId = read_uint16(frame.ip + 1);
+ U_32 methodId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Method *method = interp_resolve_virtual_method(clazz, methodId);
@@ -2005,7 +2005,7 @@
static inline void
Opcode_INVOKEINTERFACE(StackFrame& frame) {
- uint32 methodId = read_uint16(frame.ip + 1);
+ U_32 methodId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Method *method = interp_resolve_interface_method(clazz, methodId);
@@ -2023,7 +2023,7 @@
static inline void
Opcode_INVOKESTATIC(StackFrame& frame) {
- uint32 methodId = read_uint16(frame.ip + 1);
+ U_32 methodId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Method *method = interp_resolve_static_method(clazz, methodId);
@@ -2045,7 +2045,7 @@
static inline void
Opcode_INVOKESPECIAL(StackFrame& frame) {
- uint32 methodId = read_uint16(frame.ip + 1);
+ U_32 methodId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Method *method = interp_resolve_special_method(clazz, methodId);
@@ -2068,10 +2068,10 @@
uint8* ip = frame.ip + 1;
ip = ((ip - (uint8*)frame.method->get_byte_code_addr() + 3) & ~3)
+ (uint8*)frame.method->get_byte_code_addr();
- int32 deflt = read_int32(ip);
- int32 low = read_int32(ip+4);
- int32 high = read_int32(ip+8);
- int32 val = frame.stack.pick().i;
+ I_32 deflt = read_int32(ip);
+ I_32 low = read_int32(ip+4);
+ I_32 high = read_int32(ip+8);
+ I_32 val = frame.stack.pick().i;
frame.stack.pop();
DEBUG_BYTECODE("val = " << val << " low = " << low << " high = " << high);
if (val < low || val > high) {
@@ -2089,13 +2089,13 @@
uint8* ip = frame.ip + 1;
ip = ((ip - (uint8*)frame.method->get_byte_code_addr() + 3) & ~3)
+ (uint8*)frame.method->get_byte_code_addr();
- int32 deflt = read_int32(ip);
- int32 num = read_int32(ip+4);
- int32 val = frame.stack.pick().i;
+ I_32 deflt = read_int32(ip);
+ I_32 num = read_int32(ip+4);
+ I_32 val = frame.stack.pick().i;
frame.stack.pop();
for(int i = 0; i < num; i++) {
- int32 key = read_int32(ip + 8 + i * 8);
+ I_32 key = read_int32(ip + 8 + i * 8);
if (val == key) {
frame.ip = oldip + read_int32(ip + 12 + i * 8);
return;
@@ -2124,7 +2124,7 @@
static inline void
Opcode_JSR(StackFrame& frame) {
- uint32 retAddr = (uint32)(frame.ip + 3 -
+ U_32 retAddr = (U_32)(frame.ip + 3 -
(uint8*)frame.method->get_byte_code_addr());
frame.stack.push();
frame.stack.pick().u = retAddr;
@@ -2135,7 +2135,7 @@
static inline void
Opcode_JSR_W(StackFrame& frame) {
- uint32 retAddr = (uint32)(frame.ip + 5 -
+ U_32 retAddr = (U_32)(frame.ip + 5 -
(uint8*)frame.method->get_byte_code_addr());
frame.stack.push();
frame.stack.pick().u = retAddr;
@@ -2146,22 +2146,22 @@
static inline void
Opcode_RET(StackFrame& frame) {
- uint32 varNum = read_uint8(frame.ip + 1);
- uint32 retAddr = frame.locals(varNum).u;
+ U_32 varNum = read_uint8(frame.ip + 1);
+ U_32 retAddr = frame.locals(varNum).u;
assert(frame.locals.ref(varNum) == FLAG_RET_ADDR);
frame.ip = retAddr + (uint8*)frame.method->get_byte_code_addr();
}
static inline void
Opcode_WIDE_RET(StackFrame& frame) {
- uint32 varNum = read_uint16(frame.ip + 2);
- uint32 retAddr = frame.locals(varNum).u;
+ U_32 varNum = read_uint16(frame.ip + 2);
+ U_32 retAddr = frame.locals(varNum).u;
frame.ip = retAddr + (uint8*)frame.method->get_byte_code_addr();
}
static inline void
Opcode_CHECKCAST(StackFrame& frame) {
- uint32 classId = read_uint16(frame.ip + 1);
+ U_32 classId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Class *objClass = interp_resolve_class(clazz, classId);
if (!objClass) return; // exception
@@ -2179,7 +2179,7 @@
static inline void
Opcode_INSTANCEOF(StackFrame& frame) {
- uint32 classId = read_uint16(frame.ip + 1);
+ U_32 classId = read_uint16(frame.ip + 1);
Class *clazz = frame.method->get_class();
Class *objClass = interp_resolve_class(clazz, classId);
if (!objClass) return; // exception
@@ -2271,13 +2271,13 @@
DEBUG_BYTECODE("Searching for exception handler:");
DEBUG_BYTECODE(" In " << m);
- uint32 ip = (uint32)(frame.ip - (uint8*)m->get_byte_code_addr());
+ U_32 ip = (U_32)(frame.ip - (uint8*)m->get_byte_code_addr());
DEBUG_BYTECODE("ip = " << (int)ip);
// When VM is in shutdown stage we need to execute final block to
// release monitors and propogate an exception to the upper frames.
if (VM_Global_State::loader_env->IsVmShutdowning()) {
- for(uint32 i = 0; i < m->num_bc_exception_handlers(); i++) {
+ for(U_32 i = 0; i < m->num_bc_exception_handlers(); i++) {
Handler *h = m->get_bc_exception_handler_info(i);
if (h->get_catch_type_index() == 0 &&
h->get_start_pc() <= ip && ip < h->get_end_pc()) {
@@ -2290,7 +2290,7 @@
Class *clazz = m->get_class();
- for(uint32 i = 0; i < m->num_bc_exception_handlers(); i++) {
+ for(U_32 i = 0; i < m->num_bc_exception_handlers(); i++) {
Handler *h = m->get_bc_exception_handler_info(i);
DEBUG_BYTECODE("handler" << (int) i
<< ": start_pc=" << (int) h->get_start_pc()
@@ -2299,7 +2299,7 @@
if (ip < h->get_start_pc()) continue;
if (ip >= h->get_end_pc()) continue;
- uint32 catch_type_index = h->get_catch_type_index();
+ U_32 catch_type_index = h->get_catch_type_index();
if (catch_type_index) {
// 0 - is handler for all
@@ -3131,19 +3131,19 @@
frame.locals(pos++).f = args[arg++].f;
break;
case JAVA_TYPE_SHORT:
- frame.locals(pos++).i = (int32)args[arg++].s;
+ frame.locals(pos++).i = (I_32)args[arg++].s;
break;
case JAVA_TYPE_CHAR:
- frame.locals(pos++).i = (uint32)args[arg++].c;
+ frame.locals(pos++).i = (U_32)args[arg++].c;
break;
case JAVA_TYPE_BYTE:
- frame.locals(pos++).i = (int32)args[arg++].b;
+ frame.locals(pos++).i = (I_32)args[arg++].b;
break;
case JAVA_TYPE_BOOLEAN:
- frame.locals(pos++).i = (int32)args[arg++].z;
+ frame.locals(pos++).i = (I_32)args[arg++].z;
break;
default:
- frame.locals(pos++).u = (uint32)args[arg++].i;
+ frame.locals(pos++).u = (U_32)args[arg++].i;
break;
}
iter = advance_arg_iterator(iter);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h Thu May 22 06:33:38 2008
@@ -179,7 +179,7 @@
// tau generating instructions
virtual CG_OpndHandle* tauPoint() = 0; // depends on all preceding branches
virtual CG_OpndHandle* tauEdge() = 0; // tied to incoming edge
- virtual CG_OpndHandle* tauAnd(uint32 numArgs, CG_OpndHandle** args) = 0;
+ virtual CG_OpndHandle* tauAnd(U_32 numArgs, CG_OpndHandle** args) = 0;
virtual CG_OpndHandle* tauUnsafe() = 0; // have lost dependence info, don't move uses
virtual CG_OpndHandle* tauSafe() = 0; // operation is always safe
@@ -204,7 +204,7 @@
virtual CG_OpndHandle* xor_(IntegerOp::Types,CG_OpndHandle* src1,CG_OpndHandle* src2) = 0;
virtual CG_OpndHandle* not_(IntegerOp::Types,CG_OpndHandle* src) = 0;
virtual CG_OpndHandle* shladd(IntegerOp::Types,CG_OpndHandle* value,
- uint32 shiftamount,
+ U_32 shiftamount,
CG_OpndHandle* addto) = 0;
virtual CG_OpndHandle* shl(IntegerOp::Types,CG_OpndHandle* value,CG_OpndHandle* shiftAmount) = 0;
virtual CG_OpndHandle* shr(IntegerOp::Types,CG_OpndHandle* value,CG_OpndHandle* shiftAmount) = 0;
@@ -229,10 +229,10 @@
// END PRED DEPRECATED
virtual void jump() = 0;
- virtual void tableSwitch(CG_OpndHandle* src, uint32 nTargets) = 0;
+ virtual void tableSwitch(CG_OpndHandle* src, U_32 nTargets) = 0;
virtual void throwException(CG_OpndHandle* exceptionObj, bool createStackTrace) = 0;
virtual void throwSystemException(CompilationInterface::SystemExceptionId) = 0;
- virtual void throwLinkingException(Class_Handle encClass, uint32 cp_ndx, uint32 opcode) = 0;
+ virtual void throwLinkingException(Class_Handle encClass, U_32 cp_ndx, U_32 opcode) = 0;
/// convert unmanaged pointer to object. Boxing
virtual CG_OpndHandle* convUPtrToObject(ObjectType * dstType, CG_OpndHandle* val) = 0;
@@ -254,26 +254,26 @@
virtual CG_OpndHandle* getVTableAddr(Type *dstType, ObjectType *base) = 0;
virtual CG_OpndHandle* tau_ldIntfTableAddr(Type *dstType, CG_OpndHandle* base,
NamedType* vtableType) = 0;
- virtual CG_OpndHandle* call(uint32 numArgs, CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* call(U_32 numArgs, CG_OpndHandle** args, Type* retType,
MethodDesc *desc) = 0;
- virtual CG_OpndHandle* tau_call(uint32 numArgs, CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* tau_call(U_32 numArgs, CG_OpndHandle** args, Type* retType,
MethodDesc *desc,
CG_OpndHandle *tauNullChecked,
CG_OpndHandle *tauTypesChecked) = 0;
// for callvirt this reference is in args[0]
- virtual CG_OpndHandle* tau_callvirt(uint32 numArgs, CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* tau_callvirt(U_32 numArgs, CG_OpndHandle** args, Type* retType,
MethodDesc *desc, CG_OpndHandle* tauNullChecked,
CG_OpndHandle* tauTypesChecked) = 0;
- virtual CG_OpndHandle* tau_calli(uint32 numArgs,CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* tau_calli(U_32 numArgs,CG_OpndHandle** args, Type* retType,
CG_OpndHandle* methodPtr,
CG_OpndHandle* tauNullChecked,
CG_OpndHandle* tauTypesChecked) = 0;
- virtual CG_OpndHandle* callhelper(uint32 numArgs, CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* callhelper(U_32 numArgs, CG_OpndHandle** args, Type* retType,
JitHelperCallOp::Id callId) = 0;
- virtual CG_OpndHandle* callvmhelper(uint32 numArgs, CG_OpndHandle** args, Type* retType,
+ virtual CG_OpndHandle* callvmhelper(U_32 numArgs, CG_OpndHandle** args, Type* retType,
VM_RT_SUPPORT callId) = 0;
- virtual CG_OpndHandle* ldc_i4(int32 val) = 0;
+ virtual CG_OpndHandle* ldc_i4(I_32 val) = 0;
virtual CG_OpndHandle* ldc_i8(int64 val) = 0;
virtual CG_OpndHandle* ldc_s(float val) = 0;
virtual CG_OpndHandle* ldc_d(double val) = 0;
@@ -359,8 +359,8 @@
CG_OpndHandle* tauBaseNonNull,
CG_OpndHandle* tauIdxIsInBounds) = 0;
// COMPRESSED_PTR note: var is already uncompressed, so compression doesn't affect these:
- virtual CG_OpndHandle* ldVarAddr(uint32 varId) = 0;
- virtual CG_OpndHandle* ldVar(Type* dstType, uint32 varId) = 0;
+ virtual CG_OpndHandle* ldVarAddr(U_32 varId) = 0;
+ virtual CG_OpndHandle* ldVar(Type* dstType, U_32 varId) = 0;
virtual CG_OpndHandle* tau_arrayLen(Type* dstType, ArrayType* arrayType, Type* lenType,
CG_OpndHandle* array,
CG_OpndHandle* tauArrayNonNull,
@@ -398,18 +398,18 @@
CG_OpndHandle* tauAddressInRange,
CG_OpndHandle* tauElemTypeChecked) = 0;
// COMPRESSED_PTR note: var is already uncompressed, so compression doesn't affect it
- virtual void stVar(CG_OpndHandle* src, uint32 varId) = 0;
+ virtual void stVar(CG_OpndHandle* src, U_32 varId) = 0;
virtual CG_OpndHandle* newObj(ObjectType* objType) = 0;
virtual CG_OpndHandle* newArray(ArrayType* arrayType, CG_OpndHandle* numElems) = 0;
- virtual CG_OpndHandle* newMultiArray(ArrayType* arrayType, uint32 numDims, CG_OpndHandle** dims) = 0;
- virtual CG_OpndHandle* ldRef(Type* type,MethodDesc* enclosingMethod,uint32 stringToken, bool autouncompress) = 0;
- virtual CG_OpndHandle* ldToken(Type *dstType,MethodDesc* enclosingMethod,uint32 token) = 0;
- virtual void incCounter(Type *counterType,uint32 counter) = 0;
+ virtual CG_OpndHandle* newMultiArray(ArrayType* arrayType, U_32 numDims, CG_OpndHandle** dims) = 0;
+ virtual CG_OpndHandle* ldRef(Type* type,MethodDesc* enclosingMethod,U_32 stringToken, bool autouncompress) = 0;
+ virtual CG_OpndHandle* ldToken(Type *dstType,MethodDesc* enclosingMethod,U_32 token) = 0;
+ virtual void incCounter(Type *counterType,U_32 counter) = 0;
virtual void ret() = 0;
virtual void ret(CG_OpndHandle* returnValue) = 0;
- virtual CG_OpndHandle* defArg(uint32 position,Type *type) = 0;
+ virtual CG_OpndHandle* defArg(U_32 position,Type *type) = 0;
virtual void tau_monitorEnter(CG_OpndHandle* obj,
CG_OpndHandle* tauIsNonNull) = 0;
@@ -480,8 +480,8 @@
class Callback {
public:
virtual ~Callback() {}
- virtual uint32 defVar(Type* varType,bool isAddressTaken,bool isPinned) = 0;
- virtual void setManagedPointerBase(uint32 managedPtrVarNum, uint32 baseVarNum) = 0;
+ virtual U_32 defVar(Type* varType,bool isAddressTaken,bool isPinned) = 0;
+ virtual void setManagedPointerBase(U_32 managedPtrVarNum, U_32 baseVarNum) = 0;
};
virtual void genCode(Callback&) = 0;
};
@@ -505,22 +505,22 @@
public:
enum BlockKind {Prolog, InnerBlock, Epilog};
virtual ~Callback() {}
- virtual uint32 genDispatchNode(uint32 numInEdges,uint32 numOutEdges, const StlVector<MethodDesc*>& inlineEndMarkers, double cnt) = 0;
- virtual uint32 genBlock(uint32 numInEdges,uint32 numOutEdges, BlockKind blockKind,
+ virtual U_32 genDispatchNode(U_32 numInEdges,U_32 numOutEdges, const StlVector<MethodDesc*>& inlineEndMarkers, double cnt) = 0;
+ virtual U_32 genBlock(U_32 numInEdges,U_32 numOutEdges, BlockKind blockKind,
BlockCodeSelector&, double cnt) = 0;
- virtual uint32 genUnwindNode(uint32 numInEdges, uint32 numOutEdges,double cnt) = 0;
- virtual uint32 genExitNode(uint32 numInEdges, double cnt) = 0;
- virtual void genUnconditionalEdge(uint32 tailNodeId,uint32 headNodeId,double prob) = 0;
- virtual void genTrueEdge(uint32 tailNodeId,uint32 headNodeId,double prob) = 0;
- virtual void genFalseEdge(uint32 tailNodeId,uint32 headNodeId, double prob) = 0;
- virtual void genSwitchEdges(uint32 tailNodeId, uint32 numTargets,
- uint32 *targets, double *probs, uint32 defaultTarget) = 0;
- virtual void genExceptionEdge(uint32 tailNodeId, uint32 headNodeId, double prob) = 0;
- virtual void genCatchEdge(uint32 tailNodeId,uint32 headNodeId,
- uint32 priority,Type* exceptionType, double prob) = 0;
+ virtual U_32 genUnwindNode(U_32 numInEdges, U_32 numOutEdges,double cnt) = 0;
+ virtual U_32 genExitNode(U_32 numInEdges, double cnt) = 0;
+ virtual void genUnconditionalEdge(U_32 tailNodeId,U_32 headNodeId,double prob) = 0;
+ virtual void genTrueEdge(U_32 tailNodeId,U_32 headNodeId,double prob) = 0;
+ virtual void genFalseEdge(U_32 tailNodeId,U_32 headNodeId, double prob) = 0;
+ virtual void genSwitchEdges(U_32 tailNodeId, U_32 numTargets,
+ U_32 *targets, double *probs, U_32 defaultTarget) = 0;
+ virtual void genExceptionEdge(U_32 tailNodeId, U_32 headNodeId, double prob) = 0;
+ virtual void genCatchEdge(U_32 tailNodeId,U_32 headNodeId,
+ U_32 priority,Type* exceptionType, double prob) = 0;
// Set the persistent block ID for a given block.
- virtual void setPersistentId(uint32 nodeId, uint32 persistentId) = 0;
+ virtual void setPersistentId(U_32 nodeId, U_32 persistentId) = 0;
};
virtual void genCode(Callback&) = 0;
};
@@ -533,9 +533,9 @@
virtual ~MethodCodeSelector() {}
class Callback {
public:
- virtual void genVars(uint32 numLocals,VarCodeSelector&) = 0;
+ virtual void genVars(U_32 numLocals,VarCodeSelector&) = 0;
virtual void setMethodDesc(MethodDesc * desc) = 0;
- virtual void genCFG(uint32 numNodes,CFGCodeSelector&,bool useProfile) = 0;
+ virtual void genCFG(U_32 numNodes,CFGCodeSelector&,bool useProfile) = 0;
virtual ~Callback() {}
};
virtual void selectCode(Callback&) = 0;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.cpp Thu May 22 06:33:38 2008
@@ -24,7 +24,7 @@
return e;
}
-void InlineInfoMap::registerEntry(Entry* e, uint32 nativeOffs) {
+void InlineInfoMap::registerEntry(Entry* e, U_32 nativeOffs) {
entryByOffset[nativeOffs] = e;
for (Entry* current = e; current!=NULL; current = current->parentEntry) {
if (std::find(entries.begin(), entries.end(), current)!=entries.end()) {
@@ -35,17 +35,17 @@
}
}
-static uint32 getIndexSize(size_t nEntriesInIndex) {
- return (uint32)(2 * nEntriesInIndex * sizeof(uint32) + sizeof(uint32)); //zero ending list of [nativeOffset, entryOffsetInImage] pairs
+static U_32 getIndexSize(size_t nEntriesInIndex) {
+ return (U_32)(2 * nEntriesInIndex * sizeof(U_32) + sizeof(U_32)); //zero ending list of [nativeOffset, entryOffsetInImage] pairs
}
-uint32
+U_32
InlineInfoMap::getImageSize() const {
if (isEmpty()) {
- return sizeof(uint32);
+ return sizeof(U_32);
}
return getIndexSize(entryByOffset.size()) //index size
- + (uint32)(entries.size() * sizeof(Entry)); //all entries size;
+ + (U_32)(entries.size() * sizeof(Entry)); //all entries size;
}
@@ -63,7 +63,7 @@
InlineInfoMap::write(InlineInfoPtr image)
{
if (isEmpty()) {
- *(uint32*)image=0;
+ *(U_32*)image=0;
return;
}
@@ -78,7 +78,7 @@
assert(((char*)entriesPtr) == ((char*)image) + getImageSize());
//now update parentEntry reference to written entries
- for (uint32 i=0; i < entries.size(); i++) {
+ for (U_32 i=0; i < entries.size(); i++) {
Entry* imageChild = entriesInImage + i;
Entry* compileTimeParent = imageChild->parentEntry;
if (compileTimeParent!=NULL) {
@@ -90,16 +90,16 @@
}
//now write index header
- uint32* header = (uint32*)image;
- for (StlMap<uint32, Entry*>::iterator it = entryByOffset.begin(), end = entryByOffset.end(); it!=end; it++) {
- uint32 nativeOffset = it->first;
+ U_32* header = (U_32*)image;
+ for (StlMap<U_32, Entry*>::iterator it = entryByOffset.begin(), end = entryByOffset.end(); it!=end; it++) {
+ U_32 nativeOffset = it->first;
Entry* compileTimeEntry = it->second;
size_t entryIdx = std::find(entries.begin(), entries.end(), compileTimeEntry) - entries.begin();
assert(entryIdx<entries.size());
Entry* imageEntry = entriesInImage + entryIdx;
*header = nativeOffset;
header++;
- *header = (uint32)((char*)imageEntry - (char*)image);
+ *header = (U_32)((char*)imageEntry - (char*)image);
header++;
}
*header = 0;
@@ -108,12 +108,12 @@
}
-const InlineInfoMap::Entry* InlineInfoMap::getEntryWithMaxDepth(InlineInfoPtr ptr, uint32 nativeOffs) {
- uint32* header = (uint32*)ptr;
+const InlineInfoMap::Entry* InlineInfoMap::getEntryWithMaxDepth(InlineInfoPtr ptr, U_32 nativeOffs) {
+ U_32* header = (U_32*)ptr;
while (*header!=0) {
- uint32 nativeOffset = *header;
+ U_32 nativeOffset = *header;
header++;
- uint32 entryOffset = *header;
+ U_32 entryOffset = *header;
header++;
if (nativeOffset == nativeOffs) {
Entry* e = (Entry*)((char*)ptr + entryOffset);
@@ -123,7 +123,7 @@
return NULL;
}
-const InlineInfoMap::Entry* InlineInfoMap::getEntry(InlineInfoPtr ptr, uint32 nativeOffs, uint32 inlineDepth) {
+const InlineInfoMap::Entry* InlineInfoMap::getEntry(InlineInfoPtr ptr, U_32 nativeOffs, U_32 inlineDepth) {
const Entry* e = getEntryWithMaxDepth(ptr, nativeOffs);
while (e!=NULL) {
if (e->getInlineDepth() == inlineDepth) {
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/RuntimeInterface.h Thu May 22 06:33:38 2008
@@ -49,9 +49,9 @@
virtual bool recompiledMethodEvent(MethodDesc * methodDesc, void * data) = 0;
- virtual uint32 getInlineDepth(InlineInfoPtr ptr, uint32 offset) { return 0; }
- virtual Method_Handle getInlinedMethod(InlineInfoPtr ptr, uint32 offset, uint32 inline_depth) { return NULL; }
- virtual uint16 getInlinedBc(InlineInfoPtr ptr, uint32 offset, uint32 inline_depth) = 0;
+ virtual U_32 getInlineDepth(InlineInfoPtr ptr, U_32 offset) { return 0; }
+ virtual Method_Handle getInlinedMethod(InlineInfoPtr ptr, U_32 offset, U_32 inline_depth) { return NULL; }
+ virtual uint16 getInlinedBc(InlineInfoPtr ptr, U_32 offset, U_32 inline_depth) = 0;
};
@@ -77,7 +77,7 @@
/**
* Counts number of inlined calls in the chain, including this.
*/
- uint32 getInlineDepth() const {
+ U_32 getInlineDepth() const {
return (parentEntry == 0) ? 1 : 1 + parentEntry->getInlineDepth();
}
};
@@ -93,14 +93,14 @@
* Records unique mapping of a top-level entry to the specified native offset.
* Parent entries are added to a common list for future references.
*/
- void registerEntry(Entry* entry, uint32 nativeOff);
+ void registerEntry(Entry* entry, U_32 nativeOff);
bool isEmpty() const { return entries.empty();}
- uint32 getImageSize() const;
+ U_32 getImageSize() const;
void write(InlineInfoPtr output);
- static const Entry* getEntryWithMaxDepth(InlineInfoPtr ptr, uint32 nativeOffs);
- static const Entry* getEntry(InlineInfoPtr ptr, uint32 nativeOffs, uint32 inlineDepth);
+ static const Entry* getEntryWithMaxDepth(InlineInfoPtr ptr, U_32 nativeOffs);
+ static const Entry* getEntry(InlineInfoPtr ptr, U_32 nativeOffs, U_32 inlineDepth);
private:
MemoryManager& memManager;
/**
@@ -110,7 +110,7 @@
/**
* Unique mapping of native offset -> top-level entry
*/
- StlMap<uint32, Entry*> entryByOffset;
+ StlMap<U_32, Entry*> entryByOffset;
};
}
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp Thu May 22 06:33:38 2008
@@ -29,8 +29,8 @@
class APIMagicsHandlerSession: public SessionAction {
void runImpl();
- uint32 getNeedInfo()const{ return 0; }
- uint32 getSideEffects()const{ return 0; }
+ U_32 getNeedInfo()const{ return 0; }
+ U_32 getSideEffects()const{ return 0; }
bool isIRDumpEnabled(){ return true; }
};
@@ -38,13 +38,13 @@
static Opnd* getCallDst(CallInst* callInst) {
Inst::Opnds defs(callInst, Inst::OpndRole_InstLevel | Inst::OpndRole_Def | Inst::OpndRole_Explicit);
- uint32 idx = defs.begin();
+ U_32 idx = defs.begin();
return callInst->getOpnd(idx);
}
-static Opnd* getCallSrc(CallInst* callInst, uint32 n) {
+static Opnd* getCallSrc(CallInst* callInst, U_32 n) {
Inst::Opnds uses(callInst, Inst::OpndRole_InstLevel | Inst::OpndRole_Use | Inst::OpndRole_Explicit);
- uint32 idx = uses.begin(); //the first use is call addr
- for (uint32 i=0; i<=n; i++) {
+ U_32 idx = uses.begin(); //the first use is call addr
+ for (U_32 i=0; i<=n; i++) {
idx = uses.next(idx);
}
return callInst->getOpnd(idx);
@@ -973,7 +973,7 @@
#endif
Type * indexType = typeManager.getIntPtrType();
- uint32 elemSize = 0;
+ U_32 elemSize = 0;
if (elemType->isReference()
&& Type::isCompressedReference(elemType->tag, irm->getCompilationInterface())
&& !elemType->isCompressedReference()) {
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp Thu May 22 06:33:38 2008
@@ -27,7 +27,7 @@
{
namespace Ia32{
-const uint32 BBPollingMaxVersion = 6;
+const U_32 BBPollingMaxVersion = 6;
//========================================================================================
// class BBPolling
@@ -38,11 +38,11 @@
*/
class BBPolling
{
-typedef ::std::pair<uint32,uint32> targetIdDispatchIdPair;
+typedef ::std::pair<U_32,U_32> targetIdDispatchIdPair;
typedef StlMap<targetIdDispatchIdPair,Node*> BBPControllersMap;
public:
- BBPolling(IRManager& ir,uint32 ver) :
+ BBPolling(IRManager& ir,U_32 ver) :
irManager(ir),
version(ver),
hasThreadInterruptablePoint(irManager.getMemoryManager(), irManager.getFlowGraph()->getMaxNodeId(), false),
@@ -84,8 +84,8 @@
#endif
}
- uint32 numberOfAffectedEdges() { return (uint32)eligibleEdges.size(); }
- Edge* getAffectedEdge(uint32 i) { assert(i < eligibleEdges.size()); return eligibleEdges[i]; }
+ U_32 numberOfAffectedEdges() { return (U_32)eligibleEdges.size(); }
+ Edge* getAffectedEdge(U_32 i) { assert(i < eligibleEdges.size()); return eligibleEdges[i]; }
Opnd* getOrCreateTLSBaseReg(Edge* e);
@@ -95,8 +95,8 @@
bool hasAllThreadInterruptablePredecessors(const Node* node);
- Node* getBBPSubCFGController(uint32 targetId, uint32 dispatchId);
- void setBBPSubCFGController(uint32 targetId, uint32 dispatchId, Node* node);
+ Node* getBBPSubCFGController(U_32 targetId, U_32 dispatchId);
+ void setBBPSubCFGController(U_32 targetId, U_32 dispatchId, Node* node);
ControlFlowGraph* createBBPSubCFG(IRManager& ir, Opnd* tlsBaseReg);
private:
@@ -139,7 +139,7 @@
// 5 - like "1" but some backedges are not patched (if all paths through it are uninterpretable)
// 6 - "4" + "5"
// 7.. illegal
- uint32 version;
+ U_32 version;
// storage for ThreadInterruptablePoints information
// hasThreadInterruptablePoint[Node->getId()] == true means that the Node is a LoopHeader
// OR It has at least one instruction that isThreadInterruptablePoint(inst)
@@ -159,7 +159,7 @@
// to get the toppest loop header of the given without calling getLoopHeader
StlVector<Node*> toppestLoopHeader;
// start index in otheredges collection for the topmost loop headers
- StlVector<uint32> otherStartNdx;
+ StlVector<U_32> otherStartNdx;
// just a collection of loop headers of the method (Basic blocks only!)
StlVector<Node*> loopHeaders;
@@ -169,11 +169,11 @@
StlVector<Edge*> eligibleEdges;
/// Offset of the suspension flag in the VM's structure stored in TLS.
- uint32 gcFlagOffsetOffset;
+ U_32 gcFlagOffsetOffset;
#ifdef _DEBUG
- uint32 interruptablePoints;
- uint32 pollingPoints;
+ U_32 interruptablePoints;
+ U_32 pollingPoints;
#endif
StlHashMap<Edge*, Node *> loopHeaderOfEdge;
@@ -204,19 +204,19 @@
Log::out() << "BBPolling transformer version="<< version <<" STARTED" << ::std::endl;
}
BBPolling bbp = BBPolling(*irManager, version);
- uint32 numOfAffectedEdges = bbp.numberOfAffectedEdges();
+ U_32 numOfAffectedEdges = bbp.numberOfAffectedEdges();
hasSideEffects = numOfAffectedEdges != 0;
ControlFlowGraph* fg = irManager->getFlowGraph();
// Foreach eligible backedge create bbpCFG and inline it between the backedge's Tail and it's target
- for (uint32 j = 0; j < numOfAffectedEdges; j++) {
+ for (U_32 j = 0; j < numOfAffectedEdges; j++) {
Edge* edge = bbp.getAffectedEdge(j);
// get or create and insert before the loopHeade a basic block for calculating TLS base
Opnd* tlsBaseReg = bbp.getOrCreateTLSBaseReg(edge);
- uint32 originalTargetId = edge->getTargetNode()->getId();
+ U_32 originalTargetId = edge->getTargetNode()->getId();
Edge* srcDispatchEdge = edge->getSourceNode()->getExceptionEdge();
- uint32 sourceDispatchId = srcDispatchEdge ? srcDispatchEdge->getTargetNode()->getId() : 0;
+ U_32 sourceDispatchId = srcDispatchEdge ? srcDispatchEdge->getTargetNode()->getId() : 0;
// CFG for inlining
Node* bbpCFGController = bbp.getBBPSubCFGController(originalTargetId,sourceDispatchId);
if (bbpCFGController) { // just retarget the edge
@@ -237,10 +237,10 @@
if (Log::isEnabled())
Log::out() << "BBPolling transformer FINISHED" << ::std::endl;
} //runImpl()
- uint32 getNeedInfo()const{ return NeedInfo_LoopInfo; }
- uint32 getSideEffects()const{ return hasSideEffects ? SideEffect_InvalidatesLoopInfo|SideEffect_InvalidatesLivenessInfo : 0; }
+ U_32 getNeedInfo()const{ return NeedInfo_LoopInfo; }
+ U_32 getSideEffects()const{ return hasSideEffects ? SideEffect_InvalidatesLoopInfo|SideEffect_InvalidatesLivenessInfo : 0; }
bool isIRDumpEnabled(){ return true; }
- uint32 version;
+ U_32 version;
};
static ActionFactory<BBPollingTransformer> _bbp("bbp");
@@ -252,7 +252,7 @@
Node* loopHeader = toppestLoopHeader[loopHeaderOfEdge[e]->getId()];
assert(loopHeader);
- const uint32 id = loopHeader->getId();
+ const U_32 id = loopHeader->getId();
Opnd* tlsBaseReg = tlsBaseRegForLoopHeader[id];
if ( tlsBaseReg ) { // it is already created for this loop
@@ -284,10 +284,10 @@
}
// inserting bbpFlagAddrBlock before the given loopHeader
- uint32 startIndex = otherStartNdx[id];
+ U_32 startIndex = otherStartNdx[id];
ControlFlowGraph* fg = irManager.getFlowGraph();
- for (uint32 otherIdx = startIndex; ; otherIdx++) {
+ for (U_32 otherIdx = startIndex; ; otherIdx++) {
if (otherIdx == otherEdges.size())
break;
Edge* other = otherEdges[otherIdx];
@@ -304,7 +304,7 @@
}
Node*
-BBPolling::getBBPSubCFGController(uint32 targetId, uint32 dispatchId)
+BBPolling::getBBPSubCFGController(U_32 targetId, U_32 dispatchId)
{
const BBPControllersMap::iterator iter = bbpCFGControllerForNode.find(::std::make_pair(targetId,dispatchId));
if (iter == bbpCFGControllerForNode.end()) {
@@ -315,7 +315,7 @@
}
void
-BBPolling::setBBPSubCFGController(uint32 targetId, uint32 dispatchId, Node* node)
+BBPolling::setBBPSubCFGController(U_32 targetId, U_32 dispatchId, Node* node)
{
assert(node);
assert(!bbpCFGControllerForNode.has(::std::make_pair(targetId,dispatchId)));
@@ -454,7 +454,7 @@
const Nodes& postOrder = irManager.getFlowGraph()->getNodesPostOrder();
for (Nodes::const_reverse_iterator it = postOrder.rbegin(), end = postOrder.rend(); it!=end; ++it) {
Node* node = *it;
- const uint32 id = node->getId();
+ const U_32 id = node->getId();
if (lt->isLoopHeader(node) && node->isBlockNode()) {
loopHeaders.push_back(node);
@@ -470,7 +470,7 @@
if ( !toppestLoopHeader[id] ) {
toppestLoopHeader[id] = loopHeader;
// here we need to remember all otheredges and their start index for particular loopHeader
- otherStartNdx[loopHeader->getId()] = (uint32)otherEdges.size();
+ otherStartNdx[loopHeader->getId()] = (U_32)otherEdges.size();
const Edges& edges = loopHeader->getInEdges();
for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
Edge* e = *ite;
@@ -510,17 +510,17 @@
{
assert(loopHeaders.size());
LoopTree* lt = irManager.getFlowGraph()->getLoopTree();
- uint32 maxLoopDepth = lt->getMaxLoopDepth();
+ U_32 maxLoopDepth = lt->getMaxLoopDepth();
// process the deepest firstly
- for (uint32 currDepth = maxLoopDepth; currDepth > 0; currDepth--)
+ for (U_32 currDepth = maxLoopDepth; currDepth > 0; currDepth--)
{
- for (uint32 i=0; i < loopHeaders.size(); i++)
+ for (U_32 i=0; i < loopHeaders.size(); i++)
{
Node* loopHeader = loopHeaders[i];
LoopNode* loop = lt->getLoopNode(loopHeader, false);
assert(loopHeader == loop->getHeader());
- const uint32 loopHeaderId = loopHeader->getId();
+ const U_32 loopHeaderId = loopHeader->getId();
if (loop->getDepth() == currDepth - 1) {
if (hasNativeInterruptablePoint[loopHeaderId]) {
// fortunately we can skip this loop, because it is already interruptable ( it has respective
@@ -558,7 +558,7 @@
bool
BBPolling::isOnInterruptablePath(Node* node)
{
- const uint32 id = node->getId();
+ const U_32 id = node->getId();
// the order of these check is essential! (because in case of nested loops
// if the node is a loopHeader of a nested loop we must return true)
LoopTree* lt = irManager.getFlowGraph()->getLoopTree();
@@ -597,7 +597,7 @@
BBPolling::collectEligibleEdges()
{
LoopTree* lt = irManager.getFlowGraph()->getLoopTree();
- for (uint32 i=0; i < loopHeaders.size(); i++) {
+ for (U_32 i=0; i < loopHeaders.size(); i++) {
Node* node = loopHeaders[i];
const Edges& edges = node->getInEdges();
for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
@@ -621,7 +621,7 @@
const Nodes& nodes = irManager.getFlowGraph()->getNodes();
for (Nodes::const_iterator it = nodes.begin(), end = nodes.end(); it!=end; ++it) {
Node* node = *it;
- const uint32 id = node->getId();
+ const U_32 id = node->getId();
if ( isOnThreadInterruptablePath[id] && ! hasNativeInterruptablePoint[id] ) {
const Edges& edges = node->getOutEdges();
LoopNode* nodeLoop = lt->getLoopNode(node, false);
@@ -629,7 +629,7 @@
for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
Edge* e = *ite;
Node* succ = e->getTargetNode();
- uint32 succId = succ->getId();
+ U_32 succId = succ->getId();
if (nodeLoop->inLoop(succ)) {
if( !isOnThreadInterruptablePath[succId] ) {
eligibleEdges.push_back(e);
@@ -647,7 +647,7 @@
void
BBPolling::collectEligibleEdgesRecursive()
{
- for (uint32 i=0; i < loopHeaders.size(); i++)
+ for (U_32 i=0; i < loopHeaders.size(); i++)
{
collectEdgesDeeper(loopHeaders[i]);
}
@@ -660,7 +660,7 @@
void
BBPolling::collectEdgesDeeper(Node* node)
{
- uint32 id = node->getId();
+ U_32 id = node->getId();
if (hasNativeInterruptablePoint[id]) {
return;
}
@@ -674,7 +674,7 @@
for (Edges::const_iterator ite = edges.begin(), ende = edges.end(); ite!=ende; ++ite) {
Edge* e = *ite;
Node* succ = e->getTargetNode();
- uint32 succId = succ->getId();
+ U_32 succId = succ->getId();
if ( succ == node ) {
eligibleEdges.push_back(e);
loopHeaderOfEdge[e] = node;
@@ -712,10 +712,10 @@
{
assert(Log::isEnabled());
Log::out() << " EligibleEdges:" << ::std::endl;
- for (uint32 i = 0; eligibleEdges.size() > i; i++) {
+ for (U_32 i = 0; eligibleEdges.size() > i; i++) {
Edge* e = eligibleEdges[i];
- uint32 srcId = e->getSourceNode()->getId();
- uint32 succId = e->getTargetNode()->getId();
+ U_32 srcId = e->getSourceNode()->getId();
+ U_32 succId = e->getTargetNode()->getId();
Log::out() << " eligibleEdge ["<<srcId<<"]-->["<<succId<<"]" << ::std::endl;
}
Log::out() << " EligibleEdges END! " << ::std::endl;
@@ -740,7 +740,7 @@
Node* unwind = irManager.getFlowGraph()->getUnwindNode();
Node* exit = irManager.getFlowGraph()->getExitNode();
- for (uint32 i=0; i < loopHeaders.size(); i++)
+ for (U_32 i=0; i < loopHeaders.size(); i++)
{
assert(interruptablePoints == 0);
assert(pollingPoints == 0);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BCMap.h Thu May 22 06:33:38 2008
@@ -31,7 +31,7 @@
namespace Ia32 {
-typedef StlHashMap<uint32, uint16> BCByNCMap;
+typedef StlHashMap<U_32, uint16> BCByNCMap;
/**
* Bcmap is simple storage with precise mapping between native offset in a method to
* byte code, i.e. if there is no byte code for certain native offset in a method then
@@ -42,17 +42,17 @@
public:
BcMap(MemoryManager& memMgr) : theMap(memMgr) {}
- uint32 getByteSize() const {
- return 4 /*size*/+(uint32)theMap.size() * (4 + 2/*native offset + bc offset*/);
+ U_32 getByteSize() const {
+ return 4 /*size*/+(U_32)theMap.size() * (4 + 2/*native offset + bc offset*/);
}
void write(U_8* image) {
- *((uint32*)image)=(uint32)theMap.size();
- uint32 imageOffset = 4;
+ *((U_32*)image)=(U_32)theMap.size();
+ U_32 imageOffset = 4;
for (BCByNCMap::const_iterator it = theMap.begin(), end = theMap.end(); it!=end; it++) {
- uint32 nativeOffset = it->first;
+ U_32 nativeOffset = it->first;
uint16 bcOffset = it->second;
- *((uint32*)(image + imageOffset)) = nativeOffset;
+ *((U_32*)(image + imageOffset)) = nativeOffset;
imageOffset+=4;
*((uint16*)(image + imageOffset)) = bcOffset;
imageOffset+=2;
@@ -61,20 +61,20 @@
}
POINTER_SIZE_INT readByteSize(const U_8* image) const {
- uint32 sizeOfMap = *(uint32*)image;;
+ U_32 sizeOfMap = *(U_32*)image;;
return 4 + sizeOfMap * (4+2);
}
- void setEntry(uint32 key, uint16 value) {
+ void setEntry(U_32 key, uint16 value) {
theMap[key] = value;
}
- static uint16 get_bc_offset_for_native_offset(uint32 ncOffset, U_8* image) {
- uint32 mapSize = *(uint32*)image; //read map size
- uint32 imageOffset=4;
- for (uint32 i = 0; i < mapSize; i++) {
- uint32 nativeOffset = *(uint32*)(image+imageOffset);
+ static uint16 get_bc_offset_for_native_offset(U_32 ncOffset, U_8* image) {
+ U_32 mapSize = *(U_32*)image; //read map size
+ U_32 imageOffset=4;
+ for (U_32 i = 0; i < mapSize; i++) {
+ U_32 nativeOffset = *(U_32*)(image+imageOffset);
imageOffset+=4;
uint16 bcOffset = *(uint16*)(image+imageOffset);
imageOffset+=2;
@@ -85,11 +85,11 @@
return ILLEGAL_BC_MAPPING_VALUE;
}
- static uint32 get_native_offset_for_bc_offset(uint16 bcOff, U_8* image) {
- uint32 mapSize = *(uint32*)image; //read map size
- uint32 imageOffset=4;
- for (uint32 i = 0; i < mapSize; i++) {
- uint32 nativeOffset = *(uint32*)(image+imageOffset);
+ static U_32 get_native_offset_for_bc_offset(uint16 bcOff, U_8* image) {
+ U_32 mapSize = *(U_32*)image; //read map size
+ U_32 imageOffset=4;
+ for (U_32 i = 0; i < mapSize; i++) {
+ U_32 nativeOffset = *(U_32*)(image+imageOffset);
imageOffset+=4;
uint16 bcOffset = *(uint16*)(image+imageOffset);
imageOffset+=2;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BranchTrans.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BranchTrans.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BranchTrans.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BranchTrans.cpp Thu May 22 06:33:38 2008
@@ -108,8 +108,8 @@
v2 = int64(int16(v2));
break;
case OpndSize_32:
- v1 = int64(int32(v1));
- v2 = int64(int32(v2));
+ v1 = int64(I_32(v1));
+ v2 = int64(I_32(v2));
break;
default:
break;
@@ -368,8 +368,8 @@
Inst * cmpInst = brachInst->getPrevInst();
if (cmpInst && falseInst) {
- uint32 prevDefCount = cmpInst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
- uint32 falseDefCount = falseInst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
+ U_32 prevDefCount = cmpInst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
+ U_32 falseDefCount = falseInst->getOpndCount(Inst::OpndRole_InstLevel|Inst::OpndRole_Def);
Inst * nextFalse = falseInst->getNextInst();
// check if we have following in current BB:
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CFG.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CFG.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CFG.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CFG.h Thu May 22 06:33:38 2008
@@ -54,8 +54,8 @@
exception handlers, the handler with the highest priority handles it.
The smaller the priority number the hight is the priority.
*/
- uint32 getPriority()const {return priority;}
- void setPriority(uint32 p) {priority = p;}
+ U_32 getPriority()const {return priority;}
+ void setPriority(U_32 p) {priority = p;}
//---------------------------------------------------------------------------------------------
protected:
@@ -71,7 +71,7 @@
exception handlers, the handler with the highest priority handles it.
The smaller the priority number the hight is the priority.
*/
- uint32 priority;
+ U_32 priority;
//---------------------------------------------------------------------------------------------
};
@@ -92,9 +92,9 @@
};
/** Returns the persistent id of the node (HIR CFG node id resulting to this node) */
- uint32 getPersistentId()const {return persistentId; }
+ U_32 getPersistentId()const {return persistentId; }
/** Sets the persistent id of the node (HIR CFG node id resulting to this node) */
- void setPersistentId(uint32 persId) { persistentId = persId; }
+ void setPersistentId(U_32 persId) { persistentId = persId; }
IRManager & getIRManager() { return irm; }
@@ -111,7 +111,7 @@
IRManager& irm;
BitSet* liveAtEntry;
- uint32 persistentId;
+ U_32 persistentId;
friend class IRManager;
@@ -135,13 +135,13 @@
void setLayoutSucc(BasicBlock *bb) {assert(bb!=this); layoutSucc = bb;}
/** sets the offset of native code for this basic block */
- void setCodeOffset(uint32 offset) {codeOffset = offset;}
+ void setCodeOffset(U_32 offset) {codeOffset = offset;}
/** returns the offset of native code for this basic block */
- uint32 getCodeOffset()const { return codeOffset; }
+ U_32 getCodeOffset()const { return codeOffset; }
/** sets the size of native code for this basic block */
- void setCodeSize(uint32 size) {codeSize = size;}
+ void setCodeSize(U_32 size) {codeSize = size;}
/** returns the size of native code for this basic block */
- uint32 getCodeSize()const { return codeSize; }
+ U_32 getCodeSize()const { return codeSize; }
/** returns the pointer to the native code for this basic block */
void* getCodeStartAddr() const;
@@ -155,8 +155,8 @@
protected:
BasicBlock * layoutSucc;
- uint32 codeOffset;
- uint32 codeSize;
+ U_32 codeOffset;
+ U_32 codeSize;
void* codeAddr;
};
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CallingConvention.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CallingConvention.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CallingConvention.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CallingConvention.cpp Thu May 22 06:33:38 2008
@@ -68,10 +68,10 @@
#ifdef _IA32_
//______________________________________________________________________________________
-void STDCALLCallingConventionIA32::getOpndInfo(ArgKind kind, uint32 count, OpndInfo * infos) const
+void STDCALLCallingConventionIA32::getOpndInfo(ArgKind kind, U_32 count, OpndInfo * infos) const
{
if (kind == ArgKind_InArg) {
- for (uint32 i=0; i<count; i++){
+ for (U_32 i=0; i<count; i++){
Type::Tag typeTag=(Type::Tag)infos[i].typeTag;
OpndSize size=IRManager::getTypeSize(typeTag);
@@ -120,17 +120,17 @@
}
#else
-void STDCALLCallingConventionEM64T::getOpndInfo(ArgKind kind, uint32 count, OpndInfo * infos) const
+void STDCALLCallingConventionEM64T::getOpndInfo(ArgKind kind, U_32 count, OpndInfo * infos) const
{
if (kind == ArgKind_InArg) {
- uint32 gpreg = 0;
+ U_32 gpreg = 0;
#ifdef _WIN64
#define fpreg gpreg
#else
- uint32 fpreg = 0;
+ U_32 fpreg = 0;
#endif
- for (uint32 i=0; i<count; i++){
+ for (U_32 i=0; i<count; i++){
Type::Tag typeTag=(Type::Tag)infos[i].typeTag;
if(((typeTag>Type::Float ||typeTag<Type::Single) && gpreg < lengthof(fastCallGPRegs))) {
@@ -212,7 +212,7 @@
//______________________________________________________________________________________
#ifdef _IA32_
-void ManagedCallingConventionIA32::getOpndInfo(ArgKind kind, uint32 count, OpndInfo * infos) const
+void ManagedCallingConventionIA32::getOpndInfo(ArgKind kind, U_32 count, OpndInfo * infos) const
{
if (kind == ArgKind_RetArg) {
assert(count <= 1);
@@ -238,10 +238,10 @@
#ifdef _IA32_
#else
-void MultiArrayCallingConventionEM64T::getOpndInfo(ArgKind kind, uint32 count, OpndInfo * infos) const
+void MultiArrayCallingConventionEM64T::getOpndInfo(ArgKind kind, U_32 count, OpndInfo * infos) const
{
if (kind == ArgKind_InArg){
- for (uint32 i = 0; i < count; i++) {
+ for (U_32 i = 0; i < count; i++) {
infos[i].slotCount = 1;
infos[i].slots[0] = RegName_Null;
infos[i].isReg = false;