<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/i386-asm.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-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: Get rid of OPC_JMP and OPC_SHORTJMP</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-16T03:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=e2f489aaffdc5806a993a04c121a5b75ac08daaf'/>
<id>e2f489aaffdc5806a993a04c121a5b75ac08daaf</id>
<content type='text'>
Those two insn types are nicer to handle as operand types, because
the pressure for bits on instr_type is higher than for operands.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those two insn types are nicer to handle as operand types, because
the pressure for bits on instr_type is higher than for operands.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Correct mem64-&gt;xmm movq</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-15T17:07:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=58963828abff22dad0a8b4acf2e7b70877177d52'/>
<id>58963828abff22dad0a8b4acf2e7b70877177d52</id>
<content type='text'>
Now we can express prefixes with 0x0fxx opcodes we can correct the
movq mem64-&gt;xmm opcode, and restrict the movq xmm-&gt;mem64 movq to
not invalidly accept mmx.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now we can express prefixes with 0x0fxx opcodes we can correct the
movq mem64-&gt;xmm opcode, and restrict the movq xmm-&gt;mem64 movq to
not invalidly accept mmx.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Remove OPC_D16</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-15T16:50:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=5a222588a81f1ad1d1a1fdf64a54109f809b9923'/>
<id>5a222588a81f1ad1d1a1fdf64a54109f809b9923</id>
<content type='text'>
Now that we can store prefixes even for 0x0fXX opcodes we can remove
the OPC_D16 bit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we can store prefixes even for 0x0fXX opcodes we can remove
the OPC_D16 bit.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Reorganize instr_type</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-15T16:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=bde802df2993cb97c7522e2f50b488e682b231b7'/>
<id>bde802df2993cb97c7522e2f50b488e682b231b7</id>
<content type='text'>
Disjoint instruction types don't need to be a bit field, so
introduce an enumeration (3 bits).  Also the 0x0f prefix can
be expressed by a bit, doesn't need a byte in the opcode field.
That enables to encode further prefixes still in 16 bit.
To not have to touch all insns do some macro fiddling filtering
out a 0x0f byte in the second position.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disjoint instruction types don't need to be a bit field, so
introduce an enumeration (3 bits).  Also the 0x0f prefix can
be expressed by a bit, doesn't need a byte in the opcode field.
That enables to encode further prefixes still in 16 bit.
To not have to touch all insns do some macro fiddling filtering
out a 0x0f byte in the second position.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Add more SSE2 instructions</title>
<updated>2016-12-15T16:47:05+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-15T04:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=ed35ac841b9e9c3c8cec8459ec84833f483af959'/>
<id>ed35ac841b9e9c3c8cec8459ec84833f483af959</id>
<content type='text'>
In particular those that are extensions of existing mmx (or sse1)
instructions by a simple 0x66 prefix.  There's one caveat for
x86-64: as we don't yet correctly handle the 0xf3 prefix
the movq mem64-&gt;xmm is wrong (tested in asmtest.S).  Needs
some refactoring of the instr_type member.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In particular those that are extensions of existing mmx (or sse1)
instructions by a simple 0x66 prefix.  There's one caveat for
x86-64: as we don't yet correctly handle the 0xf3 prefix
the movq mem64-&gt;xmm is wrong (tested in asmtest.S).  Needs
some refactoring of the instr_type member.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Reject some invalid arith imm8 instruction</title>
<updated>2016-05-16T03:10:21+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-16T03:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=f2a4cb0a0edc95ae74816275e82b4ade71c6f37a'/>
<id>f2a4cb0a0edc95ae74816275e82b4ade71c6f37a</id>
<content type='text'>
There were two errors in the arithmetic imm8 instruction.  They accept
only REGW, and in case the user write a xxxb opcode that variant
needs to be rejected as well (it's not automatically rejected by REGW
in case the destination is memory).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were two errors in the arithmetic imm8 instruction.  They accept
only REGW, and in case the user write a xxxb opcode that variant
needs to be rejected as well (it's not automatically rejected by REGW
in case the destination is memory).
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Fix signed constants and opcode order</title>
<updated>2016-05-14T02:33:41+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-14T02:33:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=4f27e217a864d8ddb74265d24a5aadea0a3ec92d'/>
<id>4f27e217a864d8ddb74265d24a5aadea0a3ec92d</id>
<content type='text'>
Two things: negative constants were rejected (e.g. "add $-15,%eax").
Second the insn order was such that the arithmetic IM8S forms
weren't used (always the IM32 ones).  Switching them prefers those
but requires a fix for size calculation in case the opcodes were
OPC_ARITH and OPC_WLX (whose size starts with 1, not zero).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two things: negative constants were rejected (e.g. "add $-15,%eax").
Second the insn order was such that the arithmetic IM8S forms
weren't used (always the IM32 ones).  Switching them prefers those
but requires a fix for size calculation in case the opcodes were
OPC_ARITH and OPC_WLX (whose size starts with 1, not zero).
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Consolidate insn descriptions</title>
<updated>2016-05-14T02:05:34+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-11T23:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=080ec9faddc4b7661ab05159b07655ae0224ec58'/>
<id>080ec9faddc4b7661ab05159b07655ae0224ec58</id>
<content type='text'>
Use OPC_BWLX and OPC_WLX in i386-asm.h and x86_64-asm.h to
reduce number of differences between both.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use OPC_BWLX and OPC_WLX in i386-asm.h and x86_64-asm.h to
reduce number of differences between both.
</pre>
</div>
</content>
</entry>
<entry>
<title>x86-asm: Remove old ASM_16 code</title>
<updated>2016-05-11T17:13:38+00:00</updated>
<author>
<name>Michael Matz</name>
<email>matz@suse.de</email>
</author>
<published>2016-05-11T17:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=55bd08c5aedf67707eeed4c0e6be2b2c7abefb28'/>
<id>55bd08c5aedf67707eeed4c0e6be2b2c7abefb28</id>
<content type='text'>
This code was inactive since a long time (and was deactivated because
it was wrong to start with) and just clutters the sources.  Remove
it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code was inactive since a long time (and was deactivated because
it was wrong to start with) and just clutters the sources.  Remove
it.
</pre>
</div>
</content>
</entry>
</feed>
