Browse Source

rvv: use zvqmac to enable vector qmac

Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
pull/475/head
Chih-Min Chao 6 years ago
parent
commit
5ea3ef76d2
  1. 1
      riscv/decode.h
  2. 5
      riscv/processor.cc

1
riscv/decode.h

@ -520,6 +520,7 @@ static inline bool is_aligned(const unsigned val, const unsigned pos)
#define VI_CHECK_QSS(is_vs1) \
require_vector;\
p->supports_extension(EXT_ZVQMAC); \
require(P.VU.vflmul <= 2); \
require(P.VU.vsew * 4 <= P.VU.ELEN); \
require_align(insn.rd(), P.VU.vflmul * 4); \

5
riscv/processor.cc

@ -261,6 +261,8 @@ void processor_t::parse_isa_string(const char* str)
extension_table[EXT_ZVAMO] = true;
} else if (ext_str == "zvlsseg") {
extension_table[EXT_ZVLSSEG] = true;
} else if (ext_str == "zvqmac") {
extension_table[EXT_ZVQMAC] = true;
} else {
sprintf(error_msg, "unsupported extension '%s'", ext_str.c_str());
bad_isa_string(str, error_msg);
@ -293,6 +295,9 @@ void processor_t::parse_isa_string(const char* str)
if (supports_extension(EXT_ZVLSSEG) && !supports_extension('V'))
bad_isa_string(str, "'Zvlsseg' extension requires 'V'");
if (supports_extension(EXT_ZVQMAC) && !supports_extension('V'))
bad_isa_string(str, "'Zvqmac' extension requires 'V'");
}
void state_t::reset(reg_t max_isa)

Loading…
Cancel
Save