updates templates for interp to make extension specific includes conditonal
This commit is contained in:
parent
4cef0f57c1
commit
b95f518c91
@ -30,6 +30,9 @@
|
||||
*
|
||||
*******************************************************************************/
|
||||
<%
|
||||
def floating_point = registers.find {it.name=='FCSR'}
|
||||
def vector = registers.find {it.name=='vtype'}
|
||||
def aes = functions.find { it.contains('aes') }
|
||||
def nativeTypeSize(int size){
|
||||
if(size<=8) return 8; else if(size<=16) return 16; else if(size<=32) return 32; else return 64;
|
||||
}
|
||||
@ -41,9 +44,16 @@ def nativeTypeSize(int size){
|
||||
#include <iss/debugger/server.h>
|
||||
#include <iss/iss.h>
|
||||
#include <iss/interp/vm_base.h>
|
||||
<%
|
||||
if(floating_point != null) {%>
|
||||
#include <vm/fp_functions.h>
|
||||
<%}
|
||||
if(vector != null) {%>
|
||||
#include <vm/vector_functions.h>
|
||||
<%}
|
||||
if(aes != null) {%>
|
||||
#include <vm/aes_sbox.h>
|
||||
<%}%>
|
||||
#include <util/logging.h>
|
||||
#include <boost/coroutine2/all.hpp>
|
||||
#include <functional>
|
||||
@ -103,12 +113,10 @@ protected:
|
||||
using compile_func = compile_ret_t (this_class::*)(virt_addr_t &pc, code_word_t instr);
|
||||
|
||||
inline const char *name(size_t index){return traits::reg_aliases.at(index);}
|
||||
<%
|
||||
def fcsr = registers.find {it.name=='FCSR'}
|
||||
if(fcsr != null) {%>
|
||||
<%
|
||||
if(floating_point != null) {%>
|
||||
inline const char *fname(size_t index){return index < 32?name(index+traits::F0):"illegal";}
|
||||
<%}
|
||||
def vector = registers.find {it.name=='vtype'}
|
||||
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){
|
||||
|
@ -37,9 +37,7 @@
|
||||
#include <iss/debugger/server.h>
|
||||
#include <iss/iss.h>
|
||||
#include <iss/interp/vm_base.h>
|
||||
#include <vm/fp_functions.h>
|
||||
#include <vm/vector_functions.h>
|
||||
#include <vm/aes_sbox.h>
|
||||
|
||||
#include <util/logging.h>
|
||||
#include <boost/coroutine2/all.hpp>
|
||||
#include <functional>
|
||||
|
Loading…
x
Reference in New Issue
Block a user