changes
authorbdemsky <bdemsky>
Fri, 3 Jun 2011 23:50:21 +0000 (23:50 +0000)
committerbdemsky <bdemsky>
Fri, 3 Jun 2011 23:50:21 +0000 (23:50 +0000)
Robust/src/Runtime/runtime.c
Robust/src/Runtime/runtime.h

index 948f4ac5404d78a2c1c04b5c36e59226574091f9..1df3a6bda624c1621d9b97a63ecf60c5f1b89214 100644 (file)
@@ -90,7 +90,7 @@ typedef unsigned long long ticks;
 #include "dmalloc.h"
 #endif
 
-int instanceof(struct ___Object___ *ptr, int type) {
+int instanceof(ObjectPtr *ptr, int type) {
   int i=ptr->type;
   do {
     if (i==type)
@@ -808,7 +808,7 @@ __attribute__((malloc)) void * allocate_new_mlp(void * ptr, int type, int oid, i
 #else
 __attribute__((malloc)) void * allocate_new(void * ptr, int type) {
 #endif
-  struct ___Object___ * v=(struct ___Object___ *) mygcmalloc((struct garbagelist *) ptr, classsize[type]);
+  struct ObjectPtr * v=(struct ObjectPtr *) mygcmalloc((struct garbagelist *) ptr, classsize[type]);
   v->type=type;
   v->hashcode=(int)(INTPTR)v;
 #ifdef THREADS
@@ -856,7 +856,7 @@ __attribute__((malloc)) struct ArrayObject * allocate_newarray(void * ptr, int t
 
 #else
 __attribute__((malloc)) void * allocate_new(int type) {
-  struct ___Object___ * v=FREEMALLOC(classsize[type]);
+  struct ObjectPtr * v=FREEMALLOC(classsize[type]);
   v->type=type;
   v->hashcode=(int)(INTPTR)v;
 #ifdef OPTIONAL
index 8f82131624b57b48553f38449390c123191d86f2..9c00112ef872058a7a8cb2345cc9d7dec8ddd5c8 100644 (file)
@@ -283,42 +283,23 @@ int enqueuetasks(struct parameterwrapper *parameter, struct parameterwrapper *pr
 #endif
 
 #if defined(__i386__)
-
 static __inline__ unsigned long long rdtsc(void) {
   unsigned long long int x;
   __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
   return x;
 }
 #elif defined(__x86_64__)
-
 static __inline__ unsigned long long rdtsc(void) {
   unsigned hi, lo;
   __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
   return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
 }
+#endif
 
-#elif defined(__powerpc__)
-
-typedef unsigned long long int unsigned long long;
-
-static __inline__ unsigned long long rdtsc(void) {
-  unsigned long long int result=0;
-  unsigned long int upper, lower,tmp;
-  __asm__ volatile (
-    "0:                  \n"
-    "\tmftbu   %0           \n"
-    "\tmftb    %1           \n"
-    "\tmftbu   %2           \n"
-    "\tcmpw    %2,%0        \n"
-    "\tbne     0b         \n"
-    : "=r" (upper),"=r" (lower),"=r" (tmp)
-    );
-  result = upper;
-  result = result<<32;
-  result = result|lower;
-
-  return(result);
-}
+#ifdef JNI
+typedef struct ___java___________lang___________Object___ * ObjectPtr
+#else
+typedef struct ___Object___ * ObjectPtr
 #endif