summaryrefslogtreecommitdiff
path: root/arch/null/arch_inst.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/null/arch_inst.c')
-rw-r--r--arch/null/arch_inst.c15
1 files changed, 6 insertions, 9 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;