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 /c67-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 'c67-gen.c')
| -rw-r--r-- | c67-gen.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -182,7 +182,8 @@ FILE *f = NULL; void C67_g(int c) { int ind1; - + if (nocode_wanted) + return; #ifdef ASSEMBLY_LISTING_C67 fprintf(f, " %08X", c); #endif @@ -2038,6 +2039,8 @@ void gfunc_epilog(void) int gjmp(int t) { int ind1 = ind; + if (nocode_wanted) + return t; C67_MVKL(C67_A0, t); //r=reg to load, constant C67_MVKH(C67_A0, t); //r=reg to load, constant @@ -2070,7 +2073,9 @@ int gtst(int inv, int t) int v, *p; v = vtop->r & VT_VALMASK; - if (v == VT_CMP) { + if (nocode_wanted) { + ; + } else if (v == VT_CMP) { /* fast case : can jump directly since flags are set */ // C67 uses B2 sort of as flags register ind1 = ind; |
