diff options
| author | grischka <grischka> | 2017-02-13 18:23:43 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2017-02-13 18:23:43 +0100 |
| commit | a4a20360e9df90bb8a0ed23d113ed5564882de8a (patch) | |
| tree | 3115b2a0ce13f54bb56c0b19818623dfdca3bfc4 /i386-gen.c | |
| parent | 9817204d8afa37e03035158502ec7b73c72cae50 (diff) | |
| download | tinycc-a4a20360e9df90bb8a0ed23d113ed5564882de8a.tar.gz tinycc-a4a20360e9df90bb8a0ed23d113ed5564882de8a.tar.bz2 | |
fixes & cleanups
- tccgen.c/tcc.h: allow function declaration after use:
int f() { return g(); }
int g() { return 1; }
may be a warning but not an error
see also 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6
- tccgen.c: redundant code related to inline functions removed
(functions used anywhere have sym->c set automatically)
- tccgen.c: make 32bit llop non-equal test portable
(probably not on C67)
- dynarray_add: change prototype to possibly avoid aliasing
problems or at least warnings
- lib/alloca*.S: ".section .note.GNU-stack,"",%progbits" removed
(has no effect)
- tccpe: set SizeOfCode field (for correct upx decompression)
- libtcc.c: fixed alternative -run invocation
tcc "-run -lxxx ..." file.c
(meant to load the library after file).
Also supported now:
tcc files ... options ... -run @ arguments ...
Diffstat (limited to 'i386-gen.c')
| -rw-r--r-- | i386-gen.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -70,9 +70,6 @@ enum { /* maximum alignment (for aligned attribute support) */ #define MAX_ALIGN 8 -/* generate jmp to a label */ -#define gjmp2(instr,lbl) oad(instr,lbl) - /******************************************************/ #else /* ! TARGET_DEFS_ONLY */ /******************************************************/ @@ -148,7 +145,7 @@ ST_FUNC void gsym(int t) } /* instruction + 4 bytes data. Return the address of the data */ -ST_FUNC int oad(int c, int s) +static int oad(int c, int s) { int t; if (nocode_wanted) @@ -159,6 +156,9 @@ ST_FUNC int oad(int c, int s) return t; } +/* generate jmp to a label */ +#define gjmp2(instr,lbl) oad(instr,lbl) + /* output constant with relocation if 'r & VT_SYM' is true */ ST_FUNC void gen_addr32(int r, Sym *sym, long c) { |
