The wrapping behavior of part_set is not desirable. Adjust the

documentation to describe the desired behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-05-14 16:50:20 +00:00
parent d6a85b54de
commit c6749c42c3

View File

@ -4700,15 +4700,15 @@ up to that size.</p>
are replaced with corresponding bits from <tt>%repl</tt>. That is the 0th bit are replaced with corresponding bits from <tt>%repl</tt>. That is the 0th bit
in <tt>%repl</tt> replaces the <tt>%lo</tt>th bit in <tt>%val</tt> and etc. up in <tt>%repl</tt> replaces the <tt>%lo</tt>th bit in <tt>%val</tt> and etc. up
to the <tt>%hi</tt>th bit. to the <tt>%hi</tt>th bit.
<p>In reverse mode, a similar computation is made except that the bits replaced <p>In reverse mode, a similar computation is made except that the bits are
wrap around to include both the highest and lowest bits. For example, if a reversed. That is, the <tt>0</tt>th bit in <tt>%repl</tt> replaces the
16 bit value is being replaced then <tt>%lo=8</tt> and <tt>%hi=4</tt> would <tt>%hi</tt> bit in <tt>%val</tt> and etc. down to the <tt>%lo</tt>th bit.
cause these bits to be set: <tt>0xFF1F</tt>.</p>
<h5>Examples:</h5> <h5>Examples:</h5>
<pre> <pre>
llvm.part.set(0xFFFF, 0, 4, 7) -&gt; 0xFF0F llvm.part.set(0xFFFF, 0, 4, 7) -&gt; 0xFF0F
llvm.part.set(0xFFFF, 0, 7, 4) -&gt; 0x0060 llvm.part.set(0xFFFF, 0, 7, 4) -&gt; 0xFF0F
llvm.part.set(0xFFFF, 0, 8, 3) -&gt; 0x00F0 llvm.part.set(0xFFFF, 1, 7, 4) -&gt; 0xFF8F
llvm.part.set(0xFFFF, F, 8, 3) -&gt; 0xFFE7
llvm.part.set(0xFFFF, 0, 3, 8) -&gt; 0xFE07 llvm.part.set(0xFFFF, 0, 3, 8) -&gt; 0xFE07
</pre> </pre>
</div> </div>