From 5eb17bf557d77f96e9086618727b994acff9050c Mon Sep 17 00:00:00 2001 From: starcells Date: Sat, 16 May 2026 00:14:04 +0800 Subject: [PATCH] [err]202505160014 --- asm/lib.r8asm | 31 +++++++++++++++++++++++++++---- include/r8asm/r8asm_parse.hh | 4 ++-- src/r8asm_parse.cc | 2 +- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/asm/lib.r8asm b/asm/lib.r8asm index af5d4ab..6699dac 100644 --- a/asm/lib.r8asm +++ b/asm/lib.r8asm @@ -11,10 +11,33 @@ btp %1 %macro and 3 .anchor before_and -%repeat _UNIT_MAX -out -out +.tp %1 +%repeat _UNIT_SIZE + biz + .tp %2 + biz + .tp %3 + flb + biz + flb + rnz + .tp %2 + rnz + .tp %1 + rnz + ror + .tp %2 + ror + .tp %3 + ror + .tp %1 %endrepeat .tp before_and -%endmacro \ No newline at end of file +%endrepeat + +.tp before_and +%endmacro + +out +out \ No newline at end of file diff --git a/include/r8asm/r8asm_parse.hh b/include/r8asm/r8asm_parse.hh index 7f7930e..ab16fef 100644 --- a/include/r8asm/r8asm_parse.hh +++ b/include/r8asm/r8asm_parse.hh @@ -4,7 +4,7 @@ #include "r8asm/r8asm_core.hh" #include #include -#include +#include #include #include #include @@ -15,7 +15,7 @@ typedef std::list>::iterator r8asm_src_point; struct R8Src { std::list> raw_src; - std::stack> codeblocks; + std::queue> codeblocks; void preprocess(); }; diff --git a/src/r8asm_parse.cc b/src/r8asm_parse.cc index 2b6dbad..f95d93a 100644 --- a/src/r8asm_parse.cc +++ b/src/r8asm_parse.cc @@ -108,7 +108,7 @@ r8asm_translate_single_ins(std::vector const raw_ins) { void R8Src::preprocess() { std::vector tmp_codeblock; while (!this->codeblocks.empty()) { - auto i = this->codeblocks.top(); + auto i = this->codeblocks.front(); this->codeblocks.pop(); tmp_codeblock.clear(); auto raw_codeblock =