Added RV32D extension

This commit is contained in:
2018-04-24 15:33:21 +02:00
parent 48ad30dcae
commit ce98e2ad31
13 changed files with 2452 additions and 276 deletions

View File

@ -56,6 +56,8 @@ struct traits<${coreDef.name.toLowerCase()}> {
enum constants {${coreDef.constants.collect{c -> c.name+"="+c.value}.join(', ')}};
constexpr static unsigned FP_REGS_SIZE = ${coreDef.constants.find {it.name=='FLEN'}?.value?:0};
enum reg_e {<%
allRegs.each { reg ->
if( reg instanceof RegisterFile) {
@ -99,9 +101,6 @@ struct traits<${coreDef.name.toLowerCase()}> {
enum sreg_flag_e {FLAGS};
enum mem_type_e {${allSpaces.collect{s -> s.name}.join(', ')}};
constexpr static bool has_fp_regs = ${allRegs.find {it.name=='FCSR'}!= null ?'true':'false'};
};
struct ${coreDef.name.toLowerCase()}: public arch_if {

View File

@ -50,7 +50,7 @@
namespace iss {
namespace vm {
namespace fp_impl{
void add_fp_functions_2_module(llvm::Module *mod);
void add_fp_functions_2_module(llvm::Module *, unsigned);
}
}
@ -89,7 +89,7 @@ protected:
void setup_module(llvm::Module* m) override {
super::setup_module(m);
vm::fp_impl::add_fp_functions_2_module(m);
vm::fp_impl::add_fp_functions_2_module(m, traits<ARCH>::FP_REGS_SIZE);
}
inline llvm::Value *gen_choose(llvm::Value *cond, llvm::Value *trueVal, llvm::Value *falseVal,