aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/libgccjit.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-01-09 20:10:11 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-01-09 20:10:11 +0000
commitccce3b2ac3c9352501278d36b3c79f049234870b (patch)
tree61e9e361de747f905be63bd0d96940d2f0d1c39b /gcc/jit/libgccjit.h
parent486b97f297eb20c5b72140ea257ff63143a69ab7 (diff)
downloadgcc-ccce3b2ac3c9352501278d36b3c79f049234870b.zip
gcc-ccce3b2ac3c9352501278d36b3c79f049234870b.tar.gz
gcc-ccce3b2ac3c9352501278d36b3c79f049234870b.tar.bz2
New jit API entrypoint: gcc_jit_context_new_rvalue_from_long
gcc/jit/ChangeLog: * docs/cp/topics/expressions.rst (Simple expressions): Use ":c:type:" for C types. Document new overload of gcc::jit::context::new_rvalue. * docs/topics/expressions.rst (Simple expressions): Use ":c:type:" for C types. Document new entrypoint gcc_jit_context_new_rvalue_from_long. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-playback.c: Within namespace gcc::jit::playback... (context::new_rvalue_from_int): Eliminate in favor of... (context::new_rvalue_from_const <int>): ...this. (context::new_rvalue_from_double): Eliminate in favor of... (context::new_rvalue_from_const <double>): ...this. (context::new_rvalue_from_const <long>): New. (context::new_rvalue_from_ptr): Eliminate in favor of... (context::new_rvalue_from_const <void *>): ...this. * jit-playback.h: Within namespace gcc::jit::playback... (context::new_rvalue_from_int): Eliminate in favor of... (context::new_rvalue_from_const <HOST_TYPE>): ...this. (context::new_rvalue_from_double): Likewise. (context::new_rvalue_from_ptr): Likewise. * jit-recording.c: Within namespace gcc::jit::recording... (context::new_rvalue_from_int): Eliminate. (context::new_rvalue_from_double): Likewise. (context::new_rvalue_from_ptr): Likewise. (class memento_of_new_rvalue_from_const <int>): Add explicit specialization. (class memento_of_new_rvalue_from_const <long>): Likewise. (class memento_of_new_rvalue_from_const <double>): Likewise. (class memento_of_new_rvalue_from_const <void *>): Likewise. (memento_of_new_rvalue_from_int::replay_into): Generalize into... (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into): ...this... (memento_of_new_rvalue_from_double::replay_into): ...allowing this... (memento_of_new_rvalue_from_ptr::replay_into): ...and this to be deleted. (memento_of_new_rvalue_from_int::make_debug_string): Convert to... (memento_of_new_rvalue_from_const <int>::make_debug_string): ...this. (memento_of_new_rvalue_from_double::make_debug_string): Convert to... (memento_of_new_rvalue_from_const <double>::make_debug_string): ...this. (memento_of_new_rvalue_from_ptr::make_debug_string) Convert to... (memento_of_new_rvalue_from_const <void *>::make_debug_string): ...this. (memento_of_new_rvalue_from_const <long>::make_debug_string): New function. * jit-recording.h: Within namespace gcc::jit::recording... (context::new_rvalue_from_int): Eliminate. (context::new_rvalue_from_double): Likewise. (context::new_rvalue_from_ptr): Likewise, all in favor of... (context::new_rvalue_from_const <HOST_TYPE>): New family of methods. (class memento_of_new_rvalue_from_int): Eliminate. (class memento_of_new_rvalue_from_double): Likewise. (class memento_of_new_rvalue_from_ptr): Likewise. (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family of rvalue subclasses. * libgccjit++.h (gccjit::context::new_rvalue): New overload, for "long". * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for rewriting of recording::context::new_rvalue_from_int to recording::context::new_rvalue_from_const <int>. (gcc_jit_context_new_rvalue_from_long): New API entrypoint. (gcc_jit_context_new_rvalue_from_double): Update for rewriting of recording::context::new_rvalue_from_double to recording::context::new_rvalue_from_const <double>. (gcc_jit_context_new_rvalue_from_ptr): Update for rewriting of recording::context::new_rvalue_from_ptr to recording::context::new_rvalue_from_const <void *>. * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API entrypoint. * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise. gcc/testsuite/ChangeLog: * jit.dg/all-non-failing-tests.h: Add test-constants.c. * jit.dg/test-combination.c (create_code): Likewise. (verify_code): Likewise. * jit.dg/test-constants.c: New test case. * jit.dg/test-threads.c: Add test-constants.c. From-SVN: r219401
Diffstat (limited to 'gcc/jit/libgccjit.h')
-rw-r--r--gcc/jit/libgccjit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
index 70f26ba..92eed37 100644
--- a/gcc/jit/libgccjit.h
+++ b/gcc/jit/libgccjit.h
@@ -633,6 +633,11 @@ gcc_jit_context_new_rvalue_from_int (gcc_jit_context *ctxt,
int value);
extern gcc_jit_rvalue *
+gcc_jit_context_new_rvalue_from_long (gcc_jit_context *ctxt,
+ gcc_jit_type *numeric_type,
+ long value);
+
+extern gcc_jit_rvalue *
gcc_jit_context_zero (gcc_jit_context *ctxt,
gcc_jit_type *numeric_type);