diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-26 17:13:56 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-26 17:13:56 +0300 |
| commit | 4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0 (patch) | |
| tree | 3e9cdf4b34f4f2beffa72a837c409e567d84adb2 /ops | |
| parent | e8b00dae488e9c9f6f9ef7de99bc340de61541b7 (diff) | |
| download | copyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.tar.gz copyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.zip | |
apply fixes to make jit-comparison easier
Diffstat (limited to 'ops')
| -rw-r--r-- | ops/branchi/bani.c | 8 | ||||
| -rw-r--r-- | ops/branchi/source.mk | 2 | ||||
| -rw-r--r-- | ops/peeko.c | 9 | ||||
| -rw-r--r-- | ops/popo.c | 9 | ||||
| -rw-r--r-- | ops/pusha.c | 9 | ||||
| -rw-r--r-- | ops/source.mk | 1 |
6 files changed, 38 insertions, 0 deletions
diff --git a/ops/branchi/bani.c b/ops/branchi/bani.c new file mode 100644 index 0000000..15708eb --- /dev/null +++ b/ops/branchi/bani.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ + +#include "../common.h" + +DEFINE_OP(bani) +{ + BRANCH(IMM(), a != 0, sp, a, x, y, o); +} diff --git a/ops/branchi/source.mk b/ops/branchi/source.mk new file mode 100644 index 0000000..1c5424e --- /dev/null +++ b/ops/branchi/source.mk @@ -0,0 +1,2 @@ +IMM_SRC != echo ops/branchi/*.c +IMM_SOURCES += $(IMM_SRC) diff --git a/ops/peeko.c b/ops/peeko.c new file mode 100644 index 0000000..06e6f2c --- /dev/null +++ b/ops/peeko.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ + +#include "common.h" + +DEFINE_OP(peeko) +{ + UNUSED(o); + NEXT_OP(sp, a, x, y, *(sp - 1)); +} diff --git a/ops/popo.c b/ops/popo.c new file mode 100644 index 0000000..5a90524 --- /dev/null +++ b/ops/popo.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ + +#include "common.h" + +DEFINE_OP(popo) +{ + UNUSED(o); + NEXT_OP(sp - 1, a, x, y, *(sp - 1)); +} diff --git a/ops/pusha.c b/ops/pusha.c new file mode 100644 index 0000000..8898a77 --- /dev/null +++ b/ops/pusha.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ + +#include "common.h" + +DEFINE_OP(pusha) +{ + *sp = a; + NEXT_OP(sp + 1, a, x, y, o); +} diff --git a/ops/source.mk b/ops/source.mk index 0a90169..8db98bc 100644 --- a/ops/source.mk +++ b/ops/source.mk @@ -6,3 +6,4 @@ include ops/bs/source.mk include ops/li/source.mk include ops/sl/source.mk include ops/sr/source.mk +include ops/branchi/source.mk |
