* src/vm/options.c: Renamed runverbose to opt_verbosecall.
authortwisti <none@none>
Wed, 1 Mar 2006 17:00:33 +0000 (17:00 +0000)
committertwisti <none@none>
Wed, 1 Mar 2006 17:00:33 +0000 (17:00 +0000)
* src/vm/options.h: Likewise.
* src/vm/jit/alpha/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/intrp/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.
* src/vm/jit/intrp/asmpart.c: Likewise.
* src/vm/jit/intrp/dynamic-super.c: Likewise.
* src/vm/jit/intrp/java.vmg: Likewise.

* src/vm/builtin.c (builtin_trace_exception): Renamed runverbose to
opt_verbosecall. Removed stacktrace printing code.
* src/vm/exceptions.c (exceptions_handle_exception): Renamed
runverbose to opt_verbosecall. Print exception stacktrace when caught.

* src/vm/vm.c: Support Sun's commandline options and ignore them if
not supported. Reordered options.

* src/native/vm/VMObject.c (notify): Removed debug output.
(notifyAll): Likewise.
(wait): Likewise.
* src/native/vm/VMThread.c (suspend): Likewise.
(resume): Likewise.
(nativeSetPriority): Likewise.
(nativeStop): Likewise.
(yield): Likewise.

* src/native/vm/VMThrowable.c (fillInStackTrace): Renamed par1 to t.

17 files changed:
src/native/vm/VMObject.c
src/native/vm/VMThread.c
src/native/vm/VMThrowable.c
src/vm/builtin.c
src/vm/exceptions.c
src/vm/jit/alpha/codegen.c
src/vm/jit/i386/codegen.c
src/vm/jit/intrp/asmpart.c
src/vm/jit/intrp/codegen.c
src/vm/jit/intrp/dynamic-super.c
src/vm/jit/intrp/java.vmg
src/vm/jit/mips/codegen.c
src/vm/jit/powerpc/codegen.c
src/vm/jit/x86_64/codegen.c
src/vm/options.c
src/vm/options.h
src/vm/vm.c

index a80430925addc90d939ddce57890225a19609fe8..b23f4b5533a2ba31da51c819955509f8df1fd608 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: VMObject.c 4357 2006-01-22 23:33:38Z twisti $
+   $Id: VMObject.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -144,9 +144,6 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_VMObject_clone(JNIEnv *env, j
  */
 JNIEXPORT void JNICALL Java_java_lang_VMObject_notify(JNIEnv *env, jclass clazz, java_lang_Object *this)
 {
-       if (runverbose)
-               log_text("java_lang_Object_notify called");
-
 #if defined(USE_THREADS)
        signal_cond_for_object(&this->header);
 #endif
@@ -160,9 +157,6 @@ JNIEXPORT void JNICALL Java_java_lang_VMObject_notify(JNIEnv *env, jclass clazz,
  */
 JNIEXPORT void JNICALL Java_java_lang_VMObject_notifyAll(JNIEnv *env, jclass clazz, java_lang_Object *this)
 {
-       if (runverbose)
-               log_text("java_lang_Object_notifyAll called");
-
 #if defined(USE_THREADS)
        broadcast_cond_for_object(&this->header);
 #endif
@@ -176,9 +170,6 @@ JNIEXPORT void JNICALL Java_java_lang_VMObject_notifyAll(JNIEnv *env, jclass cla
  */
 JNIEXPORT void JNICALL Java_java_lang_VMObject_wait(JNIEnv *env, jclass clazz, java_lang_Object *o, s8 ms, s4 ns)
 {
-       if (runverbose)
-               log_text("java_lang_VMObject_wait called");
-
 #if defined(USE_THREADS)
        wait_cond_for_object(&o->header, ms, ns);
 #endif
index 600cf0c0c9f64fe3684cdd5ce4fb57d2cb7b57a9..0d84a725b0153fbcd683ee912ef96249885c3aca 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: VMThread.c 4357 2006-01-22 23:33:38Z twisti $
+   $Id: VMThread.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -126,9 +126,6 @@ JNIEXPORT s4 JNICALL Java_java_lang_VMThread_isInterrupted(JNIEnv *env, java_lan
  */
 JNIEXPORT void JNICALL Java_java_lang_VMThread_suspend(JNIEnv *env, java_lang_VMThread *this)
 {
-       if (runverbose)
-               log_text("java_lang_VMThread_suspend called");
-
 #if defined(USE_THREADS) && !defined(NATIVE_THREADS)
        suspendThread((thread *) this->thread);
 #endif
@@ -142,9 +139,6 @@ JNIEXPORT void JNICALL Java_java_lang_VMThread_suspend(JNIEnv *env, java_lang_VM
  */
 JNIEXPORT void JNICALL Java_java_lang_VMThread_resume(JNIEnv *env, java_lang_VMThread *this)
 {
-       if (runverbose)
-               log_text("java_lang_VMThread_resume0 called");
-
 #if defined(USE_THREADS) && !defined(NATIVE_THREADS)
        resumeThread((thread *) this->thread);
 #endif
@@ -158,9 +152,6 @@ JNIEXPORT void JNICALL Java_java_lang_VMThread_resume(JNIEnv *env, java_lang_VMT
  */
 JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeSetPriority(JNIEnv *env, java_lang_VMThread *this, s4 priority)
 {
-    if (runverbose) 
-               log_text("java_lang_VMThread_nativeSetPriority called");
-
 #if defined(USE_THREADS)
        setPriorityThread((thread *) this->thread, priority);
 #endif
@@ -174,9 +165,6 @@ JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeSetPriority(JNIEnv *env, ja
  */
 JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeStop(JNIEnv *env, java_lang_VMThread *this, java_lang_Throwable *t)
 {
-       if (runverbose)
-               log_text ("java_lang_VMThread_nativeStop called");
-
 #if defined(USE_THREADS) && !defined(NATIVE_THREADS)
        if (currentThread == (thread *) this->thread) {
                log_text("killing");
@@ -240,9 +228,6 @@ JNIEXPORT java_lang_Thread* JNICALL Java_java_lang_VMThread_currentThread(JNIEnv
  */
 JNIEXPORT void JNICALL Java_java_lang_VMThread_yield(JNIEnv *env, jclass clazz)
 {
-       if (runverbose)
-               log_text("java_lang_VMThread_yield called");
-
 #if defined(USE_THREADS)
        yieldThread();
 #endif
index e9c946ac5fa66262de1f0d8b2aa57932efe2ba39..31a457f99605e23e1ec1ec36bbe9fdda3dcc44f8 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: VMThrowable.c 4406 2006-02-03 13:19:36Z twisti $
+   $Id: VMThrowable.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -60,7 +60,7 @@
  * Method:    fillInStackTrace
  * Signature: (Ljava/lang/Throwable;)Ljava/lang/VMThrowable;
  */
-JNIEXPORT java_lang_VMThrowable* JNICALL Java_java_lang_VMThrowable_fillInStackTrace(JNIEnv *env, jclass clazz, java_lang_Throwable *par1)
+JNIEXPORT java_lang_VMThrowable* JNICALL Java_java_lang_VMThrowable_fillInStackTrace(JNIEnv *env, jclass clazz, java_lang_Throwable *t)
 {
        java_lang_VMThrowable *o;
        stacktracebuffer      *stb;
index 71c9c0229f5983296ab7f9baa40147d7625cdf9f..c0ee69fd8a847b71a4fd4ad43a5b73a0911fdb46 100644 (file)
@@ -36,7 +36,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 4367 2006-01-24 10:28:52Z twisti $
+   $Id: builtin.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -1103,7 +1103,7 @@ java_objectheader *builtin_trace_exception(java_objectheader *xptr,
        s4    logtextlen;
        s4    dumpsize;
 
-       if (runverbose && indent)
+       if (opt_verbosecall && indent)
                methodindent--;
 
        /* calculate message length */
@@ -1214,13 +1214,6 @@ java_objectheader *builtin_trace_exception(java_objectheader *xptr,
 
        dump_release(dumpsize);
 
-       /* print stacktrace for exception */
-
-       if (opt_verboseexception) {
-               exceptions_print_exception(xptr);
-               stacktrace_print_trace(xptr);
-       }
-
        return xptr;
 }
 #endif /* !defined(NDEBUG) */
index b34ef445ecb70445a991691657b725c7709bfbf4..b8c7248091c358a0e10780f8194f549474a93bcc 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: exceptions.c 4484 2006-02-12 00:25:12Z twisti $
+   $Id: exceptions.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -1184,20 +1184,9 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp
        ex                   =   (exceptionentry *) (pv + ExTableStart);
        exceptiontablelength = *((s4 *)             (pv + ExTableSize));
 
-#if 0
-       if (m != NULL) {
-               printf("exceptions_handle_exception(%p, %p, %p, %p): ", xptr, xpc, pv, sp);
-               utf_display(m->class->name);
-               printf(".");
-               utf_display(m->name);
-               utf_display(m->descriptor);
-               printf(", %d\n", exceptiontablelength);
-       }
-#endif
-
        /* print exception trace */
 
-       if (opt_verbose || runverbose || opt_verboseexception)
+       if (opt_verbose || opt_verbosecall || opt_verboseexception)
                builtin_trace_exception(xptr, m, xpc, 1);
 
        for (i = 0; i < exceptiontablelength; i++) {
@@ -1208,13 +1197,23 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp
 
                /* is the xpc is the current catch range */
 
-               if (ex->startpc <= xpc && xpc < ex->endpc) {
+               if ((ex->startpc <= xpc) && (xpc < ex->endpc)) {
                        cr = ex->catchtype;
 
                        /* NULL catches everything */
 
-                       if (cr.any == NULL)
+                       if (cr.any == NULL) {
+#if !defined(NDEBUG)
+                               /* Print stacktrace of exception when caught. */
+
+                               if (opt_verboseexception) {
+                                       exceptions_print_exception(xptr);
+                                       stacktrace_print_trace(xptr);
+                               }
+#endif
+
                                return ex->handlerpc;
+                       }
 
                        /* resolve or load/link the exception class */
 
@@ -1237,8 +1236,18 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp
 
                        /* is the thrown exception an instance of the catch class? */
 
-                       if (builtin_instanceof(xptr, c))
+                       if (builtin_instanceof(xptr, c)) {
+#if !defined(NDEBUG)
+                               /* Print stacktrace of exception when caught. */
+
+                               if (opt_verboseexception) {
+                                       exceptions_print_exception(xptr);
+                                       stacktrace_print_trace(xptr);
+                               }
+#endif
+
                                return ex->handlerpc;
+                       }
                }
        }
 
index c581f0ff09e71965b01ac9b258f4df2017313487..3f2c26d17681c02806cc744cb2cb89a34aa593fe 100644 (file)
             Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen.c 4530 2006-02-21 09:11:53Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
 
+#include "config.h"
+
 #include <stdio.h>
 
-#include "config.h"
 #include "vm/types.h"
 
 #include "md.h"
@@ -234,7 +235,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                s1 = rd->memuse;
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        M_LDA(REG_SP, REG_SP, -(INT_ARG_CNT + FLT_ARG_CNT) * 8);
 
                        for (p = 0; p < INT_ARG_CNT; p++)
@@ -269,7 +270,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                        M_LDA(REG_PV, REG_RA, disp);
                }
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        for (p = 0; p < INT_ARG_CNT; p++)
                                M_LLD(rd->argintregs[p], REG_SP, p * 8);
 
@@ -283,7 +284,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
        /* call trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                M_LDA(REG_SP, REG_SP, -((INT_ARG_CNT + FLT_ARG_CNT + 2) * 8));
                M_AST(REG_RA, REG_SP, 1 * 8);
 
@@ -2915,7 +2916,7 @@ nowperformreturn:
                        
                        /* call trace function */
 
-                       if (runverbose) {
+                       if (opt_verbosecall) {
                                M_LDA(REG_SP, REG_SP, -3 * 8);
                                M_AST(REG_RA, REG_SP, 0 * 8);
                                M_LST(REG_RESULT, REG_SP, 1 * 8);
@@ -4240,7 +4241,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* call trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                /* save integer argument registers */
 
                for (i = 0, j = 1; i < md->paramcount && i < INT_ARG_CNT; i++) {
@@ -4444,7 +4445,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* call finished trace */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                /* just restore the value we need, don't care about the other */
 
                if (IS_INT_LNG_TYPE(md->returntype.type))
index 987c54d43a78fdfd1731738a037cdc36e7c56972..7c68f82b4119b1167472c5c261ca2aa481408ceb 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Joseph Wenninger
             Christian Ullrich
 
-   $Id: codegen.c 4548 2006-02-22 14:03:30Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -345,7 +345,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
           to arguments on stack.
        */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                stack_off = 0;
                s1 = INT_TMP_CNT * 4 + TRACE_ARGS_NUM * 8 + 4 + 4 + parentargs_base * 4;
 
@@ -4162,7 +4162,7 @@ nowperformreturn:
                        p = parentargs_base;
                        
                        /* call trace function */
-                       if (runverbose) {
+                       if (opt_verbosecall) {
                                i386_alu_imm_reg(cd, ALU_SUB, 4 + 8 + 8 + 4, REG_SP);
 
                                i386_mov_imm_membase(cd, (s4) m, REG_SP, 0);
@@ -5593,7 +5593,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        M_ASUB_IMM(stackframesize * 4, REG_SP);
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                s4 p, t;
 
                disp = stackframesize * 4;
@@ -5758,7 +5758,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
        M_MOV_IMM((ptrint) codegen_finish_native_call, REG_ITMP1);
        M_CALL(REG_ITMP1);
 
-    if (runverbose) {
+    if (opt_verbosecall) {
                /* restore return value */
 
                if (IS_INT_LNG_TYPE(md->returntype.type)) {
index e669818ee1139cf7e01c43d1f926825ef50d4456..2cba8f9261b161c5c1d8be35678e4c3ed6e23c58 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes:
 
-   $Id: asmpart.c 4357 2006-01-22 23:33:38Z twisti $
+   $Id: asmpart.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -271,7 +271,7 @@ Inst *intrp_asm_handle_exception(Inst *ip, java_objectheader *o, Cell *fp, Cell
          ex = (exceptionentry *) (((u1 *) f) + ExTableStart);
          exceptiontablelength = *((s4 *) (((u1 *) f) + ExTableSize));
 
-         if (opt_verbose || runverbose || opt_verboseexception)
+         if (opt_verbose || opt_verbosecall || opt_verboseexception)
                  builtin_trace_exception(o, m, ip, 1);
 
          for (i = 0; i < exceptiontablelength; i++) {
index c8e2debe27372b3df3fa24fa00a1b6bfca020d60..16550f75fc8af67128535da8080e746efd8b6c12 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Christian Thalinger
             Anton Ertl
 
-   $Id: codegen.c 4544 2006-02-21 13:43:27Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -344,7 +344,7 @@ bool intrp_codegen(methodinfo *m, codegendata *cd, registerdata *rd)
        }                       
 #endif
 
-       if (runverbose)
+       if (opt_verbosecall)
                gen_TRACECALL(cd, m);
 
        gen_BBEND;
@@ -1497,7 +1497,7 @@ bool intrp_codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                                gen_MONITOREXIT(cd);
                        }
 #endif
-                       if (runverbose)
+                       if (opt_verbosecall)
                                gen_TRACERETURN(cd, m);
 
                        gen_IRETURN(cd, index2offset(cd->maxlocals));
@@ -1516,7 +1516,7 @@ bool intrp_codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                                gen_MONITOREXIT(cd);
                        }
 #endif
-                       if (runverbose)
+                       if (opt_verbosecall)
                                gen_TRACELRETURN(cd, m);
 
                        gen_LRETURN(cd, index2offset(cd->maxlocals));
@@ -1534,7 +1534,7 @@ bool intrp_codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                                gen_MONITOREXIT(cd);
                        }
 #endif
-                       if (runverbose)
+                       if (opt_verbosecall)
                                gen_TRACERETURN(cd, m);
 
                        gen_RETURN(cd, index2offset(cd->maxlocals));
@@ -1965,13 +1965,13 @@ u1 *intrp_createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        gen_BBSTART;
 
-       if (runverbose)
+       if (opt_verbosecall)
                gen_TRACECALL(cd, m);
 
        if (f == NULL) {
                gen_PATCHER_NATIVECALL(cd, m, f, (u1 *)cif);
        } else {
-               if (runverbose)
+               if (opt_verbosecall)
                        gen_TRACENATIVECALL(cd, m, f, (u1 *)cif);
                else
                        gen_NATIVECALL(cd, m, f, (u1 *)cif);
index 150ab657b04fd3a5b961100c8d7ba90841e300eb..676e67b76110e32e52b730ea1424518a66c4a6fa 100644 (file)
@@ -32,7 +32,7 @@
 
    Changes:
 
-   $Id: dynamic-super.c 4549 2006-02-23 14:08:23Z twisti $
+   $Id: dynamic-super.c 4550 2006-03-01 17:00:33Z twisti $
 */
 
 
@@ -599,7 +599,7 @@ void gen_inst1(codegendata *cd, ptrint instr)
   case N_PATCHER_CHECKCAST:      replace_patcher(cd, N_CHECKCAST); break;
   case N_PATCHER_INSTANCEOF:     replace_patcher(cd, N_INSTANCEOF); break;
   case N_PATCHER_NATIVECALL:     
-    if (runverbose)
+    if (opt_verbosecall)
       replace_patcher(cd, N_TRACENATIVECALL);
     else
       replace_patcher(cd, N_NATIVECALL);
index 61b562afd1228c1467d7d9c5d582c2ea1b3ae987..05b4a17fdc3d25b49ab928022e21434ce727f01e 100644 (file)
@@ -1709,7 +1709,7 @@ CLEAR_global_sp;
 if (!result)
   THROW0;
 STORE_ORDER_BARRIER();
-IP[-4] = runverbose ? INST_ADDR(TRACENATIVECALL) : INST_ADDR(NATIVECALL);
+IP[-4] = opt_verbosecall ? INST_ADDR(TRACENATIVECALL) : INST_ADDR(NATIVECALL);
 SET_IP(IP - 4);
 patchersuper_rewrite(IP);
 #else
index 54f57a2994ae4d92142ed2e059218f573901885e..8cd6fc73290005da50006f85070e3e68e1fbccc8 100644 (file)
@@ -35,7 +35,7 @@
    This module generates MIPS machine code for a sequence of
    intermediate code commands (ICMDs).
 
-   $Id: codegen.c 4530 2006-02-21 09:11:53Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -236,7 +236,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                s1 = rd->memuse;
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        M_LDA(REG_SP, REG_SP, -(INT_ARG_CNT + FLT_ARG_CNT) * 8);
 
                        for (p = 0; p < INT_ARG_CNT; p++)
@@ -267,7 +267,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                        M_AST(rd->argintregs[0], REG_SP, s1 * 8);         /* branch delay */
                }
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        for (p = 0; p < INT_ARG_CNT; p++)
                                M_LLD(rd->argintregs[p], REG_SP, p * 8);
 
@@ -282,7 +282,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
        /* copy argument registers to stack and call trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                M_LDA(REG_SP, REG_SP, -(2 + INT_ARG_CNT + FLT_ARG_CNT + INT_TMP_CNT + FLT_TMP_CNT) * 8);
                M_AST(REG_RA, REG_SP, 1 * 8);
 
@@ -2743,7 +2743,7 @@ nowperformreturn:
                        
                        /* call trace function */
 
-                       if (runverbose) {
+                       if (opt_verbosecall) {
                                M_LDA(REG_SP, REG_SP, -3 * 8);
                                M_LST(REG_RA, REG_SP, 0 * 8);
                                M_LST(REG_RESULT, REG_SP, 1 * 8);
@@ -4139,7 +4139,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* call trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                M_LDA(REG_SP, REG_SP, -(1 + INT_ARG_CNT + FLT_ARG_CNT) * 8);
 
                /* save integer argument registers */
@@ -4335,7 +4335,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* call finished trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                if (IS_INT_LNG_TYPE(md->returntype.type))
                        M_LLD(REG_RESULT, REG_SP, 0 * 8);
                else
index eeee10bd51a6795ce2d72c7ef3ea6ef2e3f8869c..ce543aafed5b727a9f4d112a4ef38759ee1a1d19 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Christian Thalinger
             Christian Ullrich
 
-   $Id: codegen.c 4530 2006-02-21 09:11:53Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -300,7 +300,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                s1 = rd->memuse;
 
 #if 0
-               if (runverbose) {
+               if (opt_verbosecall) {
                        M_LDA(REG_SP, REG_SP, -(INT_ARG_CNT * 4 + FLT_ARG_CNT * 8));
 
                        for (p = 0; p < INT_ARG_CNT; p++)
@@ -336,7 +336,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                }
 
 #if 0
-               if (runverbose) {
+               if (opt_verbosecall) {
                        for (p = 0; p < INT_ARG_CNT; p++)
                                M_ILD(rd->argintregs[p], REG_SP, p * 4);
 
@@ -352,10 +352,10 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
        /* call trace function */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                mcodeptr = codegen_trace_args(m, cd, rd, mcodeptr, parentargs_base, false);
 
-       } /* if (runverbose) */
+       }
        }
 
        /* end of header generation */
@@ -2461,7 +2461,7 @@ nowperformreturn:
 
                        /* call trace function */
 
-                       if (runverbose) {
+                       if (opt_verbosecall) {
                                M_MFLR(REG_ZERO);
                                M_LDA(REG_SP, REG_SP, -10 * 8);
                                M_DST(REG_FRESULT, REG_SP, 48+0);
@@ -3890,7 +3890,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
        M_STWU(REG_SP, REG_SP, -(stackframesize * 4));
 
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                /* parent_argbase == stackframesize * 4 */
                mcodeptr = codegen_trace_args(m, cd, rd, mcodeptr, stackframesize * 4 , 
                                                                          true);
@@ -4086,7 +4086,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* print call trace */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                 /* just restore the value we need, don't care about the other */
 
                if (md->returntype.type != TYPE_VOID) {
index 5811aa256dd3c240a28ee1b8af59543c1731a16f..8850dbc15b5baa3014e5f21535dd581cf0313579 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Ullrich
 
-   $Id: codegen.c 4537 2006-02-21 10:39:18Z twisti $
+   $Id: codegen.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -122,7 +122,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
     /* Keep stack of non-leaf functions 16-byte aligned for calls into native */
        /* code e.g. libc or jni (alignment problems with movaps).                */
 
-       if (!m->isleafmethod || runverbose)
+       if (!m->isleafmethod || opt_verbosecall)
                parentargs_base |= 0x1;
 
        /* create method header */
@@ -257,7 +257,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                s1 = rd->memuse;
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        M_LSUB_IMM((INT_ARG_CNT + FLT_ARG_CNT) * 8, REG_SP);
 
                        for (p = 0; p < INT_ARG_CNT; p++)
@@ -287,7 +287,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                        M_CALL(REG_ITMP1);
                }
 
-               if (runverbose) {
+               if (opt_verbosecall) {
                        for (p = 0; p < INT_ARG_CNT; p++)
                                M_LLD(rd->argintregs[p], REG_SP, p * 8);
 
@@ -302,7 +302,7 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
        /* Copy argument registers to stack and call trace function with
           pointer to arguments on stack. */
 
-       if (runverbose || opt_stat) {
+       if (opt_verbosecall) {
                M_LSUB_IMM((INT_ARG_CNT + FLT_ARG_CNT + INT_TMP_CNT + FLT_TMP_CNT + 1 + 1) * 8, REG_SP);
 
                /* save integer argument registers */
@@ -325,29 +325,27 @@ bool codegen(methodinfo *m, codegendata *cd, registerdata *rd)
                                M_DST(rd->tmpfltregs[p], REG_SP, (1 + INT_ARG_CNT + FLT_ARG_CNT + INT_TMP_CNT + p) * 8);
                }
 
-               if (runverbose) {
-                       /* show integer hex code for float arguments */
+               /* show integer hex code for float arguments */
 
-                       for (p = 0, l = 0; p < md->paramcount && p < INT_ARG_CNT; p++) {
-                               /* if the paramtype is a float, we have to right shift all    */
-                               /* following integer registers                                */
+               for (p = 0, l = 0; p < md->paramcount && p < INT_ARG_CNT; p++) {
+                       /* If the paramtype is a float, we have to right shift all
+                          following integer registers. */
        
-                               if (IS_FLT_DBL_TYPE(md->paramtypes[p].type)) {
-                                       for (s1 = INT_ARG_CNT - 2; s1 >= p; s1--) {
-                                               M_MOV(rd->argintregs[s1], rd->argintregs[s1 + 1]);
-                                       }
-
-                                       x86_64_movd_freg_reg(cd, rd->argfltregs[l], rd->argintregs[p]);
-                                       l++;
+                       if (IS_FLT_DBL_TYPE(md->paramtypes[p].type)) {
+                               for (s1 = INT_ARG_CNT - 2; s1 >= p; s1--) {
+                                       M_MOV(rd->argintregs[s1], rd->argintregs[s1 + 1]);
                                }
-                       }
 
-                       x86_64_mov_imm_reg(cd, (ptrint) m, REG_ITMP2);
-                       x86_64_mov_reg_membase(cd, REG_ITMP2, REG_SP, 0 * 8);
-                       x86_64_mov_imm_reg(cd, (ptrint) builtin_trace_args, REG_ITMP1);
-                       x86_64_call_reg(cd, REG_ITMP1);
+                               x86_64_movd_freg_reg(cd, rd->argfltregs[l], rd->argintregs[p]);
+                               l++;
+                       }
                }
 
+               M_MOV_IMM((ptrint) m, REG_ITMP2);
+               M_AST(REG_ITMP2, REG_SP, 0 * 8);
+               M_MOV_IMM((ptrint) builtin_trace_args, REG_ITMP1);
+               M_CALL(REG_ITMP1);
+
                /* restore integer argument registers */
 
                for (p = 0; p < INT_ARG_CNT; p++)
@@ -2965,7 +2963,7 @@ nowperformreturn:
                        p = parentargs_base;
                        
                        /* call trace function */
-                       if (runverbose) {
+                       if (opt_verbosecall) {
                                x86_64_alu_imm_reg(cd, X86_64_SUB, 2 * 8, REG_SP);
 
                                x86_64_mov_reg_membase(cd, REG_RESULT, REG_SP, 0 * 8);
@@ -4276,7 +4274,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        M_ASUB_IMM(stackframesize * 8, REG_SP);
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                /* save integer and float argument registers */
 
                for (i = 0, j = 0; i < md->paramcount && j < INT_ARG_CNT; i++)
@@ -4436,7 +4434,7 @@ u1 *createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 
        /* generate call trace */
 
-       if (runverbose) {
+       if (opt_verbosecall) {
                /* just restore the value we need, don't care about the other */
 
                if (md->returntype.type != TYPE_VOID) {
index f1f6130acba912cb4fe4089f0ed57dfe45513ede..20f8bcfb5d28ae4bb200b601f942aa50705f1470 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: options.c 4530 2006-02-21 09:11:53Z twisti $
+   $Id: options.c 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -49,6 +49,8 @@
 s4    opt_index = 0;            /* index of processed arguments               */
 char *opt_arg;                  /* this one exports the option argument       */
 
+bool opt_jar = false;
+
 #if defined(ENABLE_JIT)
 bool opt_jit = true;            /* JIT mode execution (default)               */
 bool opt_intrp = false;         /* interpreter mode execution                 */
@@ -57,23 +59,22 @@ bool opt_jit = false;           /* JIT mode execution                         */
 bool opt_intrp = true;          /* interpreter mode execution (default)       */
 #endif
 
-bool opt_jar = false;
 bool opt_run = true;
 
 s4   opt_stacksize = 0;         /* thread stack size                          */
 
 bool opt_verbose = false;
 bool compileall = false;
-bool runverbose = false;        /* trace all method invocation                */
-bool opt_verboseexception = false;
 
 bool loadverbose = false;
 bool linkverbose = false;
 bool initverbose = false;
 
-bool opt_verboseclass = false;
-bool opt_verbosegc = false;
-bool opt_verbosejni = false;
+bool opt_verboseclass     = false;
+bool opt_verbosegc        = false;
+bool opt_verbosejni       = false;
+bool opt_verbosecall      = false;      /* trace all method invocation        */
+bool opt_verboseexception = false;
 
 bool opt_liberalutf = false;   /* Don't check overlong UTF-8 sequences        */
 
index 8b723c661ed400518104db73556d663312702841..b8a9044cb0c9e06ac2ce9724df4e27a71a9d0299 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: options.h 4530 2006-02-21 09:11:53Z twisti $
+   $Id: options.h 4550 2006-03-01 17:00:33Z twisti $
 
 */
 
@@ -76,8 +76,6 @@ extern bool opt_run;
 extern s4   opt_stacksize;
 extern bool opt_verbose;
 extern bool compileall;
-extern bool runverbose;
-extern bool opt_verboseexception;
 
 extern bool loadverbose;         /* Print debug messages during loading */
 extern bool linkverbose;
@@ -86,6 +84,8 @@ extern bool initverbose;         /* Log class initialization */
 extern bool opt_verboseclass;
 extern bool opt_verbosegc;
 extern bool opt_verbosejni;
+extern bool opt_verbosecall;
+extern bool opt_verboseexception;
 
 extern bool opt_liberalutf;      /* Don't check overlong UTF-8 sequences */
 
index b0b8a4265f2a8b919ca19c509bf6e4ebab8ac88a..54ca08a4fd2e0ed839b9aac175440335b174cfd3 100644 (file)
@@ -106,14 +106,43 @@ bool startit = true;
 /* define command line options ************************************************/
 
 enum {
+       /* Java options */
+
+       OPT_JAR,
+
+       OPT_D32,
+       OPT_D64,
+
        OPT_CLASSPATH,
        OPT_D,
+
+       OPT_VERBOSE,
+
+       OPT_VERSION,
+       OPT_SHOWVERSION,
+       OPT_FULLVERSION,
+
+       OPT_HELP,
+       OPT_X,
+
+       /* Java non-standard options */
+
+       OPT_JIT,
+       OPT_INTRP,
+
+       OPT_BOOTCLASSPATH,
+       OPT_BOOTCLASSPATH_A,
+       OPT_BOOTCLASSPATH_P,
+
+       OPT_PROF,
+       OPT_PROF_OPTION,
+
        OPT_MS,
        OPT_MX,
+
+       /* CACAO options */
+
        OPT_VERBOSE1,
-       OPT_VERBOSE,
-       OPT_VERBOSESPECIFIC,
-       OPT_VERBOSECALL,
        OPT_NOIEEE,
        OPT_SOFTNULL,
        OPT_TIME,
@@ -135,7 +164,6 @@ enum {
        OPT_VERBOSETC,
        OPT_NOVERIFY,
        OPT_LIBERALUTF,
-       OPT_VERBOSEEXCEPTION,
        OPT_EAGER,
 
        /* optimization options */
@@ -148,23 +176,6 @@ enum {
        OPT_LSRA,
 #endif
 
-       OPT_JAR,
-       OPT_BOOTCLASSPATH,
-       OPT_BOOTCLASSPATH_A,
-       OPT_BOOTCLASSPATH_P,
-       OPT_VERSION,
-       OPT_SHOWVERSION,
-       OPT_FULLVERSION,
-
-       OPT_HELP,
-       OPT_X,
-
-       OPT_JIT,
-       OPT_INTRP,
-
-       OPT_PROF,
-       OPT_PROF_OPTION,
-
 #if defined(ENABLE_INTRP)
        /* interpreter options */
 
@@ -188,17 +199,32 @@ enum {
 
 
 opt_struct opts[] = {
+       /* Java options */
+
+       { "jar",               false, OPT_JAR },
+
+       { "d32",               false, OPT_D32 },
+       { "d64",               false, OPT_D64 },
+       { "client",            false, OPT_IGNORE },
+       { "server",            false, OPT_IGNORE },
+       { "hotspot",           false, OPT_IGNORE },
+
        { "classpath",         true,  OPT_CLASSPATH },
        { "cp",                true,  OPT_CLASSPATH },
        { "D",                 true,  OPT_D },
+       { "version",           false, OPT_VERSION },
+       { "showversion",       false, OPT_SHOWVERSION },
+       { "fullversion",       false, OPT_FULLVERSION },
+       { "help",              false, OPT_HELP },
+       { "?",                 false, OPT_HELP },
+       { "X",                 false, OPT_X },
+
        { "noasyncgc",         false, OPT_IGNORE },
        { "noverify",          false, OPT_NOVERIFY },
        { "liberalutf",        false, OPT_LIBERALUTF },
        { "v",                 false, OPT_VERBOSE1 },
-       { "verbose",           false, OPT_VERBOSE },
-       { "verbose:",          true,  OPT_VERBOSESPECIFIC },
-       { "verbosecall",       false, OPT_VERBOSECALL },
-       { "verboseexception",  false, OPT_VERBOSEEXCEPTION },
+       { "verbose:",          true,  OPT_VERBOSE },
+
 #ifdef TYPECHECK_VERBOSE
        { "verbosetc",         false, OPT_VERBOSETC },
 #endif
@@ -223,12 +249,6 @@ opt_struct opts[] = {
 #if defined(ENABLE_LSRA)
        { "lsra",              false, OPT_LSRA },
 #endif
-       { "jar",               false, OPT_JAR },
-       { "version",           false, OPT_VERSION },
-       { "showversion",       false, OPT_SHOWVERSION },
-       { "fullversion",       false, OPT_FULLVERSION },
-       { "help",              false, OPT_HELP },
-       { "?",                 false, OPT_HELP },
 
 #if defined(ENABLE_INTRP)
        /* interpreter options */
@@ -246,9 +266,8 @@ opt_struct opts[] = {
        { "agentpath:",        true,  OPT_AGENTPATH },
 #endif
 
-       /* X options */
+       /* Java non-standard options */
 
-       { "X",                 false, OPT_X },
        { "Xjit",              false, OPT_JIT },
        { "Xint",              false, OPT_INTRP },
        { "Xbootclasspath:",   true,  OPT_BOOTCLASSPATH },
@@ -258,13 +277,13 @@ opt_struct opts[] = {
        { "Xdebug",            false, OPT_DEBUG },
 #endif 
        { "Xms",               true,  OPT_MS },
-       { "Xmx",               true,  OPT_MX },
-       { "Xprof:",            true,  OPT_PROF_OPTION },
-       { "Xprof",             false, OPT_PROF },
-       { "Xss",               true,  OPT_SS },
        { "ms",                true,  OPT_MS },
+       { "Xmx",               true,  OPT_MX },
        { "mx",                true,  OPT_MX },
+       { "Xss",               true,  OPT_SS },
        { "ss",                true,  OPT_SS },
+       { "Xprof:",            true,  OPT_PROF_OPTION },
+       { "Xprof",             false, OPT_PROF },
 
        /* keep these at the end of the list */
 
@@ -284,73 +303,76 @@ opt_struct opts[] = {
 
 void usage(void)
 {
-       printf("Usage: cacao [-options] classname [arguments]\n");
-       printf("               (to run a class file)\n");
-       printf("       cacao [-options] -jar jarfile [arguments]\n");
-       printf("               (to run a standalone jar file)\n\n");
-
-       printf("Java options:\n");
-       printf("    -cp <path>               specify a path to look for classes\n");
-       printf("    -classpath <path>        specify a path to look for classes\n");
-       printf("    -D<name>=<value>         add an entry to the property list\n");
-       printf("    -verbose[:class|gc|jni]  enable specific verbose output\n");
-       printf("    -version                 print product version and exit\n");
-       printf("    -fullversion             print jpackage-compatible product version and exit\n");
-       printf("    -showversion             print product version and continue\n");
-       printf("    -help, -?                print this help message\n");
-       printf("    -X                       print help on non-standard Java options\n\n");
+       puts("Usage: cacao [-options] classname [arguments]");
+       puts("               (to run a class file)");
+       puts("       cacao [-options] -jar jarfile [arguments]");
+       puts("               (to run a standalone jar file)\n");
+
+       puts("Java options:");
+       puts("    -d32                     use 32-bit data model if available");
+       puts("    -d64                     use 64-bit data model if available");
+       puts("    -client                  compatibility (currently ignored)");
+       puts("    -server                  compatibility (currently ignored)");
+       puts("    -hotspot                 compatibility (currently ignored)\n");
+
+       puts("    -cp <path>               specify a path to look for classes");
+       puts("    -classpath <path>        specify a path to look for classes");
+       puts("    -D<name>=<value>         add an entry to the property list");
+       puts("    -verbose[:class|gc|jni]  enable specific verbose output");
+       puts("    -version                 print product version and exit");
+       puts("    -fullversion             print jpackage-compatible product version and exit");
+       puts("    -showversion             print product version and continue");
+       puts("    -help, -?                print this help message");
+       puts("    -X                       print help on non-standard Java options\n");
 
 #ifdef ENABLE_JVMTI
-       printf("    -agentlib:<agent-lib-name>=<options>  library to load containg JVMTI agent\n");
-       printf("    -agentpath:<path-to-agent>=<options>  path to library containg JVMTI agent\n");
+       puts("    -agentlib:<agent-lib-name>=<options>  library to load containg JVMTI agent");
+       puts("    -agentpath:<path-to-agent>=<options>  path to library containg JVMTI agent");
 #endif
 
-       printf("CACAO options:\n");
-       printf("    -v                       write state-information\n");
-       printf("    -verbose                 write more information\n");
-       printf("    -verbosegc               write message for each GC\n");
-       printf("    -verbosecall             write message for each call\n");
-       printf("    -verboseexception        write message for each step of stack unwinding\n");
+       puts("CACAO options:\n");
+       puts("    -v                       write state-information");
+       puts("    -verbose[:call|exception]enable specific verbose output");
 #ifdef TYPECHECK_VERBOSE
-       printf("    -verbosetc               write debug messages while typechecking\n");
+       puts("    -verbosetc               write debug messages while typechecking");
 #endif
 #if defined(__ALPHA__)
-       printf("    -noieee                  don't use ieee compliant arithmetic\n");
+       puts("    -noieee                  don't use ieee compliant arithmetic");
 #endif
-       printf("    -noverify                don't verify classfiles\n");
-       printf("    -liberalutf              don't warn about overlong UTF-8 sequences\n");
-       printf("    -softnull                use software nullpointer check\n");
-       printf("    -time                    measure the runtime\n");
+       puts("    -noverify                don't verify classfiles");
+       puts("    -liberalutf              don't warn about overlong UTF-8 sequences");
+       puts("    -softnull                use software nullpointer check");
+       puts("    -time                    measure the runtime");
 #if defined(ENABLE_STATISTICS)
-       printf("    -stat                    detailed compiler statistics\n");
+       puts("    -stat                    detailed compiler statistics");
 #endif
-       printf("    -log logfile             specify a name for the logfile\n");
-       printf("    -c(heck)b(ounds)         don't check array bounds\n");
-       printf("            s(ync)           don't check for synchronization\n");
-       printf("    -oloop                   optimize array accesses in loops\n"); 
-       printf("    -l                       don't start the class after loading\n");
-       printf("    -eager                   perform eager class loading and linking\n");
-       printf("    -all                     compile all methods, no execution\n");
-       printf("    -m                       compile only a specific method\n");
-       printf("    -sig                     specify signature for a specific method\n");
-       printf("    -s(how)a(ssembler)       show disassembled listing\n");
-       printf("           c(onstants)       show the constant pool\n");
-       printf("           d(atasegment)     show data segment listing\n");
-       printf("           e(xceptionstubs)  show disassembled exception stubs (only with -sa)\n");
-       printf("           i(ntermediate)    show intermediate representation\n");
-       printf("           m(ethods)         show class fields and methods\n");
-       printf("           n(ative)          show disassembled native stubs\n");
-       printf("           u(tf)             show the utf - hash\n");
-       printf("    -i     n(line)           activate inlining\n");
-       printf("           v(irtual)         inline virtual methods (uses/turns rt option on)\n");
-       printf("           e(exception)      inline methods with exceptions\n");
-       printf("           p(aramopt)        optimize argument renaming\n");
-       printf("           o(utsiders)       inline methods of foreign classes\n");
+       puts("    -log logfile             specify a name for the logfile");
+       puts("    -c(heck)b(ounds)         don't check array bounds");
+       puts("            s(ync)           don't check for synchronization");
+       puts("    -oloop                   optimize array accesses in loops"); 
+       puts("    -l                       don't start the class after loading");
+       puts("    -eager                   perform eager class loading and linking");
+       puts("    -all                     compile all methods, no execution");
+       puts("    -m                       compile only a specific method");
+       puts("    -sig                     specify signature for a specific method");
+       puts("    -s(how)a(ssembler)       show disassembled listing");
+       puts("           c(onstants)       show the constant pool");
+       puts("           d(atasegment)     show data segment listing");
+       puts("           e(xceptionstubs)  show disassembled exception stubs (only with -sa)");
+       puts("           i(ntermediate)    show intermediate representation");
+       puts("           m(ethods)         show class fields and methods");
+       puts("           n(ative)          show disassembled native stubs");
+       puts("           u(tf)             show the utf - hash");
+       puts("    -i     n(line)           activate inlining");
+       puts("           v(irtual)         inline virtual methods (uses/turns rt option on)");
+       puts("           e(exception)      inline methods with exceptions");
+       puts("           p(aramopt)        optimize argument renaming");
+       puts("           o(utsiders)       inline methods of foreign classes");
 #if defined(ENABLE_IFCONV)
-       printf("    -ifconv                  use if-conversion\n");
+       puts("    -ifconv                  use if-conversion");
 #endif
 #if defined(ENABLE_LSRA)
-       printf("    -lsra                    use linear scan register allocation\n");
+       puts("    -lsra                    use linear scan register allocation");
 #endif
 
        /* exit with error code */
@@ -362,23 +384,23 @@ void usage(void)
 static void Xusage(void)
 {
 #if defined(ENABLE_JIT)
-       printf("    -Xjit             JIT mode execution (default)\n");
+       puts("    -Xjit                    JIT mode execution (default)");
 #endif
 #if defined(ENABLE_INTRP)
-       printf("    -Xint             interpreter mode execution\n");
+       puts("    -Xint                    interpreter mode execution");
 #endif
-       printf("    -Xbootclasspath:<zip/jar files and directories separated by :>\n");
-    printf("                      value is set as bootstrap class path\n");
-       printf("    -Xbootclasspath/a:<zip/jar files and directories separated by :>\n");
-       printf("                      value is appended to the bootstrap class path\n");
-       printf("    -Xbootclasspath/p:<zip/jar files and directories separated by :>\n");
-       printf("                      value is prepended to the bootstrap class path\n");
-       printf("    -Xms<size>        set the initial size of the heap (default: 2MB)\n");
-       printf("    -Xmx<size>        set the maximum size of the heap (default: 64MB)\n");
-       printf("    -Xss<size>        set the thread stack size (default: 128kB)\n");
-       printf("    -Xprof[:bb]       collect and print profiling data\n");
+       puts("    -Xbootclasspath:<zip/jar files and directories separated by :>");
+    puts("                             value is set as bootstrap class path");
+       puts("    -Xbootclasspath/a:<zip/jar files and directories separated by :>");
+       puts("                             value is appended to the bootstrap class path");
+       puts("    -Xbootclasspath/p:<zip/jar files and directories separated by :>");
+       puts("                             value is prepended to the bootstrap class path");
+       puts("    -Xms<size>               set the initial size of the heap (default: 2MB)");
+       puts("    -Xmx<size>               set the maximum size of the heap (default: 64MB)");
+       puts("    -Xss<size>               set the thread stack size (default: 128kB)");
+       puts("    -Xprof[:bb]              collect and print profiling data");
 #if defined(ENABLE_JVMTI)
-       printf("    -Xdebug<transport> enable remote debugging\n");
+       puts("    -Xdebug<transport>       enable remote debugging");
 #endif 
 
        /* exit with error code */
@@ -395,28 +417,28 @@ static void Xusage(void)
 
 static void version(void)
 {
-       printf("java version \""JAVA_VERSION"\"\n");
-       printf("CACAO version "VERSION"\n");
-
-       printf("Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,\n");
-       printf("C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,\n");
-       printf("E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,\n");
-       printf("J. Wenninger, Institut f. Computersprachen - TU Wien\n\n");
-
-       printf("This program is free software; you can redistribute it and/or\n");
-       printf("modify it under the terms of the GNU General Public License as\n");
-       printf("published by the Free Software Foundation; either version 2, or (at\n");
-       printf("your option) any later version.\n\n");
-
-       printf("This program is distributed in the hope that it will be useful, but\n");
-       printf("WITHOUT ANY WARRANTY; without even the implied warranty of\n");
-       printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n");
-       printf("General Public License for more details.\n\n");
-
-       printf("Configure/Build options:\n");
-       printf("  ./configure: "VERSION_CONFIGURE_ARGS"\n");
-       printf("  CC         : "VERSION_CC" ("__VERSION__")\n");
-       printf("  CFLAGS     : "VERSION_CFLAGS"\n");
+       puts("java version \""JAVA_VERSION"\"");
+       puts("CACAO version "VERSION"");
+
+       puts("Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,");
+       puts("C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,");
+       puts("E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,");
+       puts("J. Wenninger, Institut f. Computersprachen - TU Wien\n");
+
+       puts("This program is free software; you can redistribute it and/or");
+       puts("modify it under the terms of the GNU General Public License as");
+       puts("published by the Free Software Foundation; either version 2, or (at");
+       puts("your option) any later version.\n");
+
+       puts("This program is distributed in the hope that it will be useful, but");
+       puts("WITHOUT ANY WARRANTY; without even the implied warranty of");
+       puts("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU");
+       puts("General Public License for more details.\n");
+
+       puts("Configure/Build options:\n");
+       puts("  ./configure: "VERSION_CONFIGURE_ARGS"");
+       puts("  CC         : "VERSION_CC" ("__VERSION__")");
+       puts("  CFLAGS     : "VERSION_CFLAGS"");
 }
 
 
@@ -429,7 +451,7 @@ static void version(void)
 
 static void fullversion(void)
 {
-       printf("java full version \"cacao-"JAVA_VERSION"\"\n");
+       puts("java full version \"cacao-"JAVA_VERSION"\"");
 
        /* exit normally */
 
@@ -533,6 +555,48 @@ bool vm_create(JavaVMInitArgs *vm_args)
                case OPT_IGNORE:
                        break;
                        
+               case OPT_JAR:
+                       opt_jar = true;
+                       break;
+
+               case OPT_D32:
+#if SIZEOF_VOID_P == 8
+                       puts("Running a 32-bit JVM is not supported on this platform.");
+                       exit(1);
+#endif
+                       break;
+
+               case OPT_D64:
+#if SIZEOF_VOID_P == 4
+                       puts("Running a 64-bit JVM is not supported on this platform.");
+                       exit(1);
+#endif
+                       break;
+
+               case OPT_CLASSPATH:
+                       /* forget old classpath and set the argument as new classpath */
+                       MFREE(classpath, char, strlen(classpath));
+
+                       classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
+                       strcpy(classpath, opt_arg);
+                       break;
+
+               case OPT_D:
+                       for (j = 0; j < strlen(opt_arg); j++) {
+                               if (opt_arg[j] == '=') {
+                                       opt_arg[j] = '\0';
+                                       properties_add(opt_arg, opt_arg + j + 1);
+                                       goto didit;
+                               }
+                       }
+
+                       /* if no '=' is given, just create an empty property */
+
+                       properties_add(opt_arg, "");
+                                       
+               didit:
+                       break;
+
                case OPT_BOOTCLASSPATH:
                        /* Forget default bootclasspath and set the argument as
                           new boot classpath. */
@@ -571,18 +635,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        MFREE(cp, char, cplen);
                        break;
 
-               case OPT_CLASSPATH:
-                       /* forget old classpath and set the argument as new classpath */
-                       MFREE(classpath, char, strlen(classpath));
-
-                       classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(classpath, opt_arg);
-                       break;
-
-               case OPT_JAR:
-                       opt_jar = true;
-                       break;
-
 #if defined(ENABLE_JVMTI)
                case OPT_DEBUG:
                        dbg = true;
@@ -597,22 +649,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        break;
 #endif
                        
-               case OPT_D:
-                       for (j = 0; j < strlen(opt_arg); j++) {
-                               if (opt_arg[j] == '=') {
-                                       opt_arg[j] = '\0';
-                                       properties_add(opt_arg, opt_arg + j + 1);
-                                       goto didit;
-                               }
-                       }
-
-                       /* if no '=' is given, just create an empty property */
-
-                       properties_add(opt_arg, "");
-                                       
-               didit:
-                       break;
-
                case OPT_MX:
                case OPT_MS:
                case OPT_SS:
@@ -643,14 +679,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        break;
 
                case OPT_VERBOSE:
-                       opt_verbose = true;
-                       loadverbose = true;
-                       linkverbose = true;
-                       initverbose = true;
-                       compileverbose = true;
-                       break;
-
-               case OPT_VERBOSESPECIFIC:
                        if (strcmp("class", opt_arg) == 0)
                                opt_verboseclass = true;
 
@@ -659,10 +687,19 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
                        else if (strcmp("jni", opt_arg) == 0)
                                opt_verbosejni = true;
-                       break;
 
-               case OPT_VERBOSEEXCEPTION:
-                       opt_verboseexception = true;
+                       else if (strcmp("call", opt_arg) == 0)
+                               opt_verbosecall = true;
+
+                       else if (strcmp("jit", opt_arg) == 0) {
+                               opt_verbose = true;
+                               loadverbose = true;
+                               linkverbose = true;
+                               initverbose = true;
+                               compileverbose = true;
+                       }
+                       else if (strcmp("exception", opt_arg) == 0)
+                               opt_verboseexception = true;
                        break;
 
 #ifdef TYPECHECK_VERBOSE
@@ -671,10 +708,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        break;
 #endif
                                
-               case OPT_VERBOSECALL:
-                       runverbose = true;
-                       break;
-
                case OPT_VERSION:
                        version();
                        exit(0);