PPC: Separate PPC vs. PPCSPE interpreter source files.

This commit is contained in:
Mike Pall 2011-07-03 15:01:50 +02:00
parent 8addfefb33
commit 161f1a5eb0
3 changed files with 3715 additions and 13 deletions

View File

@ -341,7 +341,7 @@ DASM_FLAGS_X86=
DASM_FLAGS_X64= -D X64 DASM_FLAGS_X64= -D X64
DASM_FLAGS_X64WIN= -D X64 -D X64WIN DASM_FLAGS_X64WIN= -D X64 -D X64WIN
DASM_FLAGS_ARM= DASM_FLAGS_ARM=
DASM_FLAGS_PPCSPE= -D SPE DASM_FLAGS_PPCSPE=
BUILDVM_O= buildvm.o buildvm_asm.o buildvm_peobj.o buildvm_lib.o buildvm_fold.o BUILDVM_O= buildvm.o buildvm_asm.o buildvm_peobj.o buildvm_lib.o buildvm_fold.o
BUILDVM_T= buildvm BUILDVM_T= buildvm
@ -478,7 +478,7 @@ distclean: clean
$(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_X64) -o buildvm_x64.h buildvm_x86.dasc $(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_X64) -o buildvm_x64.h buildvm_x86.dasc
$(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_X64WIN) -o buildvm_x64win.h buildvm_x86.dasc $(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_X64WIN) -o buildvm_x64win.h buildvm_x86.dasc
$(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_ARM) -o buildvm_arm.h buildvm_arm.dasc $(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_ARM) -o buildvm_arm.h buildvm_arm.dasc
$(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_PPCSPE) -o buildvm_ppcspe.h buildvm_ppc.dasc $(Q)$(DASM) $(DASM_DISTFLAGS) $(DASM_FLAGS_PPCSPE) -o buildvm_ppcspe.h buildvm_ppcspe.dasc
depend: depend:
@for file in $(ALL_HDRGEN) $(ALL_DYNGEN); do \ @for file in $(ALL_HDRGEN) $(ALL_DYNGEN); do \
@ -516,9 +516,9 @@ buildvm_arm.h: buildvm_arm.dasc
$(E) "DYNASM $@" $(E) "DYNASM $@"
$(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_ARM) -o $@ buildvm_arm.dasc $(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_ARM) -o $@ buildvm_arm.dasc
buildvm_ppcspe.h: buildvm_ppc.dasc buildvm_ppcspe.h: buildvm_ppcspe.dasc
$(E) "DYNASM $@" $(E) "DYNASM $@"
$(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_PPCSPE) -o $@ buildvm_ppc.dasc $(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_PPCSPE) -o $@ buildvm_ppcspe.dasc
buildvm.o: $(ALL_DYNGEN) $(DASM_DIR)/dasm_*.h buildvm.o: $(ALL_DYNGEN) $(DASM_DIR)/dasm_*.h

3710
src/buildvm_ppcspe.dasc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
** This file has been pre-processed with DynASM. ** This file has been pre-processed with DynASM.
** http://luajit.org/dynasm.html ** http://luajit.org/dynasm.html
** DynASM version 1.3.0, DynASM ppc version 1.3.0 ** DynASM version 1.3.0, DynASM ppc version 1.3.0
** DO NOT EDIT! The original file is in "buildvm_ppc.dasc". ** DO NOT EDIT! The original file is in "buildvm_ppcspe.dasc".
*/ */
#if DASM_VERSION != 10300 #if DASM_VERSION != 10300
@ -6048,14 +6048,10 @@ static void emit_asm_debug(BuildCtx *ctx)
"\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n", "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n",
(int)ctx->codesz, CFRAME_SIZE); (int)ctx->codesz, CFRAME_SIZE);
for (i = 14; i <= 31; i++) for (i = 14; i <= 31; i++)
#if LJ_TARGET_PPCSPE
fprintf(ctx->fp, fprintf(ctx->fp,
"\t.byte %d\n\t.uleb128 %d\n" "\t.byte %d\n\t.uleb128 %d\n"
"\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n", "\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n",
0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i)); 0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i));
#else
#error "missing frame info for saved registers"
#endif
fprintf(ctx->fp, fprintf(ctx->fp,
"\t.align 2\n" "\t.align 2\n"
".LEFDE0:\n\n"); ".LEFDE0:\n\n");
@ -6089,14 +6085,10 @@ static void emit_asm_debug(BuildCtx *ctx)
"\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n", "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n",
(int)ctx->codesz, CFRAME_SIZE); (int)ctx->codesz, CFRAME_SIZE);
for (i = 14; i <= 31; i++) for (i = 14; i <= 31; i++)
#if LJ_TARGET_PPCSPE
fprintf(ctx->fp, fprintf(ctx->fp,
"\t.byte %d\n\t.uleb128 %d\n" "\t.byte %d\n\t.uleb128 %d\n"
"\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n", "\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n",
0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i)); 0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i));
#else
#error "missing frame info for saved registers"
#endif
fprintf(ctx->fp, fprintf(ctx->fp,
"\t.align 2\n" "\t.align 2\n"
".LEFDE1:\n\n"); ".LEFDE1:\n\n");