new disassembler options added
authorcacao <none@none>
Tue, 6 Oct 1998 20:33:24 +0000 (20:33 +0000)
committercacao <none@none>
Tue, 6 Oct 1998 20:33:24 +0000 (20:33 +0000)
compiler.h
main.c
newcomp.c
src/cacao/cacao.c

index c9e0e4aa60d7709d6a02e7ed2e14ad2ac30361d5..86c8f6d5e71a66fa5a0ddae8b3aeaab817753570 100644 (file)
@@ -1,3 +1,4 @@
+/* -*- mode: c; tab-width: 4; c-basic-offset: 4 -*- */
 /****************************** compiler.h *************************************
 
        Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
@@ -21,6 +22,7 @@
 extern bool compileverbose;     
 extern bool showstack;          
 extern bool showdisassemble;    
+extern bool showddatasegment;    
 extern bool showintermediate;   
 extern int   optimizelevel;      
 
diff --git a/main.c b/main.c
index d91cfc8305d6a2eac247a8f181d25fdbf84b0806..d84330c0ee9b602475c577917299b1c8d0e9e87f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; tab-width: 4; c-basic-offset: 4 -*- */
 /******************************* main.c ****************************************
 
        Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
@@ -183,6 +184,7 @@ static void print_usage()
        printf ("          -s(how)m(ethods) ..... show all methods&fields of a class\n");
        printf ("                 c(onstants) ... show the constant pool\n");
        printf ("                 a(ssembler) ... show disassembled listing\n");
+       printf ("                 d(atasegment).. show data segment listing\n");
        printf ("                 s(tack) ....... show stack for every javaVM-command\n");
        printf ("                 i(ntermediate). show intermediate representation\n");
        printf ("                 u(nicode) ..... show the unicode - hash\n");
index dad14762026ca7fe33d927f6e3235962d3c72894..eeeb1d6d2a9a3bb91962b32577bc357398574f42 100644 (file)
--- a/newcomp.c
+++ b/newcomp.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; tab-width: 4; c-basic-offset: 4 -*- */
 /***************************** ncomp/ncomp.c ***********************************
 
        Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
@@ -33,6 +34,7 @@
 bool compileverbose = false;
 bool showstack = false;
 bool showdisassemble = false; 
+bool showddatasegment = false; 
 bool showintermediate = false;
 int  optimizelevel = 0;
 
@@ -150,11 +152,11 @@ static chain *uninitializedclasses;
 #include "sysdep/ngen.h"        /* code generator header file                 */ 
 #include "ncomp/ntools.c"       /* compiler tool functions                    */ 
 #include "ncomp/mcode.c"        /* code generation tool functions             */ 
+#include "sysdep/disass.c"      /* disassembler (for debug purposes only)     */ 
 #include "ncomp/nparse.c"       /* parsing of JavaVM code                     */ 
 #include "ncomp/nreg.c"         /* register allocation and support routines   */ 
 #include "ncomp/nstack.c"       /* analysing the stack operations             */ 
 #include "sysdep/ngen.c"        /* code generator                             */ 
-#include "sysdep/disass.c"      /* disassembler (for debug purposes only)     */ 
 
 
 
@@ -284,12 +286,12 @@ methodptr new_compile(methodinfo *m)
                
        if (showintermediate)
                show_icmd_method();
+       else if (showdisassemble)
+               disassemble((void*) (m->mcode + dseglen), m->mcodelength - dseglen);
 
-       if (showdisassemble) {
+       if (showddatasegment)
                dseg_display((void*) (m->mcode));
-               disassemble((void*) (m->mcode + dseglen), m->mcodelength - dseglen);
-               fflush(stdout);
-               }
+
 
 
        /* release dump area */
index d91cfc8305d6a2eac247a8f181d25fdbf84b0806..d84330c0ee9b602475c577917299b1c8d0e9e87f 100644 (file)
@@ -1,3 +1,4 @@
+/* -*- mode: c; tab-width: 4; c-basic-offset: 4 -*- */
 /******************************* main.c ****************************************
 
        Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
@@ -183,6 +184,7 @@ static void print_usage()
        printf ("          -s(how)m(ethods) ..... show all methods&fields of a class\n");
        printf ("                 c(onstants) ... show the constant pool\n");
        printf ("                 a(ssembler) ... show disassembled listing\n");
+       printf ("                 d(atasegment).. show data segment listing\n");
        printf ("                 s(tack) ....... show stack for every javaVM-command\n");
        printf ("                 i(ntermediate). show intermediate representation\n");
        printf ("                 u(nicode) ..... show the unicode - hash\n");