diff options
| author | grischka <grischka> | 2016-12-18 17:23:33 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2016-12-18 18:53:21 +0100 |
| commit | f843cadb6bc07b3b3de6786233df4592d2d5f60d (patch) | |
| tree | c11a7c8e9138015eb15dbaffff3bc28708292797 /arm-gen.c | |
| parent | 77d7ea04acb56f839031993c102366e30cad5c25 (diff) | |
| download | tinycc-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 'arm-gen.c')
| -rw-r--r-- | arm-gen.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -214,7 +214,8 @@ void o(uint32_t i) { /* this is a good place to start adding big-endian support*/ int ind1; - + if (nocode_wanted) + return; ind1 = ind + 4; if (!cur_text_section) tcc_error("compiler error! This happens f.ex. if the compiler\n" @@ -1411,6 +1412,8 @@ void gfunc_epilog(void) int gjmp(int t) { int r; + if (nocode_wanted) + return t; r=ind; o(0xE0000000|encbranch(r,t,1)); return r; @@ -1427,9 +1430,13 @@ int gtst(int inv, int t) { int v, r; uint32_t op; + v = vtop->r & VT_VALMASK; r=ind; - if (v == VT_CMP) { + + if (nocode_wanted) { + ; + } else if (v == VT_CMP) { op=mapcc(inv?negcc(vtop->c.i):vtop->c.i); op|=encbranch(r,t,1); o(op); |
