From d348a9a51d32cece842b7885d27a411436d7887b Mon Sep 17 00:00:00 2001 From: grischka Date: Tue, 12 Dec 2017 17:57:20 +0100 Subject: final update for 0.9.27 tccgen.c: - fix ldouble asm hack - fix a VLA problem on Win64 (also x86_64-gen.c) - patch_type(): make sure that no symbol ever changes from global to static tcc.c: - tcc -vv: print libtcc1.a path also on win32 tccpe.c, tcctools.c: - use unix LF mode to for .def output files (that is for creating reproducible output trees) Makefile: - suppress some warnings when makeinfo is missing - call 'which install' only on win32 tests/Makefile: - change PATH only on WINNT systems (i.e. not if cross-compiling on linux for win32) - asm-c-connect.test: slim output and do diff tccrun.c tccpe.c *-link.c: - integrate former 'pe_relocate_rva()' into normal relocation This also fixes linkage of the unwind data on WIN64 for -run (reported by Janus Lynggaard Thorborg) tccasm.c, tests/tcctest.c: - fix dot (sym_index of -1 crashed in put_elf_reloc) - massage .set a bit (see test) other: - #define SECTION_ABS removed - ST_DATA Section *strtab_section: removed - put_extern_sym2(): take int section number Conflicts: tccelf.c tccpe.c Conflicts: tccelf.c --- x86_64-gen.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'x86_64-gen.c') diff --git a/x86_64-gen.c b/x86_64-gen.c index d7cb895..e33a38a 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -1034,6 +1034,7 @@ void gfunc_epilog(void) saved_ind = ind; ind = func_sub_sp_offset - FUNC_PROLOG_SIZE; /* align local size to word & save local variables */ + func_scratch = (func_scratch + 15) & -16; v = (func_scratch + -loc + 15) & -16; if (v >= 4096) { @@ -2222,6 +2223,14 @@ ST_FUNC void gen_vla_sp_restore(int addr) { gen_modrm64(0x8b, TREG_RSP, VT_LOCAL, NULL, addr); } +#ifdef TCC_TARGET_PE +/* Save result of gen_vla_alloc onto the stack */ +ST_FUNC void gen_vla_result(int addr) { + /* mov %rax,addr(%rbp)*/ + gen_modrm64(0x89, TREG_RAX, VT_LOCAL, NULL, addr); +} +#endif + /* Subtract from the stack pointer, and push the resulting value onto the stack */ ST_FUNC void gen_vla_alloc(CType *type, int align) { #ifdef TCC_TARGET_PE -- cgit v1.3.1