diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-07-31 04:04:37 +0200 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-08-05 04:31:51 +0200 |
| commit | 27061e4c4e723e16797453f473cff7148beecad3 (patch) | |
| tree | 94b11e2b270939bda4ddc4a53b6a3f345dc92d06 /arch | |
| parent | 8a4563d6d0c9e81fdaa42f6f760cae2b49cad431 (diff) | |
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/null/arch_inst.c | 15 | ||||
| -rw-r--r-- | arch/null/arch_inst.h | 21 | ||||
| -rw-r--r-- | arch/null/arch_spec.h | 2 |
3 files changed, 7 insertions, 31 deletions
diff --git a/arch/null/arch_inst.c b/arch/null/arch_inst.c index 43f5d0c..3f30510 100644 --- a/arch/null/arch_inst.c +++ b/arch/null/arch_inst.c @@ -15,6 +15,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <wchar.h> #include "arch_inst.h" @@ -34,9 +35,7 @@ // ---------------------------------------------------------------------------- // [section] globals // ---------------------------------------------------------------------------- -wchar_t *g_arch_inst_symbols = ( - L"⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙⡚⡛⡜⡝⡞⡟" - L"⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿" +static const wchar_t *g_arch_inst_symbols = ( L"⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟" L"⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯⢰⢱⢲⢳⢴⢵⢶⢷⣰⣱⣲⣳⣴⣵⣶⣷⢸⢹⢺⢻⢼⢽⢾⢿⣸⣹⣺⣻⣼⣽⣾⣿" ); @@ -44,17 +43,15 @@ wchar_t *g_arch_inst_symbols = ( // ---------------------------------------------------------------------------- // [section] definitions // ---------------------------------------------------------------------------- -int arch_inst_cap(void) { - return ARCH_INST_CAP; -} - wchar_t arch_inst_symbol(uint8_t inst) { - assert(inst < ARCH_INST_CAP); + assert(inst < ARCH_INST_COUNT); + assert(wcslen(g_arch_inst_symbols) == ARCH_INST_COUNT); return g_arch_inst_symbols[inst]; } const char *arch_inst_mnemonic(uint8_t inst) { - assert(inst < ARCH_INST_CAP); + assert(inst < ARCH_INST_COUNT); + assert(wcslen(g_arch_inst_symbols) == ARCH_INST_COUNT); switch (inst) { #define INST(code) case 0x##code: return "null " #code; diff --git a/arch/null/arch_inst.h b/arch/null/arch_inst.h deleted file mode 100644 index f9d85ff..0000000 --- a/arch/null/arch_inst.h +++ /dev/null @@ -1,21 +0,0 @@ -// file : arch/null/arch_inst.h -// project : Salis-VM -// author : Paul Oliver <contact@pauloliver.dev> - -#pragma once - -// index: -// [section] macros -// [section] definitions - -// ---------------------------------------------------------------------------- -// [section] macros -// ---------------------------------------------------------------------------- -#define ARCH_INST_CAP 0x80 - -// ---------------------------------------------------------------------------- -// [section] definitions -// ---------------------------------------------------------------------------- -int arch_inst_cap(void); -wchar_t arch_inst_symbol(uint8_t inst); -const char *arch_inst_mnemonic(uint8_t inst); diff --git a/arch/null/arch_spec.h b/arch/null/arch_spec.h index eeb6d44..ff1fb58 100644 --- a/arch/null/arch_spec.h +++ b/arch/null/arch_spec.h @@ -4,7 +4,7 @@ #pragma once -//#define ARCH_SPEC_MVEC_LOOP +#define ARCH_SPEC_MUTA_FLIP #define ARCH_SPEC_CORE_FIELDS #define ARCH_SPEC_PROC_FIELDS \ |
