From f1ad239d613c062ae103d6303dd5c196a1f7f729 Mon Sep 17 00:00:00 2001 From: Klaus Treichel Date: Fri, 6 Aug 2010 13:12:52 +0200 Subject: [PATCH] Add jitplus support for the new trunc insn. --- ChangeLog | 5 +++++ include/jit/jit-plus.h | 1 + jitplus/jit-plus-function.cpp | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0a99b97..c0f24ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,11 @@ * tests/math.pas: Add tests for the new trunc insn. + * include/jit/jit-plus.h: Add jit_function insn_trunc member. + + * jitplus/jit-plus-function.cpp (insn_trunc): Implement wrapper for + the new trunc insn. + 2010-08-04 Klaus Treichel * include/jit/Makefile.am: Don't include jit-arch.h in the diff --git a/include/jit/jit-plus.h b/include/jit/jit-plus.h index fa17643..82dafc8 100644 --- a/include/jit/jit-plus.h +++ b/include/jit/jit-plus.h @@ -309,6 +309,7 @@ public: jit_value insn_sqrt(const jit_value& value1); jit_value insn_tan(const jit_value& value1); jit_value insn_tanh(const jit_value& value1); + jit_value insn_trunc(const jit_value& value1); jit_value insn_is_nan(const jit_value& value1); jit_value insn_is_finite(const jit_value& value1); jit_value insn_is_inf(const jit_value& value1); diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp index d8116f1..41ef66b 100644 --- a/jitplus/jit-plus-function.cpp +++ b/jitplus/jit-plus-function.cpp @@ -595,6 +595,7 @@ jit_label jit_function::new_label() * @deftypemethodx jit_function jit_value insn_sqrt (const jit_value& @var{value1}) * @deftypemethodx jit_function jit_value insn_tan (const jit_value& @var{value1}) * @deftypemethodx jit_function jit_value insn_tanh (const jit_value& @var{value1}) + * @deftypemethodx jit_function jit_value insn_trunc (const jit_value& @var{value1}) * @deftypemethodx jit_function jit_value insn_is_nan (const jit_value& @var{value1}) * @deftypemethodx jit_function jit_value insn_is_finite (const jit_value& @var{value1}) * @deftypemethodx jit_function jit_value insn_is_inf (const jit_value& @var{value1}) @@ -1011,6 +1012,11 @@ jit_value jit_function::insn_tanh(const jit_value& value1) value_wrap(jit_insn_tanh(func, value1.raw())); } +jit_value jit_function::insn_trunc(const jit_value& value1) +{ + value_wrap(jit_insn_trunc(func, value1.raw())); +} + jit_value jit_function::insn_is_nan(const jit_value& value1) { value_wrap(jit_insn_is_nan(func, value1.raw()));