mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
140 lines
1.7 KiB
C
140 lines
1.7 KiB
C
// The OS/K Team licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
#include <in/instrs.h>
|
|
|
|
IMPL_START_1(not)
|
|
{
|
|
v1 = ~v1;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(test)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
SET_ZSF(v1 & v2);
|
|
}
|
|
IMPL_END;
|
|
|
|
IMPL_START_2(and)
|
|
{
|
|
v1 &= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(andf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 &= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(or)
|
|
{
|
|
v1 |= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(orf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 |= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
IMPL_START_2(xor)
|
|
{
|
|
v1 ^= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(xorf)
|
|
{
|
|
flg &= ~OF;
|
|
flg &= ~CF;
|
|
v1 ^= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(shl)
|
|
{
|
|
v1 <<= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(shlf)
|
|
{
|
|
v1 <<= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
IMPL_START_2(shr)
|
|
{
|
|
v1 >>= v2;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(shrf)
|
|
{
|
|
v1 >>= v2;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
IMPL_START_2(sal)
|
|
{
|
|
long w1 = v1;
|
|
long w2 = v2;
|
|
|
|
w1 <<= w2;
|
|
|
|
v1 = (ulong) w1;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(salf)
|
|
{
|
|
long w1 = v1;
|
|
long w2 = v2;
|
|
|
|
w1 <<= w2;
|
|
|
|
v1 = (ulong) w1;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
IMPL_START_2(sar)
|
|
{
|
|
long w1 = v1;
|
|
long w2 = v2;
|
|
|
|
w1 >>= w2;
|
|
|
|
v1 = (ulong) w1;
|
|
}
|
|
IMPL_OUT;
|
|
|
|
IMPL_START_2(sarf)
|
|
{
|
|
long w1 = v1;
|
|
long w2 = v2;
|
|
|
|
w1 >>= w2;
|
|
|
|
v1 = (ulong) w1;
|
|
}
|
|
IMPL_OUT_ZSF;
|
|
|
|
//--------------------------------------------------------------------------
|
|
|