<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/i386-asm.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>tccasm: Accept suffixed cmovCC</title>
<updated>2017-12-03T03:53:50+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-12-03T03:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=529b44c0d53955309e79de3da677973922f48425'/>
<id>529b44c0d53955309e79de3da677973922f48425</id>
<content type='text'>
The length suffix for cmovCC isn't necessary as the required register
operands always allow length deduction.  But let's be nice to users
and accept them anyway.  Do that without blowing up tables, which means
we don't detect invalid suffixes for the given operands, but so be it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The length suffix for cmovCC isn't necessary as the required register
operands always allow length deduction.  But let's be nice to users
and accept them anyway.  Do that without blowing up tables, which means
we don't detect invalid suffixes for the given operands, but so be it.
</pre>
</div>
</content>
</entry>
<entry>
<title>tccasm: Unify C and asm symbol table</title>
<updated>2017-11-27T03:59:29+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-11-27T03:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=9e0d23cc47359149a39eafffdbb133963980b6ed'/>
<id>9e0d23cc47359149a39eafffdbb133963980b6ed</id>
<content type='text'>
This makes the asm symbols use the same members as the C symbols
for global decls, e.g. using the ELF symbol to hold offset and
section.  That allows us to use only one symbol table for C and
asm symbols and to get rid of hacks to synch between them.

We still need some special handling for symbols that come purely
from asm sources.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the asm symbols use the same members as the C symbols
for global decls, e.g. using the ELF symbol to hold offset and
section.  That allows us to use only one symbol table for C and
asm symbols and to get rid of hacks to synch between them.

We still need some special handling for symbols that come purely
from asm sources.
</pre>
</div>
</content>
</entry>
<entry>
<title>Spelling fixes in C comments only</title>
<updated>2017-05-08T04:38:09+00:00</updated>
<author>
<name>Larry Doolittle</name>
<email>ldoolitt@recycle.lbl.gov</email>
</author>
<published>2017-05-08T04:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=19d8b8a17383863d45823e37f20a94cc1d55c3a6'/>
<id>19d8b8a17383863d45823e37f20a94cc1d55c3a6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a warning</title>
<updated>2017-05-08T03:29:54+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-05-08T03:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=524f6dff17af73ec14529e5b0d444dfdda43d7c4'/>
<id>524f6dff17af73ec14529e5b0d444dfdda43d7c4</id>
<content type='text'>
"missing intitializer for field op_type" with gcc -Wextra.  It's
zero-initialized anyway, and not that much a hassle to explicitely
initialize either, so let's be nice and make it not warn.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"missing intitializer for field op_type" with gcc -Wextra.  It's
zero-initialized anyway, and not that much a hassle to explicitely
initialize either, so let's be nice and make it not warn.
</pre>
</div>
</content>
</entry>
<entry>
<title>tcc: fixup clang warnings</title>
<updated>2017-04-25T10:55:18+00:00</updated>
<author>
<name>Andrei Warkentin</name>
<email>andrey.warkentin@gmail.com</email>
</author>
<published>2017-03-28T06:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=63b2f907bd9f8ad82b2cfaf8a34497578877253b'/>
<id>63b2f907bd9f8ad82b2cfaf8a34497578877253b</id>
<content type='text'>
The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting
the macro and trying it out in a separate program doesn't give
me any warnings, so I'm confused about what could be going on there.
Any cast will make things happy. I used a uint64_t to catch actual
cases of overflow, which will still cause a -Wconstant-conversion
warning.

Signed-off-by: Andrei Warkentin &lt;andrey.warkentin@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting
the macro and trying it out in a separate program doesn't give
me any warnings, so I'm confused about what could be going on there.
Any cast will make things happy. I used a uint64_t to catch actual
cases of overflow, which will still cause a -Wconstant-conversion
warning.

Signed-off-by: Andrei Warkentin &lt;andrey.warkentin@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-64-asm: Fix mov im64,rax encoding</title>
<updated>2017-02-22T23:16:25+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2017-02-22T23:16:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3e4c296ebab341bbe95974e39b589ea821f02789'/>
<id>3e4c296ebab341bbe95974e39b589ea821f02789</id>
<content type='text'>
the avoidance of mov im32-&gt;reg64 wasn't working when reg64 was rax.
While fixing this also fix instructions which had the REX prefix
hardcoded in opcode and so didn't support extended registers which
would have added another REX prefix.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the avoidance of mov im32-&gt;reg64 wasn't working when reg64 was rax.
While fixing this also fix instructions which had the REX prefix
hardcoded in opcode and so didn't support extended registers which
would have added another REX prefix.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Fix segfault</title>
<updated>2016-12-15T16:49:56+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-12-12T19:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=5d6a9e797a3c2d12ed54edb14851f4b023de4799'/>
<id>5d6a9e797a3c2d12ed54edb14851f4b023de4799</id>
<content type='text'>
We need to access cur_text_section, not text_section.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to access cur_text_section, not text_section.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-64-asm: Accept high register in clobbers</title>
<updated>2016-12-15T16:49:55+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-10-08T20:50:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=a2a596e76724a7915361b4d0f1b5553929d26a31'/>
<id>a2a596e76724a7915361b4d0f1b5553929d26a31</id>
<content type='text'>
The callee saved registers (among them r12-r15) really need
saving/restoring if mentioned in asm clobbers, even if TCC
itself doesn't use them.  E.g. the linux kernel relies on that
in its switch_to() implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The callee saved registers (among them r12-r15) really need
saving/restoring if mentioned in asm clobbers, even if TCC
itself doesn't use them.  E.g. the linux kernel relies on that
in its switch_to() implementation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support local register variables</title>
<updated>2016-12-15T16:47:13+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-10-06T02:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=f081acbfba84ffdf1e479f932906bf10f88cd1c2'/>
<id>f081acbfba84ffdf1e479f932906bf10f88cd1c2</id>
<content type='text'>
Similar to GCC a local asm register variable enforces the use of a
specified register in asm operands (and doesn't otherwise
matter).  Works only if the variable is directly mentioned as
operand.  For that we now generally store a backpointer from
an SValue to a Sym when the SValue was the result of unary()
parsing a symbol identifier.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to GCC a local asm register variable enforces the use of a
specified register in asm operands (and doesn't otherwise
matter).  Works only if the variable is directly mentioned as
operand.  For that we now generally store a backpointer from
an SValue to a Sym when the SValue was the result of unary()
parsing a symbol identifier.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Correct register size for pointer ops</title>
<updated>2016-12-15T16:47:12+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-10-03T18:39:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=0b0e64c2c95487815a8d252ab833e5eccfb5aeb5'/>
<id>0b0e64c2c95487815a8d252ab833e5eccfb5aeb5</id>
<content type='text'>
A pointer is 64 bit as well, so it needs a full
register for register operands.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A pointer is 64 bit as well, so it needs a full
register for register operands.
</pre>
</div>
</content>
</entry>
</feed>
