diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 7 | ||||
| -rw-r--r-- | src/Makefile.dep | 186 | ||||
| -rw-r--r-- | src/buildvm.c | 1 | ||||
| -rw-r--r-- | src/buildvm.h | 8 | ||||
| -rw-r--r-- | src/buildvm_peobj.c | 9 | ||||
| -rw-r--r-- | src/buildvm_x64.h | 1 | ||||
| -rw-r--r-- | src/buildvm_x64win.h | 1 | ||||
| -rw-r--r-- | src/buildvm_x86.dasc | 1 | ||||
| -rw-r--r-- | src/buildvm_x86.h | 1 | ||||
| -rw-r--r-- | src/lj_asm.c | 2 | ||||
| -rw-r--r-- | src/lj_def.h | 7 |
11 files changed, 114 insertions, 110 deletions
diff --git a/src/Makefile b/src/Makefile index 1142e480..ed5f0bf5 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -391,7 +391,10 @@ depend: | |||
| 391 | @test -f buildvm_x86.h || touch buildvm_x86.h | 391 | @test -f buildvm_x86.h || touch buildvm_x86.h |
| 392 | @test -f buildvm_x64.h || touch buildvm_x64.h | 392 | @test -f buildvm_x64.h || touch buildvm_x64.h |
| 393 | @test -f buildvm_x64win.h || touch buildvm_x64win.h | 393 | @test -f buildvm_x64win.h || touch buildvm_x64win.h |
| 394 | @$(HOST_CC) $(HOST_ACFLAGS) -MM *.c | sed "s|$(DASM_DIR)|\$$(DASM_DIR)|g" >Makefile.dep | 394 | @$(HOST_CC) $(HOST_ACFLAGS) -MM *.c | \ |
| 395 | sed -e "s| [^ ]*/dasm_\S*\.h||g" \ | ||
| 396 | -e "s| buildvm_\S*\.h||g" \ | ||
| 397 | -e "s| lj_target_\S*\.h| lj_target_*.h|g" >Makefile.dep | ||
| 395 | @test -s lj_bcdef.h || $(HOST_RM) lj_bcdef.h | 398 | @test -s lj_bcdef.h || $(HOST_RM) lj_bcdef.h |
| 396 | @test -s lj_ffdef.h || $(HOST_RM) lj_ffdef.h | 399 | @test -s lj_ffdef.h || $(HOST_RM) lj_ffdef.h |
| 397 | @test -s lj_libdef.h || $(HOST_RM) lj_libdef.h | 400 | @test -s lj_libdef.h || $(HOST_RM) lj_libdef.h |
| @@ -419,7 +422,7 @@ buildvm_x64win.h: buildvm_x86.dasc | |||
| 419 | $(E) "DYNASM $@" | 422 | $(E) "DYNASM $@" |
| 420 | $(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_X64WIN) -o $@ buildvm_x86.dasc | 423 | $(Q)$(DASM) $(DASM_FLAGS) $(DASM_FLAGS_X64WIN) -o $@ buildvm_x86.dasc |
| 421 | 424 | ||
| 422 | buildvm.o: buildvm_x86.h buildvm_x64.h buildvm_x64win.h | 425 | buildvm.o: buildvm_x86.h buildvm_x64.h buildvm_x64win.h $(DASM_DIR)/dasm_*.h |
| 423 | 426 | ||
| 424 | $(BUILDVM_T): $(BUILDVM_O) | 427 | $(BUILDVM_T): $(BUILDVM_O) |
| 425 | $(E) "HOSTLINK $@" | 428 | $(E) "HOSTLINK $@" |
diff --git a/src/Makefile.dep b/src/Makefile.dep index 22eb56b0..9968a563 100644 --- a/src/Makefile.dep +++ b/src/Makefile.dep | |||
| @@ -1,143 +1,141 @@ | |||
| 1 | buildvm.o: buildvm.c lua.h luaconf.h luajit.h lj_obj.h lj_def.h lj_arch.h \ | 1 | buildvm.o: buildvm.c lua.h luaconf.h luajit.h lj_obj.h lj_def.h lj_arch.h \ |
| 2 | lj_gc.h lj_bc.h lj_ir.h lj_frame.h lj_dispatch.h lj_jit.h lj_target.h \ | 2 | lj_gc.h lj_bc.h lj_ir.h lj_frame.h lj_dispatch.h lj_jit.h buildvm.h \ |
| 3 | lj_target_x86.h buildvm.h $(DASM_DIR)/dasm_proto.h $(DASM_DIR)/dasm_x86.h \ | 3 | lj_traceerr.h |
| 4 | buildvm_x86.h lj_traceerr.h | ||
| 5 | buildvm_asm.o: buildvm_asm.c buildvm.h lj_def.h lua.h luaconf.h lj_arch.h \ | 4 | buildvm_asm.o: buildvm_asm.c buildvm.h lj_def.h lua.h luaconf.h lj_arch.h \ |
| 6 | lj_bc.h | 5 | lj_bc.h |
| 7 | buildvm_fold.o: buildvm_fold.c lj_obj.h lua.h luaconf.h lj_def.h \ | 6 | buildvm_fold.o: buildvm_fold.c lj_obj.h lua.h luaconf.h lj_def.h \ |
| 8 | lj_arch.h lj_ir.h buildvm.h | 7 | lj_arch.h lj_ir.h buildvm.h |
| 9 | buildvm_lib.o: buildvm_lib.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 8 | buildvm_lib.o: buildvm_lib.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 10 | lj_lib.h buildvm.h | 9 | lj_lib.h buildvm.h |
| 11 | buildvm_peobj.o: buildvm_peobj.c buildvm.h lj_def.h lua.h luaconf.h \ | 10 | buildvm_peobj.o: buildvm_peobj.c buildvm.h lj_def.h lua.h luaconf.h \ |
| 12 | lj_arch.h lj_bc.h | 11 | lj_arch.h lj_bc.h |
| 13 | lib_aux.o: lib_aux.c lua.h luaconf.h lauxlib.h lj_obj.h lj_def.h \ | 12 | lib_aux.o: lib_aux.c lua.h luaconf.h lauxlib.h lj_obj.h lj_def.h \ |
| 14 | lj_arch.h lj_err.h lj_errmsg.h lj_state.h lj_lib.h lj_alloc.h | 13 | lj_arch.h lj_err.h lj_errmsg.h lj_state.h lj_lib.h lj_alloc.h |
| 15 | lib_base.o: lib_base.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 14 | lib_base.o: lib_base.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 16 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h \ | 15 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h \ |
| 17 | lj_meta.h lj_state.h lj_bc.h lj_ff.h lj_ffdef.h lj_dispatch.h lj_jit.h \ | 16 | lj_meta.h lj_state.h lj_bc.h lj_ff.h lj_ffdef.h lj_dispatch.h lj_jit.h \ |
| 18 | lj_ir.h lj_ctype.h lj_lib.h lj_libdef.h | 17 | lj_ir.h lj_ctype.h lj_lib.h lj_libdef.h |
| 19 | lib_bit.o: lib_bit.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ | 18 | lib_bit.o: lib_bit.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ |
| 20 | lj_arch.h lj_err.h lj_errmsg.h lj_str.h lj_lib.h lj_libdef.h | 19 | lj_arch.h lj_err.h lj_errmsg.h lj_str.h lj_lib.h lj_libdef.h |
| 21 | lib_debug.o: lib_debug.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 20 | lib_debug.o: lib_debug.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 22 | lj_def.h lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h | 21 | lj_def.h lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h |
| 23 | lib_init.o: lib_init.c lua.h luaconf.h lauxlib.h lualib.h | 22 | lib_init.o: lib_init.c lua.h luaconf.h lauxlib.h lualib.h |
| 24 | lib_io.o: lib_io.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ | 23 | lib_io.o: lib_io.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ |
| 25 | lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_ff.h lj_ffdef.h \ | 24 | lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_ff.h lj_ffdef.h \ |
| 26 | lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h lj_traceerr.h \ | 25 | lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h lj_traceerr.h lj_lib.h \ |
| 27 | lj_lib.h lj_libdef.h | 26 | lj_libdef.h |
| 28 | lib_jit.o: lib_jit.c lua.h luaconf.h lauxlib.h lualib.h lj_arch.h \ | 27 | lib_jit.o: lib_jit.c lua.h luaconf.h lauxlib.h lualib.h lj_arch.h \ |
| 29 | lj_obj.h lj_def.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_bc.h \ | 28 | lj_obj.h lj_def.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_bc.h lj_ir.h \ |
| 30 | lj_ir.h lj_jit.h lj_iropt.h lj_dispatch.h lj_vm.h lj_vmevent.h lj_lib.h \ | 29 | lj_jit.h lj_iropt.h lj_dispatch.h lj_vm.h lj_vmevent.h lj_lib.h luajit.h \ |
| 31 | luajit.h lj_libdef.h | 30 | lj_libdef.h |
| 32 | lib_math.o: lib_math.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 31 | lib_math.o: lib_math.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 33 | lj_def.h lj_arch.h lj_lib.h lj_libdef.h | 32 | lj_def.h lj_arch.h lj_lib.h lj_libdef.h |
| 34 | lib_os.o: lib_os.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ | 33 | lib_os.o: lib_os.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ |
| 35 | lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h | 34 | lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h |
| 36 | lib_package.o: lib_package.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 35 | lib_package.o: lib_package.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 37 | lj_def.h lj_arch.h lj_err.h lj_errmsg.h lj_lib.h | 36 | lj_def.h lj_arch.h lj_err.h lj_errmsg.h lj_lib.h |
| 38 | lib_string.o: lib_string.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 37 | lib_string.o: lib_string.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 39 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h \ | 38 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h \ |
| 40 | lj_state.h lj_ff.h lj_ffdef.h lj_ctype.h lj_lib.h lj_libdef.h | 39 | lj_state.h lj_ff.h lj_ffdef.h lj_ctype.h lj_lib.h lj_libdef.h |
| 41 | lib_table.o: lib_table.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ | 40 | lib_table.o: lib_table.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ |
| 42 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_tab.h lj_lib.h \ | 41 | lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_tab.h lj_lib.h \ |
| 43 | lj_libdef.h | 42 | lj_libdef.h |
| 44 | lj_alloc.o: lj_alloc.c lj_def.h lua.h luaconf.h lj_arch.h lj_alloc.h | 43 | lj_alloc.o: lj_alloc.c lj_def.h lua.h luaconf.h lj_arch.h lj_alloc.h |
| 45 | lj_api.o: lj_api.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 44 | lj_api.o: lj_api.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 46 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_udata.h lj_meta.h \ | 45 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_udata.h lj_meta.h \ |
| 47 | lj_state.h lj_bc.h lj_frame.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h \ | 46 | lj_state.h lj_bc.h lj_frame.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h \ |
| 48 | lj_traceerr.h lj_vm.h lj_lex.h lj_parse.h | 47 | lj_traceerr.h lj_vm.h lj_lex.h lj_parse.h |
| 49 | lj_asm.o: lj_asm.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 48 | lj_asm.o: lj_asm.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 50 | lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h \ | 49 | lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h \ |
| 51 | lj_mcode.h lj_trace.h lj_dispatch.h lj_traceerr.h lj_snap.h lj_asm.h \ | 50 | lj_mcode.h lj_trace.h lj_dispatch.h lj_traceerr.h lj_snap.h lj_asm.h \ |
| 52 | lj_vm.h lj_target.h lj_target_x86.h | 51 | lj_vm.h lj_target.h lj_target_*.h |
| 53 | lj_bc.o: lj_bc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_bc.h \ | 52 | lj_bc.o: lj_bc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_bc.h \ |
| 54 | lj_bcdef.h | 53 | lj_bcdef.h |
| 55 | lj_ctype.o: lj_ctype.c lj_ctype.h lj_def.h lua.h luaconf.h | 54 | lj_ctype.o: lj_ctype.c lj_ctype.h lj_def.h lua.h luaconf.h |
| 56 | lj_dispatch.o: lj_dispatch.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 55 | lj_dispatch.o: lj_dispatch.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 57 | lj_err.h lj_errmsg.h lj_state.h lj_frame.h lj_bc.h lj_ff.h lj_ffdef.h \ | 56 | lj_err.h lj_errmsg.h lj_state.h lj_frame.h lj_bc.h lj_ff.h lj_ffdef.h \ |
| 58 | lj_jit.h lj_ir.h lj_trace.h lj_dispatch.h lj_traceerr.h lj_vm.h \ | 57 | lj_jit.h lj_ir.h lj_trace.h lj_dispatch.h lj_traceerr.h lj_vm.h luajit.h |
| 59 | luajit.h | ||
| 60 | lj_err.o: lj_err.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_err.h \ | 58 | lj_err.o: lj_err.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_err.h \ |
| 61 | lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_state.h lj_frame.h lj_bc.h \ | 59 | lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_state.h lj_frame.h lj_bc.h \ |
| 62 | lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h | 60 | lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h |
| 63 | lj_func.o: lj_func.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 61 | lj_func.o: lj_func.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 64 | lj_func.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h \ | 62 | lj_func.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h \ |
| 65 | lj_traceerr.h lj_vm.h | 63 | lj_traceerr.h lj_vm.h |
| 66 | lj_gc.o: lj_gc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 64 | lj_gc.o: lj_gc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 67 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_udata.h lj_meta.h \ | 65 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_udata.h lj_meta.h \ |
| 68 | lj_state.h lj_frame.h lj_bc.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h \ | 66 | lj_state.h lj_frame.h lj_bc.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h \ |
| 69 | lj_traceerr.h lj_vm.h | 67 | lj_traceerr.h lj_vm.h |
| 70 | lj_gdbjit.o: lj_gdbjit.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 68 | lj_gdbjit.o: lj_gdbjit.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 71 | lj_gc.h lj_err.h lj_errmsg.h lj_frame.h lj_bc.h lj_jit.h \ | 69 | lj_gc.h lj_err.h lj_errmsg.h lj_frame.h lj_bc.h lj_jit.h lj_ir.h \ |
| 72 | lj_ir.h lj_dispatch.h | 70 | lj_dispatch.h |
| 73 | lj_ir.o: lj_ir.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 71 | lj_ir.o: lj_ir.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 74 | lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ | 72 | lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ |
| 75 | lj_bc.h lj_traceerr.h lj_lib.h | 73 | lj_bc.h lj_traceerr.h lj_lib.h |
| 76 | lj_lex.o: lj_lex.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 74 | lj_lex.o: lj_lex.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 77 | lj_err.h lj_errmsg.h lj_str.h lj_lex.h lj_parse.h lj_ctype.h | 75 | lj_err.h lj_errmsg.h lj_str.h lj_lex.h lj_parse.h lj_ctype.h |
| 78 | lj_lib.o: lj_lib.c lauxlib.h lua.h luaconf.h lj_obj.h lj_def.h lj_arch.h \ | 76 | lj_lib.o: lj_lib.c lauxlib.h lua.h luaconf.h lj_obj.h lj_def.h lj_arch.h \ |
| 79 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_bc.h \ | 77 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_bc.h \ |
| 80 | lj_dispatch.h lj_jit.h lj_ir.h lj_vm.h lj_lib.h | 78 | lj_dispatch.h lj_jit.h lj_ir.h lj_vm.h lj_lib.h |
| 81 | lj_mcode.o: lj_mcode.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 79 | lj_mcode.o: lj_mcode.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 82 | lj_gc.h lj_jit.h lj_ir.h lj_mcode.h lj_trace.h lj_dispatch.h lj_bc.h \ | 80 | lj_gc.h lj_jit.h lj_ir.h lj_mcode.h lj_trace.h lj_dispatch.h lj_bc.h \ |
| 83 | lj_traceerr.h lj_vm.h | 81 | lj_traceerr.h lj_vm.h |
| 84 | lj_meta.o: lj_meta.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 82 | lj_meta.o: lj_meta.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 85 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_meta.h lj_bc.h lj_vm.h | 83 | lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_meta.h lj_bc.h lj_vm.h |
| 86 | lj_obj.o: lj_obj.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h | 84 | lj_obj.o: lj_obj.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h |
| 87 | lj_opt_dce.o: lj_opt_dce.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 85 | lj_opt_dce.o: lj_opt_dce.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 88 | lj_ir.h lj_jit.h lj_iropt.h | 86 | lj_ir.h lj_jit.h lj_iropt.h |
| 89 | lj_opt_fold.o: lj_opt_fold.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 87 | lj_opt_fold.o: lj_opt_fold.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 90 | lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ | 88 | lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ |
| 91 | lj_bc.h lj_traceerr.h lj_vm.h lj_folddef.h | 89 | lj_bc.h lj_traceerr.h lj_vm.h lj_folddef.h |
| 92 | lj_opt_loop.o: lj_opt_loop.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 90 | lj_opt_loop.o: lj_opt_loop.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 93 | lj_err.h lj_errmsg.h lj_str.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ | 91 | lj_err.h lj_errmsg.h lj_str.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ |
| 94 | lj_dispatch.h lj_bc.h lj_traceerr.h lj_snap.h lj_vm.h | 92 | lj_dispatch.h lj_bc.h lj_traceerr.h lj_snap.h lj_vm.h |
| 95 | lj_opt_mem.o: lj_opt_mem.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 93 | lj_opt_mem.o: lj_opt_mem.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 96 | lj_tab.h lj_ir.h lj_jit.h lj_iropt.h | 94 | lj_tab.h lj_ir.h lj_jit.h lj_iropt.h |
| 97 | lj_opt_narrow.o: lj_opt_narrow.c lj_obj.h lua.h luaconf.h lj_def.h \ | 95 | lj_opt_narrow.o: lj_opt_narrow.c lj_obj.h lua.h luaconf.h lj_def.h \ |
| 98 | lj_arch.h lj_str.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ | 96 | lj_arch.h lj_str.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ |
| 99 | lj_dispatch.h lj_traceerr.h | 97 | lj_dispatch.h lj_traceerr.h |
| 100 | lj_parse.o: lj_parse.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 98 | lj_parse.o: lj_parse.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 101 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_state.h \ | 99 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_state.h \ |
| 102 | lj_bc.h lj_lex.h lj_parse.h lj_vm.h lj_vmevent.h | 100 | lj_bc.h lj_lex.h lj_parse.h lj_vm.h lj_vmevent.h |
| 103 | lj_record.o: lj_record.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 101 | lj_record.o: lj_record.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 104 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_state.h lj_frame.h \ | 102 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_state.h lj_frame.h \ |
| 105 | lj_bc.h lj_ff.h lj_ffdef.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ | 103 | lj_bc.h lj_ff.h lj_ffdef.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ |
| 106 | lj_dispatch.h lj_traceerr.h lj_record.h lj_snap.h lj_asm.h lj_vm.h \ | 104 | lj_dispatch.h lj_traceerr.h lj_record.h lj_snap.h lj_asm.h lj_vm.h \ |
| 107 | lj_recdef.h | 105 | lj_recdef.h |
| 108 | lj_snap.o: lj_snap.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 106 | lj_snap.o: lj_snap.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 109 | lj_state.h lj_frame.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ | 107 | lj_state.h lj_frame.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ |
| 110 | lj_dispatch.h lj_traceerr.h lj_snap.h lj_target.h lj_target_x86.h | 108 | lj_dispatch.h lj_traceerr.h lj_snap.h lj_target.h lj_target_*.h |
| 111 | lj_state.o: lj_state.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 109 | lj_state.o: lj_state.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 112 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_meta.h \ | 110 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_meta.h \ |
| 113 | lj_state.h lj_frame.h lj_bc.h lj_mcode.h lj_jit.h lj_ir.h lj_trace.h \ | 111 | lj_state.h lj_frame.h lj_bc.h lj_mcode.h lj_jit.h lj_ir.h lj_trace.h \ |
| 114 | lj_dispatch.h lj_traceerr.h lj_vm.h lj_lex.h lj_alloc.h | 112 | lj_dispatch.h lj_traceerr.h lj_vm.h lj_lex.h lj_alloc.h |
| 115 | lj_str.o: lj_str.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 113 | lj_str.o: lj_str.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 116 | lj_err.h lj_errmsg.h lj_str.h lj_state.h lj_ctype.h | 114 | lj_err.h lj_errmsg.h lj_str.h lj_state.h lj_ctype.h |
| 117 | lj_tab.o: lj_tab.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ | 115 | lj_tab.o: lj_tab.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ |
| 118 | lj_err.h lj_errmsg.h lj_tab.h | 116 | lj_err.h lj_errmsg.h lj_tab.h |
| 119 | lj_trace.o: lj_trace.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 117 | lj_trace.o: lj_trace.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 120 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_frame.h lj_bc.h lj_state.h \ | 118 | lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_frame.h lj_bc.h lj_state.h \ |
| 121 | lj_ir.h lj_jit.h lj_iropt.h lj_mcode.h lj_trace.h lj_dispatch.h \ | 119 | lj_ir.h lj_jit.h lj_iropt.h lj_mcode.h lj_trace.h lj_dispatch.h \ |
| 122 | lj_traceerr.h lj_snap.h lj_gdbjit.h lj_record.h lj_asm.h lj_vm.h \ | 120 | lj_traceerr.h lj_snap.h lj_gdbjit.h lj_record.h lj_asm.h lj_vm.h \ |
| 123 | lj_vmevent.h lj_target.h lj_target_x86.h | 121 | lj_vmevent.h lj_target.h lj_target_*.h |
| 124 | lj_udata.o: lj_udata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 122 | lj_udata.o: lj_udata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 125 | lj_gc.h lj_udata.h | 123 | lj_gc.h lj_udata.h |
| 126 | lj_vmevent.o: lj_vmevent.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ | 124 | lj_vmevent.o: lj_vmevent.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ |
| 127 | lj_str.h lj_tab.h lj_state.h lj_dispatch.h lj_bc.h lj_jit.h lj_ir.h \ | 125 | lj_str.h lj_tab.h lj_state.h lj_dispatch.h lj_bc.h lj_jit.h lj_ir.h \ |
| 128 | lj_vm.h lj_vmevent.h | 126 | lj_vm.h lj_vmevent.h |
| 129 | ljamalg.o: ljamalg.c lua.h luaconf.h lauxlib.h lj_gc.c lj_obj.h lj_def.h \ | 127 | ljamalg.o: ljamalg.c lua.h luaconf.h lauxlib.h lj_gc.c lj_obj.h lj_def.h \ |
| 130 | lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h \ | 128 | lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h \ |
| 131 | lj_udata.h lj_meta.h lj_state.h lj_frame.h lj_bc.h lj_trace.h lj_jit.h \ | 129 | lj_udata.h lj_meta.h lj_state.h lj_frame.h lj_bc.h lj_trace.h lj_jit.h \ |
| 132 | lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_err.c lj_ctype.c \ | 130 | lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_err.c lj_ctype.c \ |
| 133 | lj_ctype.h lj_bc.c lj_bcdef.h lj_obj.c lj_str.c lj_tab.c lj_func.c \ | 131 | lj_ctype.h lj_bc.c lj_bcdef.h lj_obj.c lj_str.c lj_tab.c lj_func.c \ |
| 134 | lj_udata.c lj_meta.c lj_state.c lj_mcode.h lj_lex.h lj_alloc.h \ | 132 | lj_udata.c lj_meta.c lj_state.c lj_mcode.h lj_lex.h lj_alloc.h \ |
| 135 | lj_dispatch.c lj_ff.h lj_ffdef.h luajit.h lj_vmevent.c lj_vmevent.h \ | 133 | lj_dispatch.c lj_ff.h lj_ffdef.h luajit.h lj_vmevent.c lj_vmevent.h \ |
| 136 | lj_api.c lj_parse.h lj_lex.c lj_parse.c lj_lib.c lj_lib.h lj_ir.c \ | 134 | lj_api.c lj_parse.h lj_lex.c lj_parse.c lj_lib.c lj_lib.h lj_ir.c \ |
| 137 | lj_iropt.h lj_opt_mem.c lj_opt_fold.c lj_folddef.h lj_opt_narrow.c \ | 135 | lj_iropt.h lj_opt_mem.c lj_opt_fold.c lj_folddef.h lj_opt_narrow.c \ |
| 138 | lj_opt_dce.c lj_opt_loop.c lj_snap.h lj_mcode.c lj_snap.c lj_target.h \ | 136 | lj_opt_dce.c lj_opt_loop.c lj_snap.h lj_mcode.c lj_snap.c lj_target.h \ |
| 139 | lj_target_x86.h lj_record.c lj_record.h lj_asm.h lj_recdef.h lj_asm.c \ | 137 | lj_target_*.h lj_record.c lj_record.h lj_asm.h lj_recdef.h lj_asm.c \ |
| 140 | lj_trace.c lj_gdbjit.h lj_gdbjit.c lj_alloc.c lib_aux.c lib_base.c \ | 138 | lj_trace.c lj_gdbjit.h lj_gdbjit.c lj_alloc.c lib_aux.c lib_base.c \ |
| 141 | lualib.h lj_libdef.h lib_math.c lib_string.c lib_table.c lib_io.c \ | 139 | lualib.h lj_libdef.h lib_math.c lib_string.c lib_table.c lib_io.c \ |
| 142 | lib_os.c lib_package.c lib_debug.c lib_bit.c lib_jit.c lib_init.c | 140 | lib_os.c lib_package.c lib_debug.c lib_bit.c lib_jit.c lib_init.c |
| 143 | luajit.o: luajit.c lua.h luaconf.h lauxlib.h lualib.h luajit.h | 141 | luajit.o: luajit.c lua.h luaconf.h lauxlib.h lualib.h luajit.h |
diff --git a/src/buildvm.c b/src/buildvm.c index 1b4d6928..8cceeb23 100644 --- a/src/buildvm.c +++ b/src/buildvm.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include "lj_ir.h" | 28 | #include "lj_ir.h" |
| 29 | #include "lj_frame.h" | 29 | #include "lj_frame.h" |
| 30 | #include "lj_dispatch.h" | 30 | #include "lj_dispatch.h" |
| 31 | #include "lj_target.h" | ||
| 32 | 31 | ||
| 33 | #include "buildvm.h" | 32 | #include "buildvm.h" |
| 34 | 33 | ||
diff --git a/src/buildvm.h b/src/buildvm.h index 41038dd6..27a0a842 100644 --- a/src/buildvm.h +++ b/src/buildvm.h | |||
| @@ -38,14 +38,8 @@ | |||
| 38 | struct dasm_State; | 38 | struct dasm_State; |
| 39 | 39 | ||
| 40 | /* Build modes. */ | 40 | /* Build modes. */ |
| 41 | #if LJ_TARGET_X86ORX64 | ||
| 42 | #define BUILDDEFX(_) _(peobj) | ||
| 43 | #else | ||
| 44 | #define BUILDDEFX(_) | ||
| 45 | #endif | ||
| 46 | |||
| 47 | #define BUILDDEF(_) \ | 41 | #define BUILDDEF(_) \ |
| 48 | _(elfasm) _(coffasm) _(machasm) BUILDDEFX(_) _(raw) \ | 42 | _(elfasm) _(coffasm) _(machasm) _(peobj) _(raw) \ |
| 49 | _(bcdef) _(ffdef) _(libdef) _(recdef) _(vmdef) \ | 43 | _(bcdef) _(ffdef) _(libdef) _(recdef) _(vmdef) \ |
| 50 | _(folddef) | 44 | _(folddef) |
| 51 | 45 | ||
diff --git a/src/buildvm_peobj.c b/src/buildvm_peobj.c index 4cde6e00..d06392df 100644 --- a/src/buildvm_peobj.c +++ b/src/buildvm_peobj.c | |||
| @@ -322,4 +322,13 @@ void emit_peobj(BuildCtx *ctx) | |||
| 322 | owrite(ctx, strtab, strtabofs); | 322 | owrite(ctx, strtab, strtabofs); |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | #else | ||
| 326 | |||
| 327 | void emit_peobj(BuildCtx *ctx) | ||
| 328 | { | ||
| 329 | UNUSED(ctx); | ||
| 330 | fprintf(stderr, "Error: no PE object support for this target\n"); | ||
| 331 | exit(1); | ||
| 332 | } | ||
| 333 | |||
| 325 | #endif | 334 | #endif |
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index a44f7e50..9962d4b0 100644 --- a/src/buildvm_x64.h +++ b/src/buildvm_x64.h | |||
| @@ -1049,7 +1049,6 @@ static const char *const extnames[] = { | |||
| 1049 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) | 1049 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) |
| 1050 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) | 1050 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) |
| 1051 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) | 1051 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) |
| 1052 | #define DtE(_V) (int)(ptrdiff_t)&(((ExitInfo *)0)_V) | ||
| 1053 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) | 1052 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) |
| 1054 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | 1053 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) |
| 1055 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | 1054 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) |
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index 5e57bb3f..eaefbe0b 100644 --- a/src/buildvm_x64win.h +++ b/src/buildvm_x64win.h | |||
| @@ -1050,7 +1050,6 @@ static const char *const extnames[] = { | |||
| 1050 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) | 1050 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) |
| 1051 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) | 1051 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) |
| 1052 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) | 1052 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) |
| 1053 | #define DtE(_V) (int)(ptrdiff_t)&(((ExitInfo *)0)_V) | ||
| 1054 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) | 1053 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) |
| 1055 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | 1054 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) |
| 1056 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | 1055 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) |
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index 36151318..493820b6 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc | |||
| @@ -108,7 +108,6 @@ | |||
| 108 | |.type NODE, Node | 108 | |.type NODE, Node |
| 109 | |.type NARGS, int | 109 | |.type NARGS, int |
| 110 | |.type TRACE, GCtrace | 110 | |.type TRACE, GCtrace |
| 111 | |.type EXITINFO, ExitInfo | ||
| 112 | | | 111 | | |
| 113 | |// Stack layout while in interpreter. Must match with lj_frame.h. | 112 | |// Stack layout while in interpreter. Must match with lj_frame.h. |
| 114 | |//----------------------------------------------------------------------- | 113 | |//----------------------------------------------------------------------- |
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index e833c3c3..e7f0da64 100644 --- a/src/buildvm_x86.h +++ b/src/buildvm_x86.h | |||
| @@ -1104,7 +1104,6 @@ static const char *const extnames[] = { | |||
| 1104 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) | 1104 | #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) |
| 1105 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) | 1105 | #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) |
| 1106 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) | 1106 | #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) |
| 1107 | #define DtE(_V) (int)(ptrdiff_t)&(((ExitInfo *)0)_V) | ||
| 1108 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) | 1107 | #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) |
| 1109 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | 1108 | #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) |
| 1110 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | 1109 | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) |
diff --git a/src/lj_asm.c b/src/lj_asm.c index 56b39e32..7773abe1 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
| @@ -950,7 +950,7 @@ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group) | |||
| 950 | } | 950 | } |
| 951 | /* Push the high byte of the exitno for each exit stub group. */ | 951 | /* Push the high byte of the exitno for each exit stub group. */ |
| 952 | *mxp++ = XI_PUSHi8; *mxp++ = (MCode)((group*EXITSTUBS_PER_GROUP)>>8); | 952 | *mxp++ = XI_PUSHi8; *mxp++ = (MCode)((group*EXITSTUBS_PER_GROUP)>>8); |
| 953 | /* Store DISPATCH in ExitInfo->dispatch. Account for the two push ops. */ | 953 | /* Store DISPATCH at original stack slot 0. Account for the two push ops. */ |
| 954 | *mxp++ = XI_MOVmi; | 954 | *mxp++ = XI_MOVmi; |
| 955 | *mxp++ = MODRM(XM_OFS8, 0, RID_ESP); | 955 | *mxp++ = MODRM(XM_OFS8, 0, RID_ESP); |
| 956 | *mxp++ = MODRM(XM_SCALE1, RID_ESP, RID_ESP); | 956 | *mxp++ = MODRM(XM_SCALE1, RID_ESP, RID_ESP); |
diff --git a/src/lj_def.h b/src/lj_def.h index de4ad1be..f6b5432d 100644 --- a/src/lj_def.h +++ b/src/lj_def.h | |||
| @@ -140,7 +140,12 @@ static LJ_AINLINE uint32_t lj_fls(uint32_t x) | |||
| 140 | #define lj_fls(x) ((uint32_t)(__builtin_clz(x)^31)) | 140 | #define lj_fls(x) ((uint32_t)(__builtin_clz(x)^31)) |
| 141 | #endif | 141 | #endif |
| 142 | 142 | ||
| 143 | #if defined(__i386__) || defined(__x86_64__) | 143 | #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 |
| 144 | static LJ_AINLINE uint32_t lj_bswap(uint32_t x) | ||
| 145 | { | ||
| 146 | return (uint32_t)__builtin_bswap32((int32_t)x); | ||
| 147 | } | ||
| 148 | #elif defined(__i386__) || defined(__x86_64__) | ||
| 144 | static LJ_AINLINE uint32_t lj_bswap(uint32_t x) | 149 | static LJ_AINLINE uint32_t lj_bswap(uint32_t x) |
| 145 | { | 150 | { |
| 146 | uint32_t r; __asm__("bswap %0" : "=r" (r) : "0" (x)); return r; | 151 | uint32_t r; __asm__("bswap %0" : "=r" (r) : "0" (x)); return r; |
