From a2e5405e255d96fd25ffbeb827bc3ee7d7989750 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 31 Mar 2025 09:52:12 +0200 Subject: [PATCH] small changes regarding vector template --- gen_input/templates/interp/CORENAME.cpp.gtl | 61 +++++++++++++-------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/gen_input/templates/interp/CORENAME.cpp.gtl b/gen_input/templates/interp/CORENAME.cpp.gtl index 1294601..b0a0345 100644 --- a/gen_input/templates/interp/CORENAME.cpp.gtl +++ b/gen_input/templates/interp/CORENAME.cpp.gtl @@ -118,30 +118,43 @@ if(floating_point != null) {%> inline const char *fname(size_t index){return index < 32?name(index+traits::F0):"illegal";} <%} if(vector != null) {%> - inline const char *vname(size_t index){return index < 32?name(index+traits::V0):"illegal";} - inline const char *sew_name(size_t bits){ - switch(bits){ - case 0b000: return "e8"; - case 0b001: return "e16"; - case 0b010: return "e32"; - case 0b011: return "e64"; - default: return "illegal"; - } - } - inline const char *lmul_name(size_t bits){ - switch(bits){ - case 0b101: return "mf8"; - case 0b110: return "mf4"; - case 0b111: return "mf2"; - case 0b000: return "m1"; - case 0b001: return "m2"; - case 0b010: return "m4"; - case 0b011: return "m8"; - default: return "illegal"; - } - } - inline const char *ma_name(bool ma){return ma ? "ma":"mu";} - inline const char *ta_name(bool ta){return ta ? "ta":"tu";} + inline const char* vname(size_t index) { return index < 32 ? name(index + traits::V0) : "illegal"; } + inline const char* sew_name(size_t bits) { + switch(bits) { + case 0b000: + return "e8"; + case 0b001: + return "e16"; + case 0b010: + return "e32"; + case 0b011: + return "e64"; + default: + return "illegal"; + } + } + inline const char* lmul_name(size_t bits) { + switch(bits) { + case 0b101: + return "mf8"; + case 0b110: + return "mf4"; + case 0b111: + return "mf2"; + case 0b000: + return "m1"; + case 0b001: + return "m2"; + case 0b010: + return "m4"; + case 0b011: + return "m8"; + default: + return "illegal"; + } + } + inline const char* ma_name(bool ma) { return ma ? "ma" : "mu"; } + inline const char* ta_name(bool ta) { return ta ? "ta" : "tu"; } <%}%> virt_addr_t execute_inst(finish_cond_e cond, virt_addr_t start, uint64_t icount_limit) override;