removes C++17 dependency from asmjit backend

This commit is contained in:
Eyck Jentzsch 2024-08-04 17:41:49 +02:00
parent 21f8eab432
commit 933f08494c
2 changed files with 7 additions and 7 deletions

View File

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

View File

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