aboutsummaryrefslogtreecommitdiff
path: root/arm64-gen.c
diff options
context:
space:
mode:
authorgrischka <grischka>2016-12-18 17:23:33 +0100
committergrischka <grischka>2016-12-18 18:53:21 +0100
commitf843cadb6bc07b3b3de6786233df4592d2d5f60d (patch)
treec11a7c8e9138015eb15dbaffff3bc28708292797 /arm64-gen.c
parent77d7ea04acb56f839031993c102366e30cad5c25 (diff)
downloadtinycc-f843cadb6bc07b3b3de6786233df4592d2d5f60d.tar.gz
tinycc-f843cadb6bc07b3b3de6786233df4592d2d5f60d.tar.bz2
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.
Diffstat (limited to 'arm64-gen.c')
-rw-r--r--arm64-gen.c4
1 files changed, 4 insertions, 0 deletions
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;
}