Replaced XV with Z to make things uniform + fixed remaining non-valid asm.js.

This commit is contained in:
Brad Nelson
2022-07-12 18:13:56 -07:00
parent cd9228a609
commit 9d874a08fb
9 changed files with 67 additions and 55 deletions

View File

@ -23,16 +23,17 @@
#define USER_WORDS
#include "builtins.h"
#define YV(flags, op, code) XV(flags, #op, op, code)
#define X(name, op, code) XV(forth, name, op, code)
#define Y(op, code) XV(forth, #op, op, code)
#define XV(flags, name, op, code) Z(flags, name, op, code)
#define YV(flags, op, code) Z(flags, #op, op, code)
#define X(name, op, code) Z(forth, name, op, code)
#define Y(op, code) Z(forth, #op, op, code)
int main() {
printf("#define PLATFORM_SIMULATED_OPCODE_LIST \\\n");
#define XV(flags, str, name, code) \
printf(" XV(%s, \"%s\", %s, DUP; sp = simulated(sp, STR_%s); DROP) \\\n", #flags, str, #name, #name);
#define Z(flags, str, name, code) \
printf(" Z(%s, \"%s\", %s, DUP; sp = simulated(sp, STR_%s); DROP) \\\n", #flags, str, #name, #name);
PLATFORM_OPCODE_LIST
#undef XV
#undef Z
printf("\n");
return 0;
}

View File

@ -28,9 +28,9 @@ static cell_t *simulated(cell_t *sp, const char *op);
#include "gen/esp32_sim_opcodes.h"
#define XV(flags, str, name, code) static const char *STR_ ## name = str;
#define Z(flags, str, name, code) static const char *STR_ ## name = str;
PLATFORM_SIMULATED_OPCODE_LIST
#undef XV
#undef Z
#define MALLOC_CAP_INTERNAL 0
#define heap_caps_get_largest_free_block(x) SIM_HEAP_SIZE