// The OS/K Team licences this file to you under the MIT license. // See the LICENCE file in the project root for more information. #include "arch.h" #define IMPL_START_1(name) \ void i_##name(ctx_t *ctx, acc_t *p1, acc_t *p2) \ { \ ulong v1 = (p1->type == A_REG ? ctx->r[p1->val].val : p1->val); \ #define IMPL_START_2(name) \ void i_##name(ctx_t *ctx, acc_t *p1, acc_t *p2) \ { \ ulong v1 = (p1->type == A_REG ? ctx->r[p1->val].val : p1->val); \ ulong v2 = (p2->type == A_REG ? ctx->r[p2->val].val : p2->val); \ #define IMPL_OUT \ assert(p1->type == A_REG); \ ctx->r[p1->val].val = v1; \ } \ #define IMPL_END \ }