From f843cadb6bc07b3b3de6786233df4592d2d5f60d Mon Sep 17 00:00:00 2001 From: grischka Date: Sun, 18 Dec 2016 17:23:33 +0100 Subject: tccgen: nocode_wanted alternatively tccgen.c: remove any 'nocode_wanted' checks, except in - greloca(), disables output elf symbols and relocs - get_reg(), will return just the first suitable reg) - save_regs(), will do nothing Some minor adjustments were made where nocode_wanted is set. xxx-gen.c: disable code output directly where it happens in functions: - g(), output disabled - gjmp(), will do nothing - gtst(), dto. --- arm64-gen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arm64-gen.c') diff --git a/arm64-gen.c b/arm64-gen.c index 4b2608a..71e977e 100644 --- a/arm64-gen.c +++ b/arm64-gen.c @@ -95,6 +95,8 @@ static uint32_t fltr(int r) ST_FUNC void o(unsigned int c) { int ind1 = ind + 4; + if (nocode_wanted) + return; if (ind1 > cur_text_section->data_allocated) section_realloc(cur_text_section, ind1); write32le(cur_text_section->data + ind, c); @@ -1278,6 +1280,8 @@ ST_FUNC void gfunc_epilog(void) ST_FUNC int gjmp(int t) { int r = ind; + if (nocode_wanted) + return t; o(t); return r; } -- cgit v1.3.1