[err]202505152347

This commit is contained in:
starcells committed 2026-05-15 23:47:31 +08:00
1 parent df4a369b6f
commit 7cf22b6773
4 files changed
+18 -31

No files matched your search

+5 -4
View File
@@ -1,10 +1,11 @@
.xor 23
.xor _UNIT_MAX
.anchor arg1
step 1
.xor 34
step 2
.xor 20
.anchor arg2
step 1
back 1
.anchor ans
and arg1 arg2 ans
.tp ans
out
+7 -24
View File
@@ -9,29 +9,12 @@ btp %1
%endmacro
%macro and 3
.anchor before_and
.anchor before_and
.tp %1
stp
.xor _UNIT_MAX
btp
%repeat _UNIT_MAX
out
out
%endrepeat
.loop
.tp %1
biz
.tp %2
biz
.tp %3
flb
biz
flb
rnz
ror
rnz
ror
rnz
ror
.endloop
.tp before_and
%endmacro
.tp before_and
%endmacro
+4 -2
View File
@@ -60,8 +60,10 @@ extern mem_size_type dataptr;
extern std::map<std::string, R8MetaOp> r8asm_insmap;
extern unit_size_type UNIT_SIZE;
// #define DEFAULT_UNIT_SIZE (sizeof(unit_size_type) * 8)
#define DEFAULT_UNIT_SIZE 8 // Just for test.
#define UNIT_MAX (((uint64_t)1 << UNIT_SIZE) - 1)
// #define DEFAULT_UNIT_SIZE (sizeof(unit_size_type) * 8)
#define DEFAULT_UNIT_SIZE 8 // Just for test.
#define DEFAULT_UNIT_MAX (((uint64_t)1 << DEFAULT_UNIT_SIZE) - 1)
#endif
+2 -1
View File
@@ -4,7 +4,8 @@ mem_size_type dataptr = 0;
std::map<std::string, r8asm_label> labels = {{std::string("main"), 0}};
std::map<std::string, r8asm_data> datas = {
{std::string("_UNIT_MAX"), UNIT_MAX}};
{std::string("_UNIT_MAX"), DEFAULT_UNIT_MAX},
{std::string{"_UNIT_SIZE"}, DEFAULT_UNIT_SIZE}};
std::map<std::string, R8MetaOp> r8asm_insmap = {
{"stp", rot8_bytecode::STP}, {"btp", rot8_bytecode::BTP},