* src/threads/posix/thread-posix.hpp: Likewise.
* src/vm/class.cpp: Likewise.
* src/vm/classcache.cpp: Likewise.
* src/vm/jit/arm/codegen.c: Likewise.
* src/vm/jit/arm/md.c: Likewise.
* src/vm/jit/i386/md-atomic.hpp: Likewise.
* src/vm/jit/codegen-common.cpp: Likewise.
* src/vm/jit/trap.cpp: Likewise.
* src/vm/jit/verify/typeinfo.cpp: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.
* src/vm/jit/x86_64/patcher.c: Likewise.
* src/vm/options.c: Likewise.
* src/vm/vm.cpp: Likewise.
/* src/threads/posix/thread-posix.cpp - POSIX thread functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
void threads_impl_preinit(void)
{
- int result;
-
stopworldlock = new Mutex();
/* initialize exit mutex and condition (on exit we join all
#endif
#if !defined(HAVE___THREAD)
- result = pthread_key_create(&thread_current_key, NULL);
+ int result = pthread_key_create(&thread_current_key, NULL);
if (result != 0)
os::abort_errnum(result, "threads_impl_preinit: pthread_key_create failed");
#endif
result = pthread_setspecific(thread_current_key, t);
if (result != 0)
-#warning Use below method instead!
//os::abort_errnum(result, "thread_set_current: pthread_setspecific failed");
vm_abort("thread_set_current: pthread_setspecific failed");
#endif
static void class_freecpool(classinfo *c)
{
- u4 idx;
+ int idx;
u4 tag;
void* info;
/* check index and type of constantpool entry */
/* (pos == 0 is caught by type comparison) */
- if ((pos >= c->cpcount) || (c->cptags[pos] != ctype)) {
+ if (((int) pos >= c->cpcount) || (c->cptags[pos] != ctype)) {
exceptions_throw_classformaterror(c, "Illegal constant pool index");
return NULL;
}
{
/* invalid position in constantpool */
- if (pos >= c->cpcount) {
+ if ((int) pos >= c->cpcount) {
exceptions_throw_classformaterror(c, "Illegal constant pool index");
return NULL;
}
java_handle_objectarray_t* class_get_interfaces(classinfo *c)
{
classinfo* ic;
- u4 i;
+ int i;
if (!(c->state & CLASS_LINKED))
if (!link_class(c))
#if !defined(NDEBUG)
void class_showconstantpool (classinfo *c)
{
- u4 i;
+ int i;
void* e;
printf ("---- dump of constant pool ----\n");
for (i=0; i<c->cpcount; i++) {
- printf ("#%d: ", (int) i);
+ printf ("#%d: ", i);
e = c -> cpinfos [i];
if (e) {
/* src/vm/classcache.cpp - loaded class cache and loading constraints
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
classcache_name_entry *en;
classcache_class_entry *clsen;
s4 number;
- s4 i;
+ u4 i;
/* initialize class counter */
{
classcache_name_entry *en;
classcache_class_entry *clsen;
- s4 i;
+ u4 i;
CLASSCACHE_LOCK();
/* src/vm/jit/arm/codegen.c - machine code generator for Arm
- Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
int32_t disp;
// Get required compiler data.
- codeinfo* code = jd->code;
codegendata* cd = jd->cd;
/* the big switch */
/* src/vm/jit/arm/md.c - machine dependent ARM functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
Copyright (C) 2009 Theobroma Systems Ltd.
case TRAP_SIGSEGV:
{
// Sanity check for load/store instruction.
-#warning Implement this!
+ // FIXME Implement this!
// Retrieve base address of load/store instruction.
uintptr_t addr = es->intregs[(mcode >> 16) & 0x0f];
bool codegen_emit(jitdata *jd)
{
varinfo* var;
- builtintable_entry* bte;
+ builtintable_entry* bte = 0;
methoddesc* md;
int32_t s1, s2, /*s3,*/ d;
int32_t fieldtype;
disp = dseg_add_unique_address(cd, 0);
pr = patcher_add_patch_ref(jd, PATCHER_get_putstatic, uf, disp);
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
patcher_add_patch_ref(jd, PATCHER_initialize_class, fi->clazz, 0);
PROFILE_CYCLE_START;
}
+
+ pr = NULL; /* Silence compiler warning */
}
#if defined(USES_PATCHABLE_MEMORY_BARRIER)
M_DLD(d, REG_ITMP1, 0);
break;
#endif
+ default:
+ // Silence compiler warning.
+ d = 0;
}
emit_store_dst(jd, iptr, d);
break;
disp = dseg_add_unique_address(cd, 0);
pr = patcher_add_patch_ref(jd, PATCHER_get_putstatic, uf, disp);
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
patcher_add_patch_ref(jd, PATCHER_initialize_class, fi->clazz, 0);
PROFILE_CYCLE_START;
}
+
+ pr = NULL; /* Silence compiler warning */
}
// XXX X86_64: Here We had this:
/* src/vm/jit/i386/atomic.hpp - i386 atomic instructions
- Copyright (C) 2008
+ Copyright (C) 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
*/
inline uint64_t compare_and_swap(volatile uint64_t *p, uint64_t oldval, uint64_t newval)
{
-#warning Should we use cmpxchg8b or a generic version?
return Atomic::generic_compare_and_swap(p, oldval, newval);
}
/* Get resulting exception (or pointer to compiled method). */
java_handle_t* p;
- void* entry;
- bool was_patched;
+ void* entry = 0;
+ bool was_patched = false;
#if defined(ENABLE_REPLACEMENT)
bool was_replaced;
#endif
/* src/vm/jit/verify/typeinfo.c - type system used by the type checker
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
#define TYPEINFO_TEST_MAXDIM 10
static void
-typeinfo_testrun(char *filename)
+typeinfo_testrun(const char *filename)
{
char buf[TYPEINFO_TEST_BUFLEN];
char bufa[TYPEINFO_TEST_BUFLEN];
/* src/vm/jit/x86_64/codegen.c - machine code generator for x86_64
- Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
pr = patcher_add_patch_ref(jd, PATCHER_get_putstatic, uf, disp);
/* PROFILE_CYCLE_START; */
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
//PROFILE_CYCLE_START;
}
+
+ pr = NULL; /* Silence compiler warning */
}
/* This approach is much faster than moving the field
patcher_add_patch_ref(jd, PATCHER_get_putfield, uf, 0);
/* PROFILE_CYCLE_START; */
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
d = codegen_reg_of_dst(jd, iptr, REG_FTMP1);
M_DLD32(d, s1, disp);
break;
+ default:
+ // Silence compiler warning.
+ d = 0;
}
emit_store_dst(jd, iptr, d);
break;
pr = patcher_add_patch_ref(jd, PATCHER_get_putfield, uf, 0);
/* PROFILE_CYCLE_START; */
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
fieldtype = fi->type;
disp = fi->offset;
+
+ pr = NULL; /* Silence compiler warning */
}
/* implicit null-pointer check */
pr = patcher_add_patch_ref(jd, PATCHER_putfieldconst, uf, 0);
/* PROFILE_CYCLE_START; */
+
+ fi = NULL; /* Silence compiler warning */
}
else {
fi = iptr->sx.s23.s3.fmiref->p.field;
fieldtype = fi->type;
disp = fi->offset;
+
+ pr = NULL; /* Silence compiler warning */
}
/* implicit null-pointer check */
/* src/vm/jit/x86_64/patcher.c - x86_64 code patching functions
- Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
assert((((uintptr_t) pc) & 3) < 2);
if (((uintptr_t) pc) & 1)
- *p = *p & 0x000000ff | 0x001f0f00;
+ *p = (*p & 0x000000ff) | 0x001f0f00;
else
- *p = *p & 0xff000000 | 0x00001f0f;
+ *p = (*p & 0xff000000) | 0x00001f0f;
md_icacheflush(p, 4);
}
/* src/vm/options.c - contains global options
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
file = fopen(filename, "w");
if (file == NULL)
-#warning Use below method instead!
+ /* FIXME Use below method instead! */
//os::abort_errno("options_xx: fopen failed");
vm_abort("options_xx: fopen failed");
/* src/vm/vm.cpp - VM startup and shutdown functions
- Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009, 2010
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
is smaller or equal than the assumption made in
src/vm/class.hpp. */
-#warning FIXME We need to check the size of java.lang.Class!!!
+// FIXME We need to check the size of java.lang.Class!!!
// if (sizeof(java_lang_Class) > sizeof(dummy_java_lang_Class))
// vm_abort("vm_create: java_lang_Class structure is bigger than classinfo.object (%d > %d)", sizeof(java_lang_Class), sizeof(dummy_java_lang_Class));
/* VM is gone. */
// _created = false;
-#warning Move to C++
/* Everything is ok. */
/* signal that we are exiting */
// _exiting = true;
-#warning Move to C++
assert(class_java_lang_System);
assert(class_java_lang_System->state & CLASS_LOADED);