Opcodes documentation fixes.

This commit is contained in:
Stephen Williams 2015-09-30 16:25:35 -07:00
parent f01a312f17
commit 4338d43cea
2 changed files with 14 additions and 12 deletions

View File

@ -39,19 +39,11 @@ flags. These are used as destinations for operations that return
boolean values, for example comparisons. They are also used as inputs
for test and branch opcodes.
* %abs/wr <bit-o>, <bit-i>
* %abs/wr
This instruction calculates the absolute value of a real value. It uses
the fabs() function in the run-time to do the work.
* %add <bit-l>, <bit-r>, <wid> (XXXX Old version)
This instruction adds the right vector into the left vector, the
vectors having the width <wid>. If any of the bits of either vector
are x or z, the result is x. Otherwise, the result is the arithmetic
sum.
See also the %sub instruction.
the fabs() function in the run-time to do the work, and manipulates
the top of the real-value stack.
* %add
* %addi <vala>, <valb>, <wid>
@ -65,7 +57,7 @@ immediate value (See %pushi/vec4).
See also the %sub instruction.
* %add/wr <bit-l>, <bit-r>
* %add/wr
This is the real valued version of the %add instruction. The arguments
are popped from the stack, right operand then left, and the result
@ -492,6 +484,10 @@ the format of the output is:
<description> is a string, if string is 0 then the following default
message is used: "Procedural tracing.".
* %flag_inv <flag>
This instruct inverts a flag bit.
* %flag_mov <flag1>, <flag2>
This instruction copies the flag bit from <flag2> to <flag1>.

View File

@ -726,6 +726,9 @@ vvp_context_item_t vthread_get_rd_context_item(unsigned context_idx)
return vvp_get_context_item(running_thread->rd_context, context_idx);
}
/*
* %abs/wr
*/
bool of_ABS_WR(vthread_t thr, vvp_code_t)
{
thr->push_real( fabs(thr->pop_real()) );
@ -849,6 +852,9 @@ bool of_ADDI(vthread_t thr, vvp_code_t cp)
return true;
}
/*
* %add/wr
*/
bool of_ADD_WR(vthread_t thr, vvp_code_t)
{
double r = thr->pop_real();