<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/tcctools.c, branch main</title>
<subtitle>Tiny C Compiler by Fabrice Bellard Git mirror of the final release by Bellard, discarding all changes after. The repository at https://repo.or.cz/tinycc.git has become untrustworthy. Also the tcc sources have become tainted with AI slop.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/'/>
<entry>
<title>final update for 0.9.27</title>
<updated>2017-12-12T16:57:20+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-12-12T16:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=d348a9a51d32cece842b7885d27a411436d7887b'/>
<id>d348a9a51d32cece842b7885d27a411436d7887b</id>
<content type='text'>
tccgen.c:
- fix ldouble asm hack
- fix a VLA problem on Win64 (also x86_64-gen.c)
- patch_type(): make sure that no symbol ever changes
  from global to static

tcc.c:
- tcc -vv: print libtcc1.a path also on win32

tccpe.c, tcctools.c:
- use unix LF mode to for .def output files (that is for
  creating reproducible output trees)

Makefile:
- suppress some warnings when makeinfo is missing
- call 'which install' only on win32

tests/Makefile:
- change PATH only on WINNT systems (i.e. not if cross-compiling
  on linux for win32)
- asm-c-connect.test: slim output and do diff

tccrun.c tccpe.c *-link.c:
- integrate former 'pe_relocate_rva()' into normal relocation
  This also fixes linkage of the unwind data on WIN64 for -run
  (reported by Janus Lynggaard Thorborg)

tccasm.c, tests/tcctest.c:
- fix dot (sym_index of -1 crashed in put_elf_reloc)
- massage .set a bit (see test)

other:
- #define SECTION_ABS removed
- ST_DATA Section *strtab_section: removed
- put_extern_sym2(): take int section number

Conflicts:
	tccelf.c
	tccpe.c

Conflicts:
	tccelf.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tccgen.c:
- fix ldouble asm hack
- fix a VLA problem on Win64 (also x86_64-gen.c)
- patch_type(): make sure that no symbol ever changes
  from global to static

tcc.c:
- tcc -vv: print libtcc1.a path also on win32

tccpe.c, tcctools.c:
- use unix LF mode to for .def output files (that is for
  creating reproducible output trees)

Makefile:
- suppress some warnings when makeinfo is missing
- call 'which install' only on win32

tests/Makefile:
- change PATH only on WINNT systems (i.e. not if cross-compiling
  on linux for win32)
- asm-c-connect.test: slim output and do diff

tccrun.c tccpe.c *-link.c:
- integrate former 'pe_relocate_rva()' into normal relocation
  This also fixes linkage of the unwind data on WIN64 for -run
  (reported by Janus Lynggaard Thorborg)

tccasm.c, tests/tcctest.c:
- fix dot (sym_index of -1 crashed in put_elf_reloc)
- massage .set a bit (see test)

other:
- #define SECTION_ABS removed
- ST_DATA Section *strtab_section: removed
- put_extern_sym2(): take int section number

Conflicts:
	tccelf.c
	tccpe.c

Conflicts:
	tccelf.c
</pre>
</div>
</content>
</entry>
<entry>
<title>tcc -dt -run ... : simpler is better</title>
<updated>2017-07-20T20:21:27+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-07-20T20:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=0cc24d0e8487eaf53bb2849fef7e438a8e8fc94d'/>
<id>0cc24d0e8487eaf53bb2849fef7e438a8e8fc94d</id>
<content type='text'>
* -dt now with lowercase t

* test snippets now separated by real preprocessor statements
  which is valid C also for other compilers

    #if defined test_xxx
       &lt; test snippet x &gt;
    #elif defined test_yyy
       &lt; test snippet y &gt;
    #elif ...
    #endif

* simpler implementation, behaves like -run if no 'test_...' macros
  are seen, works with -E too

* for demonstration I combined some of the small tests for errors
  and warnings (56..63,74) in "60_errors_and_warnings.c"

Also:
* libtcc.c:
  put tcc_preprocess() and tcc_assemble() under the setjmp clause
  to let them return to caller after errors.  This is for -dt -E.
* tccgen.c:
  - get rid of save/restore_parse_state(), macro_ptr is saved
    by begin_macro anyway, now line_num too.
  - use expr_eq for parsing _Generic's controlling_type
  - set nocode_wanted with const_wanted. too, This is to keep
    VT_JMP on vtop when parsing preprocessor expressions.
* tccpp.c: tcc -E: suppress trailing whitespace from lines with
  comments (that -E removes) such as
       NO_GOTPLT_ENTRY,\t    /* never generate ... */
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* -dt now with lowercase t

* test snippets now separated by real preprocessor statements
  which is valid C also for other compilers

    #if defined test_xxx
       &lt; test snippet x &gt;
    #elif defined test_yyy
       &lt; test snippet y &gt;
    #elif ...
    #endif

* simpler implementation, behaves like -run if no 'test_...' macros
  are seen, works with -E too

* for demonstration I combined some of the small tests for errors
  and warnings (56..63,74) in "60_errors_and_warnings.c"

Also:
* libtcc.c:
  put tcc_preprocess() and tcc_assemble() under the setjmp clause
  to let them return to caller after errors.  This is for -dt -E.
* tccgen.c:
  - get rid of save/restore_parse_state(), macro_ptr is saved
    by begin_macro anyway, now line_num too.
  - use expr_eq for parsing _Generic's controlling_type
  - set nocode_wanted with const_wanted. too, This is to keep
    VT_JMP on vtop when parsing preprocessor expressions.
* tccpp.c: tcc -E: suppress trailing whitespace from lines with
  comments (that -E removes) such as
       NO_GOTPLT_ENTRY,\t    /* never generate ... */
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cross compilers</title>
<updated>2017-07-16T19:03:25+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-07-16T19:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3f13e33872aeac7d1363ac9bd01baad9f8a80764'/>
<id>3f13e33872aeac7d1363ac9bd01baad9f8a80764</id>
<content type='text'>
Only native compilers support -run and hence the new -dT.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only native compilers support -run and hence the new -dT.
</pre>
</div>
</content>
</entry>
<entry>
<title>tccgen: nodata_wanted</title>
<updated>2017-07-16T10:10:00+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-07-16T10:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef'/>
<id>7f1ab9b1e111b9ea9261eec4b7c6fb0f42591eef</id>
<content type='text'>
The existing variable 'nocode_wanted' is now used to control
output of static data too. So...

(nocode_wanted == 0)
    code and data (normal within functions)
(nocode_wanted &lt; 0)
    means: no code, but data (global or static data)
(nocode_wanted &gt; 0)
    means: no code and no data (code and data suppressed)
(nocode_wanted &amp; 0xC0000000)
    means:  we're in declaration of static data

Also: new option '-dT' to be used with -run
    tcc -dT -run file.c
This will look in file.c for certain comment-boundaries:
    /*-* test-xxx: ...some description */
and then for each test below run it from memory.  This way
various features and error messages can be tested with one
single file.  See 96_nodata_wanted.c for an example.

Also: tccgen.c: one more bitfield fix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing variable 'nocode_wanted' is now used to control
output of static data too. So...

(nocode_wanted == 0)
    code and data (normal within functions)
(nocode_wanted &lt; 0)
    means: no code, but data (global or static data)
(nocode_wanted &gt; 0)
    means: no code and no data (code and data suppressed)
(nocode_wanted &amp; 0xC0000000)
    means:  we're in declaration of static data

Also: new option '-dT' to be used with -run
    tcc -dT -run file.c
This will look in file.c for certain comment-boundaries:
    /*-* test-xxx: ...some description */
and then for each test below run it from memory.  This way
various features and error messages can be tested with one
single file.  See 96_nodata_wanted.c for an example.

Also: tccgen.c: one more bitfield fix
</pre>
</div>
</content>
</entry>
<entry>
<title>unsorted adjustments</title>
<updated>2017-07-09T10:07:40+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-07-09T10:07:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=9f79b62ec4d84d07cf4a2fba969cb67c8f6ed8e5'/>
<id>9f79b62ec4d84d07cf4a2fba969cb67c8f6ed8e5</id>
<content type='text'>
- configure
  * use aarch64 instead of arm64

- Makefile
  * rename the custom include file to "config-extra.mak"
  * Also avoid "rm -r /*" if $(tccdir) is empty

- pp/Makefile
  * fix .expect generation with gcc

- tcc.h
  * cleanup #defines for _MSC_VER

- tccgen.c:
  * fix const-propagation for &amp;,|
  * fix anonymous named struct (ms-extension) and enable
    -fms-extension by default

- i386-gen.c
  * clear VT_DEFSIGN

- x86_64-gen.c/win64:
  * fix passing structs in registers
  * fix alloca (need to keep "func_scratch" below each alloca area on stack)
    (This allows to compile a working gnu-make on win64)

- tccpp.c
  * alternative approach to 37999a4fbf3487b363fd0c2f9b7ab622401b202a
    This is to avoid some slowdown with ## token pasting.
  * get_tok_str() : return &lt;eof&gt; for TOK_EOF
  * -funsigned-char: apply to "string" literals as well

- tccpe/tools.c: -impdef: support both 32 and 64 bit dlls anyway
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- configure
  * use aarch64 instead of arm64

- Makefile
  * rename the custom include file to "config-extra.mak"
  * Also avoid "rm -r /*" if $(tccdir) is empty

- pp/Makefile
  * fix .expect generation with gcc

- tcc.h
  * cleanup #defines for _MSC_VER

- tccgen.c:
  * fix const-propagation for &amp;,|
  * fix anonymous named struct (ms-extension) and enable
    -fms-extension by default

- i386-gen.c
  * clear VT_DEFSIGN

- x86_64-gen.c/win64:
  * fix passing structs in registers
  * fix alloca (need to keep "func_scratch" below each alloca area on stack)
    (This allows to compile a working gnu-make on win64)

- tccpp.c
  * alternative approach to 37999a4fbf3487b363fd0c2f9b7ab622401b202a
    This is to avoid some slowdown with ## token pasting.
  * get_tok_str() : return &lt;eof&gt; for TOK_EOF
  * -funsigned-char: apply to "string" literals as well

- tccpe/tools.c: -impdef: support both 32 and 64 bit dlls anyway
</pre>
</div>
</content>
</entry>
<entry>
<title>configure: --config-musl/-uClibc switch &amp; misc cleanups</title>
<updated>2017-05-13T06:59:06+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-05-13T06:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=28435ec58c2ef9bb571cad5f8a1129aea3ecc204'/>
<id>28435ec58c2ef9bb571cad5f8a1129aea3ecc204</id>
<content type='text'>
- configure:
  - add --config-uClibc,-musl switch and suggest to use
    it if uClibc/musl is detected
  - make warning options magic clang compatible
  - simplify (use $confvars instead of individual options)
- Revert "Remove some unused-parameter lint"
  7443db0d5f841b81a55e918bf8c228dd20f9ddb2
  rather use -Wno-unused-parameter (or just not -Wextra)
- #ifdef functions that are unused on some targets
- tccgen.c: use PTR_SIZE==8 instead of (X86_64 || ARM64)
- tccpe.c: fix some warnings
- integrate dummy arm-asm better
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- configure:
  - add --config-uClibc,-musl switch and suggest to use
    it if uClibc/musl is detected
  - make warning options magic clang compatible
  - simplify (use $confvars instead of individual options)
- Revert "Remove some unused-parameter lint"
  7443db0d5f841b81a55e918bf8c228dd20f9ddb2
  rather use -Wno-unused-parameter (or just not -Wextra)
- #ifdef functions that are unused on some targets
- tccgen.c: use PTR_SIZE==8 instead of (X86_64 || ARM64)
- tccpe.c: fix some warnings
- integrate dummy arm-asm better
</pre>
</div>
</content>
</entry>
<entry>
<title>Touch up previous "s"[i&lt;2] patch</title>
<updated>2017-05-09T14:08:43+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-05-09T14:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3f5fd305afbe63c6bc4af5e06b315f4fce60b694'/>
<id>3f5fd305afbe63c6bc4af5e06b315f4fce60b694</id>
<content type='text'>
The real equivalence is between the original "s" + (i&lt;2)
and &amp;"s"[i&lt;2].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The real equivalence is between the original "s" + (i&lt;2)
and &amp;"s"[i&lt;2].
</pre>
</div>
</content>
</entry>
<entry>
<title>Give clang one less thing to complain about</title>
<updated>2017-05-09T04:56:38+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-05-09T04:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3c0a73822dd173b47ac5c04935b64af552093a44'/>
<id>3c0a73822dd173b47ac5c04935b64af552093a44</id>
<content type='text'>
"s"[i&lt;2] and "s" + (i&lt;2) are literally identical, but the latter triggers
a warning from clang because it looks so much like a noob is trying to
concatenate an integer and a string.  The former is arguably more clear.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"s"[i&lt;2] and "s" + (i&lt;2) are literally identical, but the latter triggers
a warning from clang because it looks so much like a noob is trying to
concatenate an integer and a string.  The former is arguably more clear.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some unused-parameter lint</title>
<updated>2017-05-08T15:30:43+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-05-08T15:30:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=7443db0d5f841b81a55e918bf8c228dd20f9ddb2'/>
<id>7443db0d5f841b81a55e918bf8c228dd20f9ddb2</id>
<content type='text'>
Mark TCCState parameter as unused in tcc_undefine_symbol(), tcc_add_symbol(),
tcc_print_stats(), asm_get_local_label_name(), use_section1(), tccpp_delete(),
tcc_tool_ar(), tcc_tool_impdef(), and tcc_tool_cross().
Also mark it unused in tcc_add_bcheck() unless CONFIG_TCC_BCHECK.
Remove it entirely in ld_next().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark TCCState parameter as unused in tcc_undefine_symbol(), tcc_add_symbol(),
tcc_print_stats(), asm_get_local_label_name(), use_section1(), tccpp_delete(),
tcc_tool_ar(), tcc_tool_impdef(), and tcc_tool_cross().
Also mark it unused in tcc_add_bcheck() unless CONFIG_TCC_BCHECK.
Remove it entirely in ld_next().
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing const and add warning flags</title>
<updated>2017-05-08T04:28:05+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-05-08T04:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=1b9935cf36e83b389cb26008df93a654af3f2074'/>
<id>1b9935cf36e83b389cb26008df93a654af3f2074</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
