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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user