Compare commits
2 Commits
6ddb8da07f
...
933f08494c
Author | SHA1 | Date | |
---|---|---|---|
933f08494c | |||
21f8eab432 |
@ -104,7 +104,7 @@ protected:
|
|||||||
void gen_instr_prologue(jit_holder& jh);
|
void gen_instr_prologue(jit_holder& jh);
|
||||||
void gen_instr_epilogue(jit_holder& jh);
|
void gen_instr_epilogue(jit_holder& jh);
|
||||||
inline void gen_raise(jit_holder& jh, uint16_t trap_id, uint16_t cause);
|
inline void gen_raise(jit_holder& jh, uint16_t trap_id, uint16_t cause);
|
||||||
template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> void gen_set_tval(jit_holder& jh, T new_tval) ;
|
template <typename T, typename = typename std::enable_if<std::is_integral<T>::value>::type> void gen_set_tval(jit_holder& jh, T new_tval) ;
|
||||||
void gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) ;
|
void gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) ;
|
||||||
|
|
||||||
template<unsigned W, typename U, typename S = typename std::make_signed<U>::type>
|
template<unsigned W, typename U, typename S = typename std::make_signed<U>::type>
|
||||||
@ -310,8 +310,8 @@ void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, T new_tval) {
|
|||||||
}
|
}
|
||||||
template <typename ARCH>
|
template <typename ARCH>
|
||||||
void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) {
|
void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) {
|
||||||
if(std::holds_alternative<x86::Gp>(_new_tval)) {
|
if(nonstd::holds_alternative<x86::Gp>(_new_tval)) {
|
||||||
x86::Gp new_tval = std::get<x86::Gp>(_new_tval);
|
x86::Gp new_tval = nonstd::get<x86::Gp>(_new_tval);
|
||||||
if(new_tval.size() < 8)
|
if(new_tval.size() < 8)
|
||||||
new_tval = gen_ext_Gp(jh.cc, new_tval, 64, false);
|
new_tval = gen_ext_Gp(jh.cc, new_tval, 64, false);
|
||||||
mov(jh.cc, jh.globals[TVAL], new_tval);
|
mov(jh.cc, jh.globals[TVAL], new_tval);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (C) 2017 - 2020 MINRES Technologies GmbH
|
* Copyright (C) 2024 MINRES Technologies GmbH
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (C) 2017 - 2021 MINRES Technologies GmbH
|
* Copyright (C) 2024 MINRES Technologies GmbH
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -104,7 +104,7 @@ protected:
|
|||||||
void gen_instr_prologue(jit_holder& jh);
|
void gen_instr_prologue(jit_holder& jh);
|
||||||
void gen_instr_epilogue(jit_holder& jh);
|
void gen_instr_epilogue(jit_holder& jh);
|
||||||
inline void gen_raise(jit_holder& jh, uint16_t trap_id, uint16_t cause);
|
inline void gen_raise(jit_holder& jh, uint16_t trap_id, uint16_t cause);
|
||||||
template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> void gen_set_tval(jit_holder& jh, T new_tval) ;
|
template <typename T, typename = typename std::enable_if<std::is_integral<T>::value>::type> void gen_set_tval(jit_holder& jh, T new_tval) ;
|
||||||
void gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) ;
|
void gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) ;
|
||||||
|
|
||||||
template<unsigned W, typename U, typename S = typename std::make_signed<U>::type>
|
template<unsigned W, typename U, typename S = typename std::make_signed<U>::type>
|
||||||
@ -4850,8 +4850,8 @@ void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, T new_tval) {
|
|||||||
}
|
}
|
||||||
template <typename ARCH>
|
template <typename ARCH>
|
||||||
void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) {
|
void vm_impl<ARCH>::gen_set_tval(jit_holder& jh, x86_reg_t _new_tval) {
|
||||||
if(std::holds_alternative<x86::Gp>(_new_tval)) {
|
if(nonstd::holds_alternative<x86::Gp>(_new_tval)) {
|
||||||
x86::Gp new_tval = std::get<x86::Gp>(_new_tval);
|
x86::Gp new_tval = nonstd::get<x86::Gp>(_new_tval);
|
||||||
if(new_tval.size() < 8)
|
if(new_tval.size() < 8)
|
||||||
new_tval = gen_ext_Gp(jh.cc, new_tval, 64, false);
|
new_tval = gen_ext_Gp(jh.cc, new_tval, 64, false);
|
||||||
mov(jh.cc, jh.globals[TVAL], new_tval);
|
mov(jh.cc, jh.globals[TVAL], new_tval);
|
||||||
@ -4900,4 +4900,4 @@ volatile std::array<bool, 2> dummy = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
@ -96,7 +96,8 @@ protected:
|
|||||||
using compile_ret_t = virt_addr_t;
|
using compile_ret_t = virt_addr_t;
|
||||||
using compile_func = compile_ret_t (this_class::*)(virt_addr_t &pc, code_word_t instr);
|
using compile_func = compile_ret_t (this_class::*)(virt_addr_t &pc, code_word_t instr);
|
||||||
|
|
||||||
inline const char *name(size_t index){return index<traits::reg_aliases.size()?traits::reg_aliases[index]:"illegal";}
|
inline const char *name(size_t index){return traits::reg_aliases.at(index);}
|
||||||
|
|
||||||
|
|
||||||
virt_addr_t execute_inst(finish_cond_e cond, virt_addr_t start, uint64_t icount_limit) override;
|
virt_addr_t execute_inst(finish_cond_e cond, virt_addr_t start, uint64_t icount_limit) override;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user