> 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 00:02:23 up 2 days 12:57, 2 users, load average: 0.54, 0.61, 0.52
This commit is contained in:
parent
4203d25098
commit
72ab3ad041
1 changed files with 4 additions and 3 deletions
|
@ -167,8 +167,9 @@ END_TEST
|
||||||
|
|
||||||
extern const char *regs[];
|
extern const char *regs[];
|
||||||
START_TEST(test_expr_plain_register) {
|
START_TEST(test_expr_plain_register) {
|
||||||
int i, j;
|
int i, j, result;
|
||||||
char buf[5] = {};
|
char buf[5] = {};
|
||||||
|
uint32_t value;
|
||||||
// NOTE: need to fix this if want to support more arch
|
// NOTE: need to fix this if want to support more arch
|
||||||
buf[0] = '$';
|
buf[0] = '$';
|
||||||
for (i = 1; i < 32; i++) {
|
for (i = 1; i < 32; i++) {
|
||||||
|
@ -176,8 +177,8 @@ START_TEST(test_expr_plain_register) {
|
||||||
gpr(i) = i;
|
gpr(i) = i;
|
||||||
printf("%d: %s\n", i, buf);
|
printf("%d: %s\n", i, buf);
|
||||||
yy_scan_string(buf);
|
yy_scan_string(buf);
|
||||||
uint32_t value;
|
result = !yyparse(&value);
|
||||||
ck_assert(!yyparse(&value));
|
ck_assert_msg(result == 0, "expr = %s\n", buf);
|
||||||
yylex_destroy();
|
yylex_destroy();
|
||||||
|
|
||||||
ck_assert(value == i);
|
ck_assert(value == i);
|
||||||
|
|
Loading…
Reference in a new issue