Modified the prototypes of the llvm.readport and llvm.writeport intrinsics

so that they do not specify specific integer sizes (as those are
constrained by the code generator, not the intrinsic itself).

Also put these intrinsics into their own "Operating System" section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John Criswell 2004-04-09 16:43:20 +00:00
parent cfd3baccce
commit 7123e27894

View File

@ -101,10 +101,13 @@
<ol> <ol>
<li><a href="#i_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a></li> <li><a href="#i_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a></li>
<li><a href="#i_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a></li> <li><a href="#i_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_os">Operating System Intrinsics</a>
<ol>
<li><a href="#i_readport">'<tt>llvm.readport</tt>' Intrinsic</a></li> <li><a href="#i_readport">'<tt>llvm.readport</tt>' Intrinsic</a></li>
<li><a href="#i_writeport">'<tt>llvm.writeport</tt>' Intrinsic</a></li> <li><a href="#i_writeport">'<tt>llvm.writeport</tt>' Intrinsic</a></li>
</ol> </ol>
</li>
<li><a href="#int_libc">Standard C Library Intrinsics</a> <li><a href="#int_libc">Standard C Library Intrinsics</a>
<ol> <ol>
<li><a href="#i_memcpy">'<tt>llvm.memcpy</tt>' Intrinsic</a></li> <li><a href="#i_memcpy">'<tt>llvm.memcpy</tt>' Intrinsic</a></li>
@ -1998,6 +2001,18 @@ source-language caller.
</p> </p>
</div> </div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_os">Operating System Intrinsics</a>
</div>
<div class="doc_text">
<p>
These intrinsics are provided by LLVM to support the implementation of
operating system level code.
</p>
</div>
<!-- _______________________________________________________________________ --> <!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <div class="doc_subsubsection">
<a name="i_readport">'<tt>llvm.readport</tt>' Intrinsic</a> <a name="i_readport">'<tt>llvm.readport</tt>' Intrinsic</a>
@ -2007,36 +2022,32 @@ source-language caller.
<h5>Syntax:</h5> <h5>Syntax:</h5>
<pre> <pre>
call sbyte (ushort address)* %llvm.readport(ushort &lt;address&gt;) call &lt;integer type&gt; (&lt;integer type&gt;)* %llvm.readport (&lt;integer type&gt; &lt;address&gt;)
call ubyte (ushort address)* %llvm.readport(ushort &lt;address&gt;)
call short (ushort address)* %llvm.readport(ushort &lt;address&gt;)
call ushort (ushort address)* %llvm.readport(ushort &lt;address&gt;)
call int (ushort address)* %llvm.readport(ushort &lt;address&gt;)
call uint (ushort address)* %llvm.readport(ushort &lt;address&gt;)
</pre> </pre>
<h5>Overview:</h5> <h5>Overview:</h5>
<p> <p>
The '<tt>llvm.readport</tt>' intrinsic reads data from the specified I/O port. The '<tt>llvm.readport</tt>' intrinsic reads data from the specified hardware
I/O port.
</p> </p>
<h5>Arguments:</h5> <h5>Arguments:</h5>
<p> <p>
The argument to this intrinsic indicates the I/O address from which to read The argument to this intrinsic indicates the hardware I/O address from which
the data. The address is in the I/O address namespace; it is not a memory to read the data. The address is in the hardware I/O address namespace (as
location. opposed to being a memory location for memory mapped I/O).
</p> </p>
<h5>Semantics:</h5> <h5>Semantics:</h5>
<p> <p>
The '<tt>llvm.readport</tt>' intrinsic reads data from the I/O port specified The '<tt>llvm.readport</tt>' intrinsic reads data from the hardware I/O port
by <i>address</i> and returns the value. The address and return value must specified by <i>address</i> and returns the value. The address and return
be integers, but the size is dependent upon the platform upon which the value must be integers, but the size is dependent upon the platform upon which
program is code generated. For example, on x86, the address must be a the program is code generated. For example, on x86, the address must be an
ushort, and the return value must be 8, 16, or 32 bits. unsigned 16 bit value, and the return value must be 8, 16, or 32 bits.
</p> </p>
</div> </div>
@ -2050,26 +2061,22 @@ ushort, and the return value must be 8, 16, or 32 bits.
<h5>Syntax:</h5> <h5>Syntax:</h5>
<pre> <pre>
call void (ushort address, sbyte value)* %llvm.writeport(ushort &lt;address&gt;, sbyte &lt;value&gt;) call void (&lt;integer type&gt;, &lt;integer type&gt;)* %llvm.writeport (&lt;integer type&gt; &lt;value&gt;, &lt;integer type&gt; &lt;address&gt;)
call void (ushort address, ubyte value)* %llvm.writeport(ushort &lt;address&gt;, ubyte &lt;value&gt;)
call void (ushort address, short value)* %llvm.writeport(ushort &lt;address&gt;, short &lt;value&gt;)
call void (ushort address, ushort value)* %llvm.writeport(ushort &lt;address&gt;, ushort &lt;value&gt;)
call void (ushort address, int value)* %llvm.writeport(ushort &lt;address&gt;, int &lt;value&gt;)
call void (ushort address, uint value)* %llvm.writeport(ushort &lt;address&gt;, uint &lt;value&gt;)
</pre> </pre>
<h5>Overview:</h5> <h5>Overview:</h5>
<p> <p>
The '<tt>llvm.writeport</tt>' intrinsic writes data to the specified I/O port. The '<tt>llvm.writeport</tt>' intrinsic writes data to the specified hardware
I/O port.
</p> </p>
<h5>Arguments:</h5> <h5>Arguments:</h5>
<p> <p>
The first argument to this intrinsic indicates the I/O address to which data The first argument to this intrinsic indicates the hardware I/O address to
should be written. The address is in the I/O address namespace; it is not a which data should be written. The address is in the hardware I/O address
memory location. namespace (as opposed to being a memory location for memory mapped I/O).
</p> </p>
<p> <p>
@ -2082,8 +2089,8 @@ The second argument is the value to write to the I/O port.
The '<tt>llvm.writeport</tt>' intrinsic writes <i>value</i> to the I/O port The '<tt>llvm.writeport</tt>' intrinsic writes <i>value</i> to the I/O port
specified by <i>address</i>. The address and value must be integers, but the specified by <i>address</i>. The address and value must be integers, but the
size is dependent upon the platform upon which the program is code generated. size is dependent upon the platform upon which the program is code generated.
For example, on x86, the address must be a ushort, and the value written must For example, on x86, the address must be an unsigned 16 bit value, and the
be 8, 16, or 32 bits in length. value written must be 8, 16, or 32 bits in length.
</p> </p>
</div> </div>