<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/i386-tok.h, 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>x86-64-asm: Support high registers %r8 - %r15</title>
<updated>2016-12-15T16:47:09+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-08-04T02:47:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=4cb7047f0fa000c83ca5592d9a64a2cbc96d8fdc'/>
<id>4cb7047f0fa000c83ca5592d9a64a2cbc96d8fdc</id>
<content type='text'>
This requires correctly handling the REX prefix.
As bonus we now also support the four 8bit registers
spl,bpl,sil,dil, which are decoded as ah,ch,dh,bh in non-long-mode
(and require a REX prefix as well).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires correctly handling the REX prefix.
As bonus we now also support the four 8bit registers
spl,bpl,sil,dil, which are decoded as ah,ch,dh,bh in non-long-mode
(and require a REX prefix as well).
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Fix lar opcode operands</title>
<updated>2016-12-15T16:47:08+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-07-11T19:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=5692716770e9e2e733d0e7ab6ce0bd70cb830aba'/>
<id>5692716770e9e2e733d0e7ab6ce0bd70cb830aba</id>
<content type='text'>
lar can accept multiple sizes as well (wlx), like lsl.  When using
autosize it's important to look at the destination operand first;
when it's a register that one determines the size, not the input
operand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lar can accept multiple sizes as well (wlx), like lsl.  When using
autosize it's important to look at the destination operand first;
when it's a register that one determines the size, not the input
operand.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Fix register order</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-12-12T16:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=8a10a442ffd44c54fcb41589239980974f31410f'/>
<id>8a10a442ffd44c54fcb41589239980974f31410f</id>
<content type='text'>
Inserting random registers in the middle of the 8-blocks
breaks register assignment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inserting random registers in the middle of the 8-blocks
breaks register assignment.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86_64-asm: =m operand fixes</title>
<updated>2016-11-20T13:50:56+00:00</updated>
<author>
<name>grischka</name>
<email>grischka</email>
</author>
<published>2016-11-20T13:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=4a3741bf02eb51c377312bdabc979e5ccbf5bf89'/>
<id>4a3741bf02eb51c377312bdabc979e5ccbf5bf89</id>
<content type='text'>
The problem was with tcctest.c:

    unsigned set;
    __asm__("btsl %1,%0" : "=m"(set) : "Ir"(20) : "cc");

when with tcc compiled with the HAVE_SELINUX option, run with
tcc -run, it would use large addresses far beyond the 32bits
range when tcc did not use the pc-relative mode for accessing
'set' in global data memory.  In fact the assembler did not
know about %rip at all.

Changes:
- memory operands use (%rax) not (%eax)
- conversion from VT_LLOCAL: use type VT_PTR
- support 'k' modifier
- support %rip register
- support X(%rip) pc-relative addresses

The test in tcctest.c is from Michael Matz.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was with tcctest.c:

    unsigned set;
    __asm__("btsl %1,%0" : "=m"(set) : "Ir"(20) : "cc");

when with tcc compiled with the HAVE_SELINUX option, run with
tcc -run, it would use large addresses far beyond the 32bits
range when tcc did not use the pc-relative mode for accessing
'set' in global data memory.  In fact the assembler did not
know about %rip at all.

Changes:
- memory operands use (%rax) not (%eax)
- conversion from VT_LLOCAL: use type VT_PTR
- support 'k' modifier
- support %rip register
- support X(%rip) pc-relative addresses

The test in tcctest.c is from Michael Matz.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-64-asm: Add mov[sz]xq opcodes</title>
<updated>2016-05-11T22:57:02+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-11T22:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=6bd8c936e33db20f7023e11228bc2f2a4fb51f2e'/>
<id>6bd8c936e33db20f7023e11228bc2f2a4fb51f2e</id>
<content type='text'>
This adds the zero/sign-extending opcodes with 64bit destinations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the zero/sign-extending opcodes with 64bit destinations.
</pre>
</div>
</content>
</entry>
<entry>
<title>[x86] Fix some asm problems</title>
<updated>2016-05-09T21:17:47+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-09T19:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=5e47b08dc80281e27f0cd7c15d0d91a2e1c0a636'/>
<id>5e47b08dc80281e27f0cd7c15d0d91a2e1c0a636</id>
<content type='text'>
A bag of assembler fixes, to be either compatible with GAS
(e.g. order of 'test' operands), accept more instructions,
count correct foo{bwlq} variants on x86_64, fix modrm/sib bytes
on x86_64 to not use %rip relative addressing mode, to not use
invalid insns in tests/asmtest.S for x86_64.

Result is that now output of GAS and of tcc on tests/asmtest.S
is mostly the same.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A bag of assembler fixes, to be either compatible with GAS
(e.g. order of 'test' operands), accept more instructions,
count correct foo{bwlq} variants on x86_64, fix modrm/sib bytes
on x86_64 to not use %rip relative addressing mode, to not use
invalid insns in tests/asmtest.S for x86_64.

Result is that now output of GAS and of tcc on tests/asmtest.S
is mostly the same.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert all of my changes to directories &amp; codingstyle.</title>
<updated>2015-07-29T20:57:12+00:00</updated>
<author>
<name>gus knight</name>
<email>waddlesplash@gmail.com</email>
</author>
<published>2015-07-29T20:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=89ad24e7d63f7488c2796b30d41303f52663a8c4'/>
<id>89ad24e7d63f7488c2796b30d41303f52663a8c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reorganize the source tree.</title>
<updated>2015-07-27T20:03:25+00:00</updated>
<author>
<name>gus knight</name>
<email>waddlesplash@gmail.com</email>
</author>
<published>2015-07-27T20:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=47e06c6d4e542e47fcbad69a78c2436a854a0779'/>
<id>47e06c6d4e542e47fcbad69a78c2436a854a0779</id>
<content type='text'>
 * Documentation is now in "docs".
 * Source code is now in "src".
 * Misc. fixes here and there so that everything still works.

I think I got everything in this commit, but I only tested this
on Linux (Make) and Windows (CMake), so I might've messed
something up on other platforms...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * Documentation is now in "docs".
 * Source code is now in "src".
 * Misc. fixes here and there so that everything still works.

I think I got everything in this commit, but I only tested this
on Linux (Make) and Windows (CMake), so I might've messed
something up on other platforms...
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow tcc to understand a setob,... opcodes as alias to  seto,...</title>
<updated>2015-01-06T19:59:19+00:00</updated>
<author>
<name>seyko</name>
<email>seyko2@gmail.com</email>
</author>
<published>2015-01-06T19:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=e260b036866572847c89a059cc4ee54b59c11d73'/>
<id>e260b036866572847c89a059cc4ee54b59c11d73</id>
<content type='text'>
PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html
This is fix PR8686 for llvm: accepting a 'b' suffix at the end
of all the setcc instructions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html
This is fix PR8686 for llvm: accepting a 'b' suffix at the end
of all the setcc instructions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Corrected spelling mistakes in comments and strings</title>
<updated>2014-04-07T11:31:00+00:00</updated>
<author>
<name>Vincent Lefevre</name>
<email>vincent@vinc17.net</email>
</author>
<published>2014-04-07T11:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3e9a7e9d69e3adb0e9ed65d11caf415e74458fe9'/>
<id>3e9a7e9d69e3adb0e9ed65d11caf415e74458fe9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
