<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/x86_64-gen.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>Fix absolute memory references</title>
<updated>2017-11-15T12:39:28+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-11-15T12:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=348dd9f4a68a5a6217142c64070765733af3a8c8'/>
<id>348dd9f4a68a5a6217142c64070765733af3a8c8</id>
<content type='text'>
This properly fixes what 870271ea tried to fix.  Absolute memory
references can't use %rip relative addressing, and additionally,
if the address doesn't fit 32bit (signed) it must be loaded via
movabs.  No good testcase added, it would require catching signals
and still be unreliable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This properly fixes what 870271ea tried to fix.  Absolute memory
references can't use %rip relative addressing, and additionally,
if the address doesn't fit 32bit (signed) it must be loaded via
movabs.  No good testcase added, it would require catching signals
and still be unreliable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "gen_addrpc32: absolute ptr needs *ABS* relocation"</title>
<updated>2017-11-14T15:43:22+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-11-14T15:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=74463eb954bf7c579915ea2becdc1483359dacfc'/>
<id>74463eb954bf7c579915ea2becdc1483359dacfc</id>
<content type='text'>
This reverts commit 870271ea071971002fa556e09e1873db316fa1a9.

The commit is broken, you can't unconditionally emit a PC-relative
relocation without a symbol.  And if there's a symbol the addend
need to be in the relocation, not the section.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 870271ea071971002fa556e09e1873db316fa1a9.

The commit is broken, you can't unconditionally emit a PC-relative
relocation without a symbol.  And if there's a symbol the addend
need to be in the relocation, not the section.
</pre>
</div>
</content>
</entry>
<entry>
<title>Spelling fixes</title>
<updated>2017-09-25T01:03:26+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-09-25T01:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=1b6806e5bb39623c75b4aa8d8d6ffe1ef7ea46e7'/>
<id>1b6806e5bb39623c75b4aa8d8d6ffe1ef7ea46e7</id>
<content type='text'>
Comments only, no change to functionality
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Comments only, no change to functionality
</pre>
</div>
</content>
</entry>
<entry>
<title>gen_addrpc32: absolute ptr needs *ABS* relocation</title>
<updated>2017-09-11T13:36:16+00:00</updated>
<author>
<name>Zdenek Pavlas</name>
<email>zden3k@gmail.com</email>
</author>
<published>2017-09-11T12:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=870271ea071971002fa556e09e1873db316fa1a9'/>
<id>870271ea071971002fa556e09e1873db316fa1a9</id>
<content type='text'>
Dereferencing of absolute pointers is broken on x86_64, eg:

*(int*)NULL does not segfault but returns -4 instead
*(char*)(-10L &lt;&lt; 20) does not return 0x55 (vsyscall page, push rbp)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dereferencing of absolute pointers is broken on x86_64, eg:

*(int*)NULL does not segfault but returns -4 instead
*(char*)(-10L &lt;&lt; 20) does not return 0x55 (vsyscall page, push rbp)
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor enums</title>
<updated>2017-07-09T10:38:25+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-07-09T10:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=f87afa72e06842da1f1bb902e4a192195646134b'/>
<id>f87afa72e06842da1f1bb902e4a192195646134b</id>
<content type='text'>
Eliminate VT_ENUM as a basic type.  Instead use the integral
types VT_InT/VT_LLONG with an additional flag to indicate
that it is an enum.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate VT_ENUM as a basic type.  Instead use the integral
types VT_InT/VT_LLONG with an additional flag to indicate
that it is an enum.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor sym &amp; attributes</title>
<updated>2017-07-09T10:34:11+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2017-07-09T10:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=9ba76ac834608f76b734674048a7cc4334051e32'/>
<id>9ba76ac834608f76b734674048a7cc4334051e32</id>
<content type='text'>
tcc.h:
* cleanup struct 'Sym'
* include some 'Attributes' into 'Sym'
* in turn get rid of VT_IM/EXPORT, VT_WEAK
* re-number VT_XXX flags
* replace some 'long' function args by 'int'

tccgen.c:
* refactor parse_btype()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tcc.h:
* cleanup struct 'Sym'
* include some 'Attributes' into 'Sym'
* in turn get rid of VT_IM/EXPORT, VT_WEAK
* re-number VT_XXX flags
* replace some 'long' function args by 'int'

tccgen.c:
* refactor parse_btype()
</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>x86-64: Fix psABI stdarg prologue</title>
<updated>2017-05-27T20:42:18+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-05-27T20:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=7cd1ae7710aefad30e2f9893fbf6d3db29f8ae01'/>
<id>7cd1ae7710aefad30e2f9893fbf6d3db29f8ae01</id>
<content type='text'>
If there were more than 6 integer arguments before the ellipsis, or
there were used more than 8 slots used until the ellipsis (e.g. by
a large intermediate struct) we generated wrong code.  See testcase.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there were more than 6 integer arguments before the ellipsis, or
there were used more than 8 slots used until the ellipsis (e.g. by
a large intermediate struct) we generated wrong code.  See testcase.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-64: Rewrite linux parameter passing</title>
<updated>2017-05-27T19:23:13+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-05-27T19:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=53c5fc2246270e0242903de0152a9a5d40f3d679'/>
<id>53c5fc2246270e0242903de0152a9a5d40f3d679</id>
<content type='text'>
This fixes two ABI testcases involving large arguments when there
are still registers available for later args.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes two ABI testcases involving large arguments when there
are still registers available for later args.
</pre>
</div>
</content>
</entry>
</feed>
