From e298f2149d654ec5c5db99f96066ec62d77f8550 Mon Sep 17 00:00:00 2001 From: ggn Date: Thu, 24 Mar 2022 13:43:45 +0200 Subject: [PATCH] Removed redundant table --- token.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/token.c b/token.c index 08a4916..89c7f0a 100644 --- a/token.c +++ b/token.c @@ -154,14 +154,6 @@ static char * regname[] = { "a10","b10","x","y","","","ab","ba" // 312,319 }; -WARNING("We should get rid of this table, it's a subset of the table above") -static char * riscregname[] = { - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", - "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", - "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" -}; - // // Initialize tokenizer @@ -517,16 +509,11 @@ arg_num: // This is a hack. It might be better table-driven. d = NULL; - if ((*tk >= REG68_D0) && !rdsp && !rgpu) + if (*tk >= REG68_D0) { d = regname[(int)*tk++ - REG68_D0]; goto strcopy; } - else if ((*tk >= REGRISC_R0) && (*tk <= REGRISC_R31)) - { - d = riscregname[(int)*tk++ - REGRISC_R0]; - goto strcopy; - } else { switch ((int)*tk++) -- 2.37.2