small changes regarding vector template

This commit is contained in:
Eyck-Alexander Jentzsch 2025-03-31 09:52:12 +02:00
parent cd3ec0b79d
commit a2e5405e25

View File

@ -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;