From 781089662c6504b8eec4041bd39c66bf1085d1a6 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 22 May 2022 12:53:49 +0200 Subject: [PATCH] vvp: Remove unused `%mov/wu` instruction The `%mov/wu` instruction moves data from one index register to another. The instruction is not used. It also does the same as `%ix/mov`. So remove it. Signed-off-by: Lars-Peter Clausen --- vvp/compile.cc | 1 - vvp/opcodes.txt | 2 -- vvp/vthread.cc | 12 ------------ 3 files changed, 15 deletions(-) diff --git a/vvp/compile.cc b/vvp/compile.cc index 9d1e4d26f..a131658cc 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -216,7 +216,6 @@ static const struct opcode_table_s opcode_table[] = { { "%mod", of_MOD, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%mod/s", of_MOD_S, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%mod/wr", of_MOD_WR, 0, {OA_NONE, OA_NONE, OA_NONE} }, - { "%mov/wu", of_MOV_WU, 2, {OA_BIT1, OA_BIT2, OA_NONE} }, { "%mul", of_MUL, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%mul/wr", of_MUL_WR, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%muli", of_MULI, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} }, diff --git a/vvp/opcodes.txt b/vvp/opcodes.txt index 24840c5b8..461ba89f1 100644 --- a/vvp/opcodes.txt +++ b/vvp/opcodes.txt @@ -806,8 +806,6 @@ The /s form does signed %. This opcode is the real-valued modulus of the two real values. -* %mov/wu , - * %mul * %muli , , diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 0789c3b7b..6b797379f 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -4500,18 +4500,6 @@ bool of_PARTI_U(vthread_t thr, vvp_code_t cp) return of_PARTI_base(thr, cp, false); } -/* -* %mov/wu , -*/ -bool of_MOV_WU(vthread_t thr, vvp_code_t cp) -{ - unsigned dst = cp->bit_idx[0]; - unsigned src = cp->bit_idx[1]; - - thr->words[dst].w_uint = thr->words[src].w_uint; - return true; -} - /* * %mul */