summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile.target7
-rw-r--r--tcg/tcg-dyngen.c2
-rw-r--r--tcg/tcg-op.h2
-rw-r--r--tcg/tcg-opc.h2
-rw-r--r--tcg/tcg.c3
5 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.target b/Makefile.target
index 9c83733345..5ac29a7d82 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -173,7 +173,10 @@ all: $(PROGS)
 #########################################################
 # cpu emulator library
 LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\
-        translate.o op.o host-utils.o
+        translate.o host-utils.o
+ifndef CONFIG_NO_DYNGEN_OP
+LIBOBJS+=op.o
+endif
 # TCG code generator
 LIBOBJS+= tcg/tcg.o tcg/tcg-dyngen.o tcg/tcg-runtime.o
 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
@@ -270,7 +273,9 @@ endif
 
 # libqemu
 
+ifndef CONFIG_NO_DYNGEN_OP
 OPC_H = gen-op.h dyngen-opc.h op.h
+endif
 
 libqemu.a: $(LIBOBJS)
 	rm -f $@
diff --git a/tcg/tcg-dyngen.c b/tcg/tcg-dyngen.c
index 1cc084e6ef..5780372124 100644
--- a/tcg/tcg-dyngen.c
+++ b/tcg/tcg-dyngen.c
@@ -464,6 +464,7 @@ static inline void ia64_apply_fixes (uint8_t **gen_code_pp,
 #endif
 #endif
 
+#ifndef CONFIG_NO_DYNGEN_OP
 const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr)
 {
     uint8_t *gen_code_ptr;
@@ -480,3 +481,4 @@ const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr)
     s->code_ptr = gen_code_ptr;
     return opparam_ptr;
 }
+#endif
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 2e8b5e8b6c..8f0897cdb1 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -23,8 +23,10 @@
  */
 #include "tcg.h"
 
+#ifndef CONFIG_NO_DYNGEN_OP
 /* legacy dyngen operations */
 #include "gen-op.h"
+#endif
 
 int gen_new_label(void);
 
diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h
index 4d91d117db..ee95910620 100644
--- a/tcg/tcg-opc.h
+++ b/tcg/tcg-opc.h
@@ -21,7 +21,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+#ifndef CONFIG_NO_DYNGEN_OP
 #include "dyngen-opc.h"
+#endif
 
 #ifndef DEF2
 #define DEF2(name, oargs, iargs, cargs, flags) DEF(name, oargs + iargs + cargs, 0)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 2e9fa18f5e..379b8f230c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1752,6 +1752,8 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
             goto next;
         case INDEX_op_end:
             goto the_end;
+
+#ifndef CONFIG_NO_DYNGEN_OP
         case 0 ... INDEX_op_end - 1:
             /* legacy dyngen ops */
 #ifdef CONFIG_PROFILER
@@ -1768,6 +1770,7 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
                 args = dyngen_op(s, opc, args);
             }
             goto next;
+#endif
         default:
             /* Note: in order to speed up the code, it would be much
                faster to have specialized register allocator functions for