Commit cf2be98437dc65eb1608b3dc0ec3aeefd88661ed

Authored by blueswir1
1 parent 06b3e1b3

Prepare for op.c removal and zero legacy ops


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4095 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
@@ -173,7 +173,10 @@ all: $(PROGS) @@ -173,7 +173,10 @@ all: $(PROGS)
173 ######################################################### 173 #########################################################
174 # cpu emulator library 174 # cpu emulator library
175 LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\ 175 LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\
176 - translate.o op.o host-utils.o 176 + translate.o host-utils.o
  177 +ifndef CONFIG_NO_DYNGEN_OP
  178 +LIBOBJS+=op.o
  179 +endif
177 # TCG code generator 180 # TCG code generator
178 LIBOBJS+= tcg/tcg.o tcg/tcg-dyngen.o tcg/tcg-runtime.o 181 LIBOBJS+= tcg/tcg.o tcg/tcg-dyngen.o tcg/tcg-runtime.o
179 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) 182 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
@@ -270,7 +273,9 @@ endif @@ -270,7 +273,9 @@ endif
270 273
271 # libqemu 274 # libqemu
272 275
  276 +ifndef CONFIG_NO_DYNGEN_OP
273 OPC_H = gen-op.h dyngen-opc.h op.h 277 OPC_H = gen-op.h dyngen-opc.h op.h
  278 +endif
274 279
275 libqemu.a: $(LIBOBJS) 280 libqemu.a: $(LIBOBJS)
276 rm -f $@ 281 rm -f $@
tcg/tcg-dyngen.c
@@ -464,6 +464,7 @@ static inline void ia64_apply_fixes (uint8_t **gen_code_pp, @@ -464,6 +464,7 @@ static inline void ia64_apply_fixes (uint8_t **gen_code_pp,
464 #endif 464 #endif
465 #endif 465 #endif
466 466
  467 +#ifndef CONFIG_NO_DYNGEN_OP
467 const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr) 468 const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr)
468 { 469 {
469 uint8_t *gen_code_ptr; 470 uint8_t *gen_code_ptr;
@@ -480,3 +481,4 @@ const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr) @@ -480,3 +481,4 @@ const TCGArg *dyngen_op(TCGContext *s, int opc, const TCGArg *opparam_ptr)
480 s->code_ptr = gen_code_ptr; 481 s->code_ptr = gen_code_ptr;
481 return opparam_ptr; 482 return opparam_ptr;
482 } 483 }
  484 +#endif
tcg/tcg-op.h
@@ -23,8 +23,10 @@ @@ -23,8 +23,10 @@
23 */ 23 */
24 #include "tcg.h" 24 #include "tcg.h"
25 25
  26 +#ifndef CONFIG_NO_DYNGEN_OP
26 /* legacy dyngen operations */ 27 /* legacy dyngen operations */
27 #include "gen-op.h" 28 #include "gen-op.h"
  29 +#endif
28 30
29 int gen_new_label(void); 31 int gen_new_label(void);
30 32
tcg/tcg-opc.h
@@ -21,7 +21,9 @@ @@ -21,7 +21,9 @@
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE. 22 * THE SOFTWARE.
23 */ 23 */
  24 +#ifndef CONFIG_NO_DYNGEN_OP
24 #include "dyngen-opc.h" 25 #include "dyngen-opc.h"
  26 +#endif
25 27
26 #ifndef DEF2 28 #ifndef DEF2
27 #define DEF2(name, oargs, iargs, cargs, flags) DEF(name, oargs + iargs + cargs, 0) 29 #define DEF2(name, oargs, iargs, cargs, flags) DEF(name, oargs + iargs + cargs, 0)
tcg/tcg.c
@@ -1752,6 +1752,8 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf, @@ -1752,6 +1752,8 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
1752 goto next; 1752 goto next;
1753 case INDEX_op_end: 1753 case INDEX_op_end:
1754 goto the_end; 1754 goto the_end;
  1755 +
  1756 +#ifndef CONFIG_NO_DYNGEN_OP
1755 case 0 ... INDEX_op_end - 1: 1757 case 0 ... INDEX_op_end - 1:
1756 /* legacy dyngen ops */ 1758 /* legacy dyngen ops */
1757 #ifdef CONFIG_PROFILER 1759 #ifdef CONFIG_PROFILER
@@ -1768,6 +1770,7 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf, @@ -1768,6 +1770,7 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
1768 args = dyngen_op(s, opc, args); 1770 args = dyngen_op(s, opc, args);
1769 } 1771 }
1770 goto next; 1772 goto next;
  1773 +#endif
1771 default: 1774 default:
1772 /* Note: in order to speed up the code, it would be much 1775 /* Note: in order to speed up the code, it would be much
1773 faster to have specialized register allocator functions for 1776 faster to have specialized register allocator functions for