> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.71 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan  5 14:18:41 UTC 2024 x86_64 GNU/Linux
 20:56:06  up   0:11,  2 users,  load average: 1.80, 0.97, 0.52
This commit is contained in:
tracer-ysyx 2024-01-19 20:56:06 +08:00 committed by xinyangli
parent 21e6e0e708
commit 7416c3efd6

View file

@ -151,7 +151,8 @@ struct {
{"0--1", 0x1},
{"0--0x1", 0x1},
}, reg_exprs[] = {
{"$ra", 0x0},
{"$ra", 0x1},
{"4$ra", 0x4},
};
START_TEST(test_expr_negative_operand) {
yy_scan_string(exprs[_i].expr);
@ -190,8 +191,13 @@ START_TEST(test_expr_plain_register) {
END_TEST
START_TEST(test_expr_register) {
yy_scan_string(reg_exprs[_i].expr);
int i;
uint32_t value;
for (i = 0; i < 32; i++) {
gpr(i) = i;
}
yy_scan_string(reg_exprs[_i].expr);
ck_assert(!yyparse(&value));
yylex_destroy();