From 6f6d09be7a8f80056d794393262868d2100ae747 Mon Sep 17 00:00:00 2001 From: on-keyday <62627905+on-keyday@users.noreply.github.com> Date: Sun, 26 Jan 2025 21:51:07 +0900 Subject: [PATCH] fix eval rule --- src/core/ast/tool/eval.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/ast/tool/eval.h b/src/core/ast/tool/eval.h index d85ad80c..a5afcb8f 100644 --- a/src/core/ast/tool/eval.h +++ b/src/core/ast/tool/eval.h @@ -401,11 +401,14 @@ namespace brgen::ast::tool { if (auto io_op = ast::as(expr)) { if (io_op->method == ast::IOMethod::config_endian_big || io_op->method == ast::IOMethod::config_bit_order_msb) { - return make_result(false); + return make_result(0); } if (io_op->method == ast::IOMethod::config_endian_little || io_op->method == ast::IOMethod::config_bit_order_lsb) { - return make_result(true); + return make_result(1); + } + if (io_op->method == ast::IOMethod::config_endian_native) { + return make_result(2); } } return unexpect(LocError{expr->loc, "not supported"});