diff options
author | Antoni Boucher <bouanto@zoho.com> | 2022-04-12 17:20:30 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-04-12 17:20:30 -0400 |
commit | 5780ff348ad4430383fd67c6f0c572d8c3e721ad (patch) | |
tree | 311284f0fbd68d5886a3e3b0843026fa09517828 /gcc/jit | |
parent | 30f7c83e9cfe7c015448d72f63c4c39d14bc6de6 (diff) | |
download | gcc-5780ff348ad4430383fd67c6f0c572d8c3e721ad.zip gcc-5780ff348ad4430383fd67c6f0c572d8c3e721ad.tar.gz gcc-5780ff348ad4430383fd67c6f0c572d8c3e721ad.tar.bz2 |
libgccjit: Add support for register variables [PR104072]
gcc/jit/
PR jit/104072
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
* docs/topics/expressions.rst: Add documentation for the
function gcc_jit_lvalue_set_register_name.
* jit-playback.h: New function (set_register_name).
* jit-recording.cc: New function (set_register_name) and add
support for register variables.
* jit-recording.h: New field (m_reg_name) and new function
(set_register_name).
* libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
* libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
* libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
gcc/
PR jit/104072
* reginfo.cc: New functions (clear_global_regs_cache,
reginfo_cc_finalize) to avoid an issue where compiling the same
code multiple times gives an error about assigning the same
register to 2 global variables.
* rtl.h: New function (reginfo_cc_finalize).
* toplev.cc: Call it.
gcc/testsuite/
PR jit/104072
* jit.dg/all-non-failing-tests.h: Add new
test-register-variable.
* jit.dg/harness.h: Add -fdiagnostics-color=never to context's
command-line options.
* jit.dg/test-error-register-variable-bad-name.c: New test.
* jit.dg/test-error-register-variable-size-mismatch.c: New test.
* jit.dg/test-register-variable.c: New test.
Diffstat (limited to 'gcc/jit')
-rw-r--r-- | gcc/jit/docs/_build/texinfo/libgccjit.texi | 1258 | ||||
-rw-r--r-- | gcc/jit/docs/topics/compatibility.rst | 9 | ||||
-rw-r--r-- | gcc/jit/docs/topics/expressions.rst | 20 | ||||
-rw-r--r-- | gcc/jit/jit-playback.h | 9 | ||||
-rw-r--r-- | gcc/jit/jit-recording.cc | 18 | ||||
-rw-r--r-- | gcc/jit/jit-recording.h | 9 | ||||
-rw-r--r-- | gcc/jit/libgccjit.cc | 14 | ||||
-rw-r--r-- | gcc/jit/libgccjit.h | 12 | ||||
-rw-r--r-- | gcc/jit/libgccjit.map | 5 |
9 files changed, 739 insertions, 615 deletions
diff --git a/gcc/jit/docs/_build/texinfo/libgccjit.texi b/gcc/jit/docs/_build/texinfo/libgccjit.texi index e5759eb..4c92b8a 100644 --- a/gcc/jit/docs/_build/texinfo/libgccjit.texi +++ b/gcc/jit/docs/_build/texinfo/libgccjit.texi @@ -262,6 +262,7 @@ ABI symbol tags * LIBGCCJIT_ABI_19:: * LIBGCCJIT_ABI_20:: * LIBGCCJIT_ABI_21:: +* LIBGCCJIT_ABI_22:: Performance @@ -7302,18 +7303,38 @@ its presence using @end example @end deffn + +@deffn {C Function} void gcc_jit_lvalue_set_register_name (gcc_jit_lvalue *lvalue, const char *reg_name); + +Set the register name of a variable. +The parameter @code{reg_name} must be non-NULL. Analogous to: + +@example +register int variable asm ("r12"); +@end example + +in C. + +This entrypoint was added in @ref{ee,,LIBGCCJIT_ABI_22}; you can test for +its presence using + +@example +#ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_register_name +@end example +@end deffn + @menu * Global variables:: @end menu @node Global variables,,,Lvalues -@anchor{topics/expressions global-variables}@anchor{ee} +@anchor{topics/expressions global-variables}@anchor{ef} @subsubsection Global variables @geindex gcc_jit_context_new_global (C function) -@anchor{topics/expressions c gcc_jit_context_new_global}@anchor{ef} +@anchor{topics/expressions c gcc_jit_context_new_global}@anchor{f0} @deffn {C Function} gcc_jit_lvalue * gcc_jit_context_new_global (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, enum gcc_jit_global_kind@w{ }kind, gcc_jit_type@w{ }*type, const char@w{ }*name) Add a new global variable of the given type and name to the context. @@ -7328,22 +7349,22 @@ The “kind” parameter determines the visibility of the “global” outside of the @ref{16,,gcc_jit_result}: @geindex gcc_jit_global_kind (C type) -@anchor{topics/expressions c gcc_jit_global_kind}@anchor{f0} +@anchor{topics/expressions c gcc_jit_global_kind}@anchor{f1} @deffn {C Type} enum gcc_jit_global_kind @end deffn @geindex GCC_JIT_GLOBAL_EXPORTED (C macro) -@anchor{topics/expressions c GCC_JIT_GLOBAL_EXPORTED}@anchor{f1} +@anchor{topics/expressions c GCC_JIT_GLOBAL_EXPORTED}@anchor{f2} @deffn {C Macro} GCC_JIT_GLOBAL_EXPORTED Global is defined by the client code and is visible by name outside of this JIT context via -@ref{f2,,gcc_jit_result_get_global()} (and this value is required for +@ref{f3,,gcc_jit_result_get_global()} (and this value is required for the global to be accessible via that entrypoint). @end deffn @geindex GCC_JIT_GLOBAL_INTERNAL (C macro) -@anchor{topics/expressions c GCC_JIT_GLOBAL_INTERNAL}@anchor{f3} +@anchor{topics/expressions c GCC_JIT_GLOBAL_INTERNAL}@anchor{f4} @deffn {C Macro} GCC_JIT_GLOBAL_INTERNAL Global is defined by the client code, but is invisible @@ -7353,7 +7374,7 @@ context and within child contexts. @end deffn @geindex GCC_JIT_GLOBAL_IMPORTED (C macro) -@anchor{topics/expressions c GCC_JIT_GLOBAL_IMPORTED}@anchor{f4} +@anchor{topics/expressions c GCC_JIT_GLOBAL_IMPORTED}@anchor{f5} @deffn {C Macro} GCC_JIT_GLOBAL_IMPORTED Global is not defined by the client code; we’re merely @@ -7363,7 +7384,7 @@ header file. @end deffn @geindex gcc_jit_global_set_initializer (C function) -@anchor{topics/expressions c gcc_jit_global_set_initializer}@anchor{f5} +@anchor{topics/expressions c gcc_jit_global_set_initializer}@anchor{f6} @deffn {C Function} gcc_jit_lvalue * gcc_jit_global_set_initializer (gcc_jit_lvalue@w{ }*global, const void@w{ }*blob, size_t@w{ }num_bytes) Set an initializer for @code{global} using the memory content pointed @@ -7375,7 +7396,7 @@ pointed by @code{blob} for @code{num_bytes} bytes, so it is valid to pass in a pointer to an on-stack buffer. The content will be stored in the compilation unit and used as initialization value of the array. -This entrypoint was added in @ref{f6,,LIBGCCJIT_ABI_14}; you can test for +This entrypoint was added in @ref{f7,,LIBGCCJIT_ABI_14}; you can test for its presence using @example @@ -7391,7 +7412,7 @@ Set the initial value of a global with an rvalue. The rvalue needs to be a constant expression, e.g. no function calls. -The global can’t have the @code{kind} @ref{f4,,GCC_JIT_GLOBAL_IMPORTED}. +The global can’t have the @code{kind} @ref{f5,,GCC_JIT_GLOBAL_IMPORTED}. As a non-comprehensive example it is OK to do the equivalent of: @@ -7418,12 +7439,12 @@ presence using: @end deffn @node Working with pointers structs and unions,,Lvalues,Expressions -@anchor{topics/expressions working-with-pointers-structs-and-unions}@anchor{f7} +@anchor{topics/expressions working-with-pointers-structs-and-unions}@anchor{f8} @subsection Working with pointers, structs and unions @geindex gcc_jit_rvalue_dereference (C function) -@anchor{topics/expressions c gcc_jit_rvalue_dereference}@anchor{f8} +@anchor{topics/expressions c gcc_jit_rvalue_dereference}@anchor{f9} @deffn {C Function} gcc_jit_lvalue * gcc_jit_rvalue_dereference (gcc_jit_rvalue@w{ }*rvalue, gcc_jit_location@w{ }*loc) Given an rvalue of pointer type @code{T *}, dereferencing the pointer, @@ -7439,7 +7460,7 @@ in C. Field access is provided separately for both lvalues and rvalues. @geindex gcc_jit_lvalue_access_field (C function) -@anchor{topics/expressions c gcc_jit_lvalue_access_field}@anchor{f9} +@anchor{topics/expressions c gcc_jit_lvalue_access_field}@anchor{fa} @deffn {C Function} gcc_jit_lvalue * gcc_jit_lvalue_access_field (gcc_jit_lvalue@w{ }*struct_, gcc_jit_location@w{ }*loc, gcc_jit_field@w{ }*field) Given an lvalue of struct or union type, access the given field, @@ -7453,7 +7474,7 @@ in C. @end deffn @geindex gcc_jit_rvalue_access_field (C function) -@anchor{topics/expressions c gcc_jit_rvalue_access_field}@anchor{fa} +@anchor{topics/expressions c gcc_jit_rvalue_access_field}@anchor{fb} @deffn {C Function} gcc_jit_rvalue * gcc_jit_rvalue_access_field (gcc_jit_rvalue@w{ }*struct_, gcc_jit_location@w{ }*loc, gcc_jit_field@w{ }*field) Given an rvalue of struct or union type, access the given field @@ -7467,7 +7488,7 @@ in C. @end deffn @geindex gcc_jit_rvalue_dereference_field (C function) -@anchor{topics/expressions c gcc_jit_rvalue_dereference_field}@anchor{fb} +@anchor{topics/expressions c gcc_jit_rvalue_dereference_field}@anchor{fc} @deffn {C Function} gcc_jit_lvalue * gcc_jit_rvalue_dereference_field (gcc_jit_rvalue@w{ }*ptr, gcc_jit_location@w{ }*loc, gcc_jit_field@w{ }*field) Given an rvalue of pointer type @code{T *} where T is of struct or union @@ -7514,7 +7535,7 @@ in C (or, indeed, to @code{PTR + INDEX}). @c <https://www.gnu.org/licenses/>. @node Creating and using functions,Function pointers<2>,Expressions,Topic Reference -@anchor{topics/functions doc}@anchor{fc}@anchor{topics/functions creating-and-using-functions}@anchor{fd} +@anchor{topics/functions doc}@anchor{fd}@anchor{topics/functions creating-and-using-functions}@anchor{fe} @section Creating and using functions @@ -7527,7 +7548,7 @@ in C (or, indeed, to @code{PTR + INDEX}). @end menu @node Params,Functions,,Creating and using functions -@anchor{topics/functions params}@anchor{fe} +@anchor{topics/functions params}@anchor{ff} @subsection Params @@ -7556,28 +7577,28 @@ Parameters are lvalues, and thus are also rvalues (and objects), so the following upcasts are available: @geindex gcc_jit_param_as_lvalue (C function) -@anchor{topics/functions c gcc_jit_param_as_lvalue}@anchor{ff} +@anchor{topics/functions c gcc_jit_param_as_lvalue}@anchor{100} @deffn {C Function} gcc_jit_lvalue * gcc_jit_param_as_lvalue (gcc_jit_param@w{ }*param) Upcasting from param to lvalue. @end deffn @geindex gcc_jit_param_as_rvalue (C function) -@anchor{topics/functions c gcc_jit_param_as_rvalue}@anchor{100} +@anchor{topics/functions c gcc_jit_param_as_rvalue}@anchor{101} @deffn {C Function} gcc_jit_rvalue * gcc_jit_param_as_rvalue (gcc_jit_param@w{ }*param) Upcasting from param to rvalue. @end deffn @geindex gcc_jit_param_as_object (C function) -@anchor{topics/functions c gcc_jit_param_as_object}@anchor{101} +@anchor{topics/functions c gcc_jit_param_as_object}@anchor{102} @deffn {C Function} gcc_jit_object * gcc_jit_param_as_object (gcc_jit_param@w{ }*param) Upcasting from param to object. @end deffn @node Functions,Blocks,Params,Creating and using functions -@anchor{topics/functions functions}@anchor{102} +@anchor{topics/functions functions}@anchor{103} @subsection Functions @@ -7596,7 +7617,7 @@ creating ourselves, or one that we’re referencing. Create a gcc_jit_function with the given name and parameters. @geindex gcc_jit_function_kind (C type) -@anchor{topics/functions c gcc_jit_function_kind}@anchor{103} +@anchor{topics/functions c gcc_jit_function_kind}@anchor{104} @deffn {C Type} enum gcc_jit_function_kind @end deffn @@ -7606,7 +7627,7 @@ values: @quotation @geindex GCC_JIT_FUNCTION_EXPORTED (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_EXPORTED}@anchor{104} +@anchor{topics/functions c GCC_JIT_FUNCTION_EXPORTED}@anchor{105} @deffn {C Macro} GCC_JIT_FUNCTION_EXPORTED Function is defined by the client code and visible @@ -7618,7 +7639,7 @@ for this function from a @ref{16,,gcc_jit_result} via @end deffn @geindex GCC_JIT_FUNCTION_INTERNAL (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_INTERNAL}@anchor{105} +@anchor{topics/functions c GCC_JIT_FUNCTION_INTERNAL}@anchor{106} @deffn {C Macro} GCC_JIT_FUNCTION_INTERNAL Function is defined by the client code, but is invisible @@ -7626,7 +7647,7 @@ outside of the JIT. Analogous to a “static” function. @end deffn @geindex GCC_JIT_FUNCTION_IMPORTED (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_IMPORTED}@anchor{106} +@anchor{topics/functions c GCC_JIT_FUNCTION_IMPORTED}@anchor{107} @deffn {C Macro} GCC_JIT_FUNCTION_IMPORTED Function is not defined by the client code; we’re merely @@ -7635,7 +7656,7 @@ header file. @end deffn @geindex GCC_JIT_FUNCTION_ALWAYS_INLINE (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_ALWAYS_INLINE}@anchor{107} +@anchor{topics/functions c GCC_JIT_FUNCTION_ALWAYS_INLINE}@anchor{108} @deffn {C Macro} GCC_JIT_FUNCTION_ALWAYS_INLINE Function is only ever inlined into other functions, and is @@ -7656,7 +7677,7 @@ buffer. @end deffn @geindex gcc_jit_context_get_builtin_function (C function) -@anchor{topics/functions c gcc_jit_context_get_builtin_function}@anchor{108} +@anchor{topics/functions c gcc_jit_context_get_builtin_function}@anchor{109} @deffn {C Function} gcc_jit_function * gcc_jit_context_get_builtin_function (gcc_jit_context@w{ }*ctxt, const char@w{ }*name) Get the @ref{29,,gcc_jit_function} for the built-in function with the @@ -7680,14 +7701,14 @@ the context. @end deffn @geindex gcc_jit_function_as_object (C function) -@anchor{topics/functions c gcc_jit_function_as_object}@anchor{109} +@anchor{topics/functions c gcc_jit_function_as_object}@anchor{10a} @deffn {C Function} gcc_jit_object * gcc_jit_function_as_object (gcc_jit_function@w{ }*func) Upcasting from function to object. @end deffn @geindex gcc_jit_function_get_param (C function) -@anchor{topics/functions c gcc_jit_function_get_param}@anchor{10a} +@anchor{topics/functions c gcc_jit_function_get_param}@anchor{10b} @deffn {C Function} gcc_jit_param * gcc_jit_function_get_param (gcc_jit_function@w{ }*func, int@w{ }index) Get the param of the given index (0-based). @@ -7715,14 +7736,14 @@ buffer. @end deffn @geindex gcc_jit_function_get_param_count (C function) -@anchor{topics/functions c gcc_jit_function_get_param_count}@anchor{10b} +@anchor{topics/functions c gcc_jit_function_get_param_count}@anchor{10c} @deffn {C Function} size_t gcc_jit_function_get_param_count (gcc_jit_function@w{ }*func) Get the number of parameters of the function. @end deffn @geindex gcc_jit_function_get_return_type (C function) -@anchor{topics/functions c gcc_jit_function_get_return_type}@anchor{10c} +@anchor{topics/functions c gcc_jit_function_get_return_type}@anchor{10d} @deffn {C Function} gcc_jit_type * gcc_jit_function_get_return_type (gcc_jit_function@w{ }*func) Get the return type of the function. @@ -7736,10 +7757,10 @@ types: @itemize * @item -@ref{10c,,gcc_jit_function_get_return_type()} +@ref{10d,,gcc_jit_function_get_return_type()} @item -@ref{10b,,gcc_jit_function_get_param_count()} +@ref{10c,,gcc_jit_function_get_param_count()} @end itemize @end quotation @@ -7751,13 +7772,13 @@ using @end example @geindex gcc_jit_case (C type) -@anchor{topics/functions c gcc_jit_case}@anchor{10d} +@anchor{topics/functions c gcc_jit_case}@anchor{10e} @deffn {C Type} gcc_jit_case @end deffn @end deffn @node Blocks,Statements,Functions,Creating and using functions -@anchor{topics/functions blocks}@anchor{10e} +@anchor{topics/functions blocks}@anchor{10f} @subsection Blocks @@ -7781,7 +7802,7 @@ one function. @end deffn @geindex gcc_jit_function_new_block (C function) -@anchor{topics/functions c gcc_jit_function_new_block}@anchor{10f} +@anchor{topics/functions c gcc_jit_function_new_block}@anchor{110} @deffn {C Function} gcc_jit_block * gcc_jit_function_new_block (gcc_jit_function@w{ }*func, const char@w{ }*name) Create a basic block of the given name. The name may be NULL, but @@ -7801,21 +7822,21 @@ for (pc = 0; pc < fn->fn_num_ops; pc++) @end deffn @geindex gcc_jit_block_as_object (C function) -@anchor{topics/functions c gcc_jit_block_as_object}@anchor{110} +@anchor{topics/functions c gcc_jit_block_as_object}@anchor{111} @deffn {C Function} gcc_jit_object * gcc_jit_block_as_object (gcc_jit_block@w{ }*block) Upcast from block to object. @end deffn @geindex gcc_jit_block_get_function (C function) -@anchor{topics/functions c gcc_jit_block_get_function}@anchor{111} +@anchor{topics/functions c gcc_jit_block_get_function}@anchor{112} @deffn {C Function} gcc_jit_function * gcc_jit_block_get_function (gcc_jit_block@w{ }*block) Which function is this block within? @end deffn @node Statements,,Blocks,Creating and using functions -@anchor{topics/functions statements}@anchor{112} +@anchor{topics/functions statements}@anchor{113} @subsection Statements @@ -7917,7 +7938,7 @@ block, boolval, on_true, and on_false must be non-NULL. @end deffn @geindex gcc_jit_block_end_with_jump (C function) -@anchor{topics/functions c gcc_jit_block_end_with_jump}@anchor{113} +@anchor{topics/functions c gcc_jit_block_end_with_jump}@anchor{114} @deffn {C Function} void gcc_jit_block_end_with_jump (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, gcc_jit_block@w{ }*target) Terminate a block by adding a jump to the given target block. @@ -7930,7 +7951,7 @@ goto target; @end deffn @geindex gcc_jit_block_end_with_return (C function) -@anchor{topics/functions c gcc_jit_block_end_with_return}@anchor{114} +@anchor{topics/functions c gcc_jit_block_end_with_return}@anchor{115} @deffn {C Function} void gcc_jit_block_end_with_return (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*rvalue) Terminate a block by adding evaluation of an rvalue, returning the value. @@ -7943,7 +7964,7 @@ return expression; @end deffn @geindex gcc_jit_block_end_with_void_return (C function) -@anchor{topics/functions c gcc_jit_block_end_with_void_return}@anchor{115} +@anchor{topics/functions c gcc_jit_block_end_with_void_return}@anchor{116} @deffn {C Function} void gcc_jit_block_end_with_void_return (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc) Terminate a block by adding a valueless return, for use within a function @@ -7957,7 +7978,7 @@ return; @end deffn @geindex gcc_jit_block_end_with_switch (C function) -@anchor{topics/functions c gcc_jit_block_end_with_switch}@anchor{116} +@anchor{topics/functions c gcc_jit_block_end_with_switch}@anchor{117} @deffn {C Function} void gcc_jit_block_end_with_switch (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*expr, gcc_jit_block@w{ }*default_block, int@w{ }num_cases, gcc_jit_case@w{ }**cases) Terminate a block by adding evalation of an rvalue, then performing @@ -8003,17 +8024,17 @@ The API entrypoints relating to switch statements and cases: @itemize * @item -@ref{116,,gcc_jit_block_end_with_switch()} +@ref{117,,gcc_jit_block_end_with_switch()} @item -@ref{117,,gcc_jit_case_as_object()} +@ref{118,,gcc_jit_case_as_object()} @item -@ref{118,,gcc_jit_context_new_case()} +@ref{119,,gcc_jit_context_new_case()} @end itemize @end quotation -were added in @ref{119,,LIBGCCJIT_ABI_3}; you can test for their presence +were added in @ref{11a,,LIBGCCJIT_ABI_3}; you can test for their presence using @example @@ -8027,14 +8048,14 @@ using A @cite{gcc_jit_case} represents a case within a switch statement, and is created within a particular @ref{8,,gcc_jit_context} using -@ref{118,,gcc_jit_context_new_case()}. +@ref{119,,gcc_jit_context_new_case()}. Each case expresses a multivalued range of integer values. You can express single-valued cases by passing in the same value for both @cite{min_value} and @cite{max_value}. @geindex gcc_jit_context_new_case (C function) -@anchor{topics/functions c gcc_jit_context_new_case}@anchor{118} +@anchor{topics/functions c gcc_jit_context_new_case}@anchor{119} @deffn {C Function} gcc_jit_case * gcc_jit_context_new_case (gcc_jit_context@w{ }*ctxt, gcc_jit_rvalue@w{ }*min_value, gcc_jit_rvalue@w{ }*max_value, gcc_jit_block@w{ }*dest_block) Create a new gcc_jit_case instance for use in a switch statement. @@ -8046,7 +8067,7 @@ statement. @end deffn @geindex gcc_jit_case_as_object (C function) -@anchor{topics/functions c gcc_jit_case_as_object}@anchor{117} +@anchor{topics/functions c gcc_jit_case_as_object}@anchor{118} @deffn {C Function} gcc_jit_object * gcc_jit_case_as_object (gcc_jit_case@w{ }*case_) Upcast from a case to an object. @@ -8160,7 +8181,7 @@ create_code (gcc_jit_context *ctxt, void *user_data) @end quotation @end deffn -See also @ref{11a,,gcc_jit_extended_asm} for entrypoints for adding inline +See also @ref{11b,,gcc_jit_extended_asm} for entrypoints for adding inline assembler statements to a function. @c Copyright (C) 2017-2022 Free Software Foundation, Inc. @@ -8181,7 +8202,7 @@ assembler statements to a function. @c <https://www.gnu.org/licenses/>. @node Function pointers<2>,Source Locations,Creating and using functions,Topic Reference -@anchor{topics/function-pointers doc}@anchor{11b}@anchor{topics/function-pointers function-pointers}@anchor{11c} +@anchor{topics/function-pointers doc}@anchor{11c}@anchor{topics/function-pointers function-pointers}@anchor{11d} @section Function pointers @@ -8200,7 +8221,7 @@ via @ref{db,,gcc_jit_function_get_address()}. Get the address of a function as an rvalue, of function pointer type. -This entrypoint was added in @ref{11d,,LIBGCCJIT_ABI_9}; you can test +This entrypoint was added in @ref{11e,,LIBGCCJIT_ABI_9}; you can test for its presence using @example @@ -8262,7 +8283,7 @@ Each of @cite{param_types} must be non-@cite{void}; @cite{return_type} may be @c @c <https://www.gnu.org/licenses/>. @node Source Locations,Compiling a context,Function pointers<2>,Topic Reference -@anchor{topics/locations doc}@anchor{11e}@anchor{topics/locations source-locations}@anchor{11f} +@anchor{topics/locations doc}@anchor{11f}@anchor{topics/locations source-locations}@anchor{120} @section Source Locations @@ -8310,7 +8331,7 @@ on-stack buffer. @end menu @node Faking it,,,Source Locations -@anchor{topics/locations faking-it}@anchor{120} +@anchor{topics/locations faking-it}@anchor{121} @subsection Faking it @@ -8346,7 +8367,7 @@ file, giving you @emph{something} you can step through in the debugger. @c <https://www.gnu.org/licenses/>. @node Compiling a context,ABI and API compatibility,Source Locations,Topic Reference -@anchor{topics/compilation doc}@anchor{121}@anchor{topics/compilation compiling-a-context}@anchor{122} +@anchor{topics/compilation doc}@anchor{122}@anchor{topics/compilation compiling-a-context}@anchor{123} @section Compiling a context @@ -8365,7 +8386,7 @@ prevent any future compilation of that context. @end menu @node In-memory compilation,Ahead-of-time compilation,,Compiling a context -@anchor{topics/compilation in-memory-compilation}@anchor{123} +@anchor{topics/compilation in-memory-compilation}@anchor{124} @subsection In-memory compilation @@ -8400,7 +8421,7 @@ Functions are looked up by name. For this to succeed, a function with a name matching @cite{funcname} must have been created on @cite{result}’s context (or a parent context) via a call to @ref{11,,gcc_jit_context_new_function()} with @cite{kind} -@ref{104,,GCC_JIT_FUNCTION_EXPORTED}: +@ref{105,,GCC_JIT_FUNCTION_EXPORTED}: @example gcc_jit_context_new_function (ctxt, @@ -8428,7 +8449,7 @@ to a segmentation fault. @end deffn @geindex gcc_jit_result_get_global (C function) -@anchor{topics/compilation c gcc_jit_result_get_global}@anchor{f2} +@anchor{topics/compilation c gcc_jit_result_get_global}@anchor{f3} @deffn {C Function} void * gcc_jit_result_get_global (gcc_jit_result@w{ }*result, const char@w{ }*name) Locate a given global within the built machine code. @@ -8436,8 +8457,8 @@ Locate a given global within the built machine code. Globals are looked up by name. For this to succeed, a global with a name matching @cite{name} must have been created on @cite{result}’s context (or a parent context) via a call to -@ref{ef,,gcc_jit_context_new_global()} with @cite{kind} -@ref{f1,,GCC_JIT_GLOBAL_EXPORTED}. +@ref{f0,,gcc_jit_context_new_global()} with @cite{kind} +@ref{f2,,GCC_JIT_GLOBAL_EXPORTED}. If the global is found, the result will need to be cast to a pointer of the correct type before it can be called. @@ -8481,11 +8502,11 @@ Once we’re done with the code, this unloads the built .so file. This cleans up the result; after calling this, it’s no longer valid to use the result, or any code or globals that were obtained by calling @ref{17,,gcc_jit_result_get_code()} or -@ref{f2,,gcc_jit_result_get_global()} on it. +@ref{f3,,gcc_jit_result_get_global()} on it. @end deffn @node Ahead-of-time compilation,,In-memory compilation,Compiling a context -@anchor{topics/compilation ahead-of-time-compilation}@anchor{124} +@anchor{topics/compilation ahead-of-time-compilation}@anchor{125} @subsection Ahead-of-time compilation @@ -8516,7 +8537,7 @@ suffix of the output file when determining what to do. @end cartouche @geindex gcc_jit_output_kind (C type) -@anchor{topics/compilation c gcc_jit_output_kind}@anchor{125} +@anchor{topics/compilation c gcc_jit_output_kind}@anchor{126} @deffn {C Type} enum gcc_jit_output_kind @end deffn @@ -8534,7 +8555,7 @@ Typical suffix @item -@ref{126,,GCC_JIT_OUTPUT_KIND_ASSEMBLER} +@ref{127,,GCC_JIT_OUTPUT_KIND_ASSEMBLER} @tab @@ -8542,7 +8563,7 @@ Typical suffix @item -@ref{127,,GCC_JIT_OUTPUT_KIND_OBJECT_FILE} +@ref{128,,GCC_JIT_OUTPUT_KIND_OBJECT_FILE} @tab @@ -8550,7 +8571,7 @@ Typical suffix @item -@ref{128,,GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY} +@ref{129,,GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY} @tab @@ -8558,7 +8579,7 @@ Typical suffix @item -@ref{129,,GCC_JIT_OUTPUT_KIND_EXECUTABLE} +@ref{12a,,GCC_JIT_OUTPUT_KIND_EXECUTABLE} @tab @@ -8568,28 +8589,28 @@ None, or .exe @geindex GCC_JIT_OUTPUT_KIND_ASSEMBLER (C macro) -@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_ASSEMBLER}@anchor{126} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_ASSEMBLER}@anchor{127} @deffn {C Macro} GCC_JIT_OUTPUT_KIND_ASSEMBLER Compile the context to an assembler file. @end deffn @geindex GCC_JIT_OUTPUT_KIND_OBJECT_FILE (C macro) -@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_OBJECT_FILE}@anchor{127} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_OBJECT_FILE}@anchor{128} @deffn {C Macro} GCC_JIT_OUTPUT_KIND_OBJECT_FILE Compile the context to an object file. @end deffn @geindex GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY (C macro) -@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY}@anchor{128} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY}@anchor{129} @deffn {C Macro} GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY Compile the context to a dynamic library. @end deffn @geindex GCC_JIT_OUTPUT_KIND_EXECUTABLE (C macro) -@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_EXECUTABLE}@anchor{129} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_EXECUTABLE}@anchor{12a} @deffn {C Macro} GCC_JIT_OUTPUT_KIND_EXECUTABLE Compile the context to an executable. @@ -8613,7 +8634,7 @@ Compile the context to an executable. @c <https://www.gnu.org/licenses/>. @node ABI and API compatibility,Performance,Compiling a context,Topic Reference -@anchor{topics/compatibility doc}@anchor{12a}@anchor{topics/compatibility abi-and-api-compatibility}@anchor{12b} +@anchor{topics/compatibility doc}@anchor{12b}@anchor{topics/compatibility abi-and-api-compatibility}@anchor{12c} @section ABI and API compatibility @@ -8669,21 +8690,21 @@ Version definitions: @end menu @node Programmatically checking version,ABI symbol tags,,ABI and API compatibility -@anchor{topics/compatibility programmatically-checking-version}@anchor{12c} +@anchor{topics/compatibility programmatically-checking-version}@anchor{12d} @subsection Programmatically checking version Client code can programmatically check libgccjit version using: @geindex gcc_jit_version_major (C function) -@anchor{topics/compatibility c gcc_jit_version_major}@anchor{12d} +@anchor{topics/compatibility c gcc_jit_version_major}@anchor{12e} @deffn {C Function} int gcc_jit_version_major (void) Return libgccjit major version. This is analogous to __GNUC__ in C code. @end deffn @geindex gcc_jit_version_minor (C function) -@anchor{topics/compatibility c gcc_jit_version_minor}@anchor{12e} +@anchor{topics/compatibility c gcc_jit_version_minor}@anchor{12f} @deffn {C Function} int gcc_jit_version_minor (void) Return libgccjit minor version. This is analogous to @@ -8691,7 +8712,7 @@ __GNUC_MINOR__ in C code. @end deffn @geindex gcc_jit_version_patchlevel (C function) -@anchor{topics/compatibility c gcc_jit_version_patchlevel}@anchor{12f} +@anchor{topics/compatibility c gcc_jit_version_patchlevel}@anchor{130} @deffn {C Function} int gcc_jit_version_patchlevel (void) Return libgccjit patchlevel version. This is analogous to @@ -8706,7 +8727,7 @@ These entry points has been added with @code{LIBGCCJIT_ABI_13} @end cartouche @node ABI symbol tags,,Programmatically checking version,ABI and API compatibility -@anchor{topics/compatibility abi-symbol-tags}@anchor{130} +@anchor{topics/compatibility abi-symbol-tags}@anchor{131} @subsection ABI symbol tags @@ -8737,11 +8758,12 @@ Newer releases use the following tags. * LIBGCCJIT_ABI_19:: * LIBGCCJIT_ABI_20:: * LIBGCCJIT_ABI_21:: +* LIBGCCJIT_ABI_22:: @end menu @node LIBGCCJIT_ABI_0,LIBGCCJIT_ABI_1,,ABI symbol tags -@anchor{topics/compatibility id1}@anchor{131}@anchor{topics/compatibility libgccjit-abi-0}@anchor{132} +@anchor{topics/compatibility id1}@anchor{132}@anchor{topics/compatibility libgccjit-abi-0}@anchor{133} @subsubsection @code{LIBGCCJIT_ABI_0} @@ -8753,7 +8775,7 @@ continue to work, with this being handled transparently by the linker (see this post@footnote{https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02126.html}) @node LIBGCCJIT_ABI_1,LIBGCCJIT_ABI_2,LIBGCCJIT_ABI_0,ABI symbol tags -@anchor{topics/compatibility id2}@anchor{133}@anchor{topics/compatibility libgccjit-abi-1}@anchor{73} +@anchor{topics/compatibility id2}@anchor{134}@anchor{topics/compatibility libgccjit-abi-1}@anchor{73} @subsubsection @code{LIBGCCJIT_ABI_1} @@ -8761,7 +8783,7 @@ continue to work, with this being handled transparently by the linker @ref{72,,gcc_jit_context_add_command_line_option()} @node LIBGCCJIT_ABI_2,LIBGCCJIT_ABI_3,LIBGCCJIT_ABI_1,ABI symbol tags -@anchor{topics/compatibility id3}@anchor{134}@anchor{topics/compatibility libgccjit-abi-2}@anchor{6c} +@anchor{topics/compatibility id3}@anchor{135}@anchor{topics/compatibility libgccjit-abi-2}@anchor{6c} @subsubsection @code{LIBGCCJIT_ABI_2} @@ -8769,7 +8791,7 @@ continue to work, with this being handled transparently by the linker @ref{6b,,gcc_jit_context_set_bool_allow_unreachable_blocks()} @node LIBGCCJIT_ABI_3,LIBGCCJIT_ABI_4,LIBGCCJIT_ABI_2,ABI symbol tags -@anchor{topics/compatibility id4}@anchor{135}@anchor{topics/compatibility libgccjit-abi-3}@anchor{119} +@anchor{topics/compatibility id4}@anchor{136}@anchor{topics/compatibility libgccjit-abi-3}@anchor{11a} @subsubsection @code{LIBGCCJIT_ABI_3} @@ -8782,18 +8804,18 @@ entrypoints: @itemize * @item -@ref{116,,gcc_jit_block_end_with_switch()} +@ref{117,,gcc_jit_block_end_with_switch()} @item -@ref{117,,gcc_jit_case_as_object()} +@ref{118,,gcc_jit_case_as_object()} @item -@ref{118,,gcc_jit_context_new_case()} +@ref{119,,gcc_jit_context_new_case()} @end itemize @end quotation @node LIBGCCJIT_ABI_4,LIBGCCJIT_ABI_5,LIBGCCJIT_ABI_3,ABI symbol tags -@anchor{topics/compatibility id5}@anchor{136}@anchor{topics/compatibility libgccjit-abi-4}@anchor{137} +@anchor{topics/compatibility id5}@anchor{137}@anchor{topics/compatibility libgccjit-abi-4}@anchor{138} @subsubsection @code{LIBGCCJIT_ABI_4} @@ -8806,30 +8828,30 @@ entrypoints: @itemize * @item -@ref{138,,gcc_jit_context_get_timer()} +@ref{139,,gcc_jit_context_get_timer()} @item -@ref{139,,gcc_jit_context_set_timer()} +@ref{13a,,gcc_jit_context_set_timer()} @item -@ref{13a,,gcc_jit_timer_new()} +@ref{13b,,gcc_jit_timer_new()} @item -@ref{13b,,gcc_jit_timer_release()} +@ref{13c,,gcc_jit_timer_release()} @item -@ref{13c,,gcc_jit_timer_push()} +@ref{13d,,gcc_jit_timer_push()} @item -@ref{13d,,gcc_jit_timer_pop()} +@ref{13e,,gcc_jit_timer_pop()} @item -@ref{13e,,gcc_jit_timer_print()} +@ref{13f,,gcc_jit_timer_print()} @end itemize @end quotation @node LIBGCCJIT_ABI_5,LIBGCCJIT_ABI_6,LIBGCCJIT_ABI_4,ABI symbol tags -@anchor{topics/compatibility id6}@anchor{13f}@anchor{topics/compatibility libgccjit-abi-5}@anchor{6e} +@anchor{topics/compatibility id6}@anchor{140}@anchor{topics/compatibility libgccjit-abi-5}@anchor{6e} @subsubsection @code{LIBGCCJIT_ABI_5} @@ -8837,7 +8859,7 @@ entrypoints: @ref{6d,,gcc_jit_context_set_bool_use_external_driver()} @node LIBGCCJIT_ABI_6,LIBGCCJIT_ABI_7,LIBGCCJIT_ABI_5,ABI symbol tags -@anchor{topics/compatibility id7}@anchor{140}@anchor{topics/compatibility libgccjit-abi-6}@anchor{d9} +@anchor{topics/compatibility id7}@anchor{141}@anchor{topics/compatibility libgccjit-abi-6}@anchor{d9} @subsubsection @code{LIBGCCJIT_ABI_6} @@ -8845,7 +8867,7 @@ entrypoints: @ref{d8,,gcc_jit_rvalue_set_bool_require_tail_call()} @node LIBGCCJIT_ABI_7,LIBGCCJIT_ABI_8,LIBGCCJIT_ABI_6,ABI symbol tags -@anchor{topics/compatibility id8}@anchor{141}@anchor{topics/compatibility libgccjit-abi-7}@anchor{83} +@anchor{topics/compatibility id8}@anchor{142}@anchor{topics/compatibility libgccjit-abi-7}@anchor{83} @subsubsection @code{LIBGCCJIT_ABI_7} @@ -8853,7 +8875,7 @@ entrypoints: @ref{82,,gcc_jit_type_get_aligned()} @node LIBGCCJIT_ABI_8,LIBGCCJIT_ABI_9,LIBGCCJIT_ABI_7,ABI symbol tags -@anchor{topics/compatibility id9}@anchor{142}@anchor{topics/compatibility libgccjit-abi-8}@anchor{86} +@anchor{topics/compatibility id9}@anchor{143}@anchor{topics/compatibility libgccjit-abi-8}@anchor{86} @subsubsection @code{LIBGCCJIT_ABI_8} @@ -8861,7 +8883,7 @@ entrypoints: @ref{85,,gcc_jit_type_get_vector()} @node LIBGCCJIT_ABI_9,LIBGCCJIT_ABI_10,LIBGCCJIT_ABI_8,ABI symbol tags -@anchor{topics/compatibility id10}@anchor{143}@anchor{topics/compatibility libgccjit-abi-9}@anchor{11d} +@anchor{topics/compatibility id10}@anchor{144}@anchor{topics/compatibility libgccjit-abi-9}@anchor{11e} @subsubsection @code{LIBGCCJIT_ABI_9} @@ -8869,7 +8891,7 @@ entrypoints: @ref{db,,gcc_jit_function_get_address()} @node LIBGCCJIT_ABI_10,LIBGCCJIT_ABI_11,LIBGCCJIT_ABI_9,ABI symbol tags -@anchor{topics/compatibility id11}@anchor{144}@anchor{topics/compatibility libgccjit-abi-10}@anchor{bb} +@anchor{topics/compatibility id11}@anchor{145}@anchor{topics/compatibility libgccjit-abi-10}@anchor{bb} @subsubsection @code{LIBGCCJIT_ABI_10} @@ -8877,7 +8899,7 @@ entrypoints: @ref{87,,gcc_jit_context_new_rvalue_from_vector()} @node LIBGCCJIT_ABI_11,LIBGCCJIT_ABI_12,LIBGCCJIT_ABI_10,ABI symbol tags -@anchor{topics/compatibility id12}@anchor{145}@anchor{topics/compatibility libgccjit-abi-11}@anchor{75} +@anchor{topics/compatibility id12}@anchor{146}@anchor{topics/compatibility libgccjit-abi-11}@anchor{75} @subsubsection @code{LIBGCCJIT_ABI_11} @@ -8885,7 +8907,7 @@ entrypoints: @ref{74,,gcc_jit_context_add_driver_option()} @node LIBGCCJIT_ABI_12,LIBGCCJIT_ABI_13,LIBGCCJIT_ABI_11,ABI symbol tags -@anchor{topics/compatibility id13}@anchor{146}@anchor{topics/compatibility libgccjit-abi-12}@anchor{8d} +@anchor{topics/compatibility id13}@anchor{147}@anchor{topics/compatibility libgccjit-abi-12}@anchor{8d} @subsubsection @code{LIBGCCJIT_ABI_12} @@ -8893,7 +8915,7 @@ entrypoints: @ref{8c,,gcc_jit_context_new_bitfield()} @node LIBGCCJIT_ABI_13,LIBGCCJIT_ABI_14,LIBGCCJIT_ABI_12,ABI symbol tags -@anchor{topics/compatibility id14}@anchor{147}@anchor{topics/compatibility libgccjit-abi-13}@anchor{148} +@anchor{topics/compatibility id14}@anchor{148}@anchor{topics/compatibility libgccjit-abi-13}@anchor{149} @subsubsection @code{LIBGCCJIT_ABI_13} @@ -8906,26 +8928,26 @@ entrypoints: @itemize * @item -@ref{12d,,gcc_jit_version_major()} +@ref{12e,,gcc_jit_version_major()} @item -@ref{12e,,gcc_jit_version_minor()} +@ref{12f,,gcc_jit_version_minor()} @item -@ref{12f,,gcc_jit_version_patchlevel()} +@ref{130,,gcc_jit_version_patchlevel()} @end itemize @end quotation @node LIBGCCJIT_ABI_14,LIBGCCJIT_ABI_15,LIBGCCJIT_ABI_13,ABI symbol tags -@anchor{topics/compatibility id15}@anchor{149}@anchor{topics/compatibility libgccjit-abi-14}@anchor{f6} +@anchor{topics/compatibility id15}@anchor{14a}@anchor{topics/compatibility libgccjit-abi-14}@anchor{f7} @subsubsection @code{LIBGCCJIT_ABI_14} @code{LIBGCCJIT_ABI_14} covers the addition of -@ref{f5,,gcc_jit_global_set_initializer()} +@ref{f6,,gcc_jit_global_set_initializer()} @node LIBGCCJIT_ABI_15,LIBGCCJIT_ABI_16,LIBGCCJIT_ABI_14,ABI symbol tags -@anchor{topics/compatibility id16}@anchor{14a}@anchor{topics/compatibility libgccjit-abi-15}@anchor{14b} +@anchor{topics/compatibility id16}@anchor{14b}@anchor{topics/compatibility libgccjit-abi-15}@anchor{14c} @subsubsection @code{LIBGCCJIT_ABI_15} @@ -8938,36 +8960,36 @@ embedding assembler instructions: @itemize * @item -@ref{14c,,gcc_jit_block_add_extended_asm()} +@ref{14d,,gcc_jit_block_add_extended_asm()} @item -@ref{14d,,gcc_jit_block_end_with_extended_asm_goto()} +@ref{14e,,gcc_jit_block_end_with_extended_asm_goto()} @item -@ref{14e,,gcc_jit_extended_asm_as_object()} +@ref{14f,,gcc_jit_extended_asm_as_object()} @item -@ref{14f,,gcc_jit_extended_asm_set_volatile_flag()} +@ref{150,,gcc_jit_extended_asm_set_volatile_flag()} @item -@ref{150,,gcc_jit_extended_asm_set_inline_flag()} +@ref{151,,gcc_jit_extended_asm_set_inline_flag()} @item -@ref{151,,gcc_jit_extended_asm_add_output_operand()} +@ref{152,,gcc_jit_extended_asm_add_output_operand()} @item -@ref{152,,gcc_jit_extended_asm_add_input_operand()} +@ref{153,,gcc_jit_extended_asm_add_input_operand()} @item -@ref{153,,gcc_jit_extended_asm_add_clobber()} +@ref{154,,gcc_jit_extended_asm_add_clobber()} @item -@ref{154,,gcc_jit_context_add_top_level_asm()} +@ref{155,,gcc_jit_context_add_top_level_asm()} @end itemize @end quotation @node LIBGCCJIT_ABI_16,LIBGCCJIT_ABI_17,LIBGCCJIT_ABI_15,ABI symbol tags -@anchor{topics/compatibility id17}@anchor{155}@anchor{topics/compatibility libgccjit-abi-16}@anchor{a6} +@anchor{topics/compatibility id17}@anchor{156}@anchor{topics/compatibility libgccjit-abi-16}@anchor{a6} @subsubsection @code{LIBGCCJIT_ABI_16} @@ -8980,10 +9002,10 @@ entrypoints: @itemize * @item -@ref{10c,,gcc_jit_function_get_return_type()} +@ref{10d,,gcc_jit_function_get_return_type()} @item -@ref{10b,,gcc_jit_function_get_param_count()} +@ref{10c,,gcc_jit_function_get_param_count()} @item @ref{97,,gcc_jit_type_dyncast_array()} @@ -9033,7 +9055,7 @@ entrypoints: @end quotation @node LIBGCCJIT_ABI_17,LIBGCCJIT_ABI_18,LIBGCCJIT_ABI_16,ABI symbol tags -@anchor{topics/compatibility id18}@anchor{156}@anchor{topics/compatibility libgccjit-abi-17}@anchor{eb} +@anchor{topics/compatibility id18}@anchor{157}@anchor{topics/compatibility libgccjit-abi-17}@anchor{eb} @subsubsection @code{LIBGCCJIT_ABI_17} @@ -9051,7 +9073,7 @@ thread-local storage model of a variable: @end quotation @node LIBGCCJIT_ABI_18,LIBGCCJIT_ABI_19,LIBGCCJIT_ABI_17,ABI symbol tags -@anchor{topics/compatibility id19}@anchor{157}@anchor{topics/compatibility libgccjit-abi-18}@anchor{ed} +@anchor{topics/compatibility id19}@anchor{158}@anchor{topics/compatibility libgccjit-abi-18}@anchor{ed} @subsubsection @code{LIBGCCJIT_ABI_18} @@ -9069,7 +9091,7 @@ section of a variable: @end quotation @node LIBGCCJIT_ABI_19,LIBGCCJIT_ABI_20,LIBGCCJIT_ABI_18,ABI symbol tags -@anchor{topics/compatibility id20}@anchor{158}@anchor{topics/compatibility libgccjit-abi-19}@anchor{b6} +@anchor{topics/compatibility id20}@anchor{159}@anchor{topics/compatibility libgccjit-abi-19}@anchor{b6} @subsubsection @code{LIBGCCJIT_ABI_19} @@ -9096,7 +9118,7 @@ of a global with an rvalue and to use constructors: @end quotation @node LIBGCCJIT_ABI_20,LIBGCCJIT_ABI_21,LIBGCCJIT_ABI_19,ABI symbol tags -@anchor{topics/compatibility id21}@anchor{159}@anchor{topics/compatibility libgccjit-abi-20}@anchor{a9} +@anchor{topics/compatibility id21}@anchor{15a}@anchor{topics/compatibility libgccjit-abi-20}@anchor{a9} @subsubsection @code{LIBGCCJIT_ABI_20} @@ -9146,8 +9168,8 @@ of a global with an rvalue and to use constructors: @end itemize @end quotation -@node LIBGCCJIT_ABI_21,,LIBGCCJIT_ABI_20,ABI symbol tags -@anchor{topics/compatibility id22}@anchor{15a}@anchor{topics/compatibility libgccjit-abi-21}@anchor{df} +@node LIBGCCJIT_ABI_21,LIBGCCJIT_ABI_22,LIBGCCJIT_ABI_20,ABI symbol tags +@anchor{topics/compatibility id22}@anchor{15b}@anchor{topics/compatibility libgccjit-abi-21}@anchor{df} @subsubsection @code{LIBGCCJIT_ABI_21} @@ -9164,6 +9186,24 @@ value from one type to another: @end itemize @end quotation +@node LIBGCCJIT_ABI_22,,LIBGCCJIT_ABI_21,ABI symbol tags +@anchor{topics/compatibility id23}@anchor{15c}@anchor{topics/compatibility libgccjit-abi-22}@anchor{ee} +@subsubsection @code{LIBGCCJIT_ABI_22} + + +@code{LIBGCCJIT_ABI_22} covers the addition of an API entrypoint to set the +register name of a variable: + +@quotation + + +@itemize * + +@item +@code{gcc_jit_lvalue_set_register_name()} +@end itemize +@end quotation + @c Copyright (C) 2015-2022 Free Software Foundation, Inc. @c Originally contributed by David Malcolm <dmalcolm@redhat.com> @c @@ -9182,7 +9222,7 @@ value from one type to another: @c <https://www.gnu.org/licenses/>. @node Performance,Using Assembly Language with libgccjit,ABI and API compatibility,Topic Reference -@anchor{topics/performance doc}@anchor{15b}@anchor{topics/performance performance}@anchor{15c} +@anchor{topics/performance doc}@anchor{15d}@anchor{topics/performance performance}@anchor{15e} @section Performance @@ -9192,14 +9232,14 @@ value from one type to another: @end menu @node The timing API,,,Performance -@anchor{topics/performance the-timing-api}@anchor{15d} +@anchor{topics/performance the-timing-api}@anchor{15f} @subsection The timing API As of GCC 6, libgccjit exposes a timing API, for printing reports on how long was spent in different parts of code. -You can create a @ref{15e,,gcc_jit_timer} instance, which will +You can create a @ref{160,,gcc_jit_timer} instance, which will measure time spent since its creation. The timer maintains a stack of “timer items”: as control flow moves through your code, you can push and pop named items relating to your code onto the stack, and the timer @@ -9297,7 +9337,7 @@ Client items: The exact format is intended to be human-readable, and is subject to change. @geindex LIBGCCJIT_HAVE_TIMING_API (C macro) -@anchor{topics/performance c LIBGCCJIT_HAVE_TIMING_API}@anchor{15f} +@anchor{topics/performance c LIBGCCJIT_HAVE_TIMING_API}@anchor{161} @deffn {C Macro} LIBGCCJIT_HAVE_TIMING_API The timer API was added to libgccjit in GCC 6. @@ -9314,21 +9354,21 @@ gcc_jit_context_set_timer (ctxt, t); @end deffn @geindex gcc_jit_timer (C type) -@anchor{topics/performance c gcc_jit_timer}@anchor{15e} +@anchor{topics/performance c gcc_jit_timer}@anchor{160} @deffn {C Type} gcc_jit_timer @end deffn @geindex gcc_jit_timer_new (C function) -@anchor{topics/performance c gcc_jit_timer_new}@anchor{13a} +@anchor{topics/performance c gcc_jit_timer_new}@anchor{13b} @deffn {C Function} gcc_jit_timer * gcc_jit_timer_new (void) -Create a @ref{15e,,gcc_jit_timer} instance, and start timing: +Create a @ref{160,,gcc_jit_timer} instance, and start timing: @example gcc_jit_timer *t = gcc_jit_timer_new (); @end example -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9337,10 +9377,10 @@ for its presence using @end deffn @geindex gcc_jit_timer_release (C function) -@anchor{topics/performance c gcc_jit_timer_release}@anchor{13b} +@anchor{topics/performance c gcc_jit_timer_release}@anchor{13c} @deffn {C Function} void gcc_jit_timer_release (gcc_jit_timer@w{ }*timer) -Release a @ref{15e,,gcc_jit_timer} instance: +Release a @ref{160,,gcc_jit_timer} instance: @example gcc_jit_timer_release (t); @@ -9348,7 +9388,7 @@ gcc_jit_timer_release (t); This should be called exactly once on a timer. -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9357,10 +9397,10 @@ for its presence using @end deffn @geindex gcc_jit_context_set_timer (C function) -@anchor{topics/performance c gcc_jit_context_set_timer}@anchor{139} +@anchor{topics/performance c gcc_jit_context_set_timer}@anchor{13a} @deffn {C Function} void gcc_jit_context_set_timer (gcc_jit_context@w{ }*ctxt, gcc_jit_timer@w{ }*timer) -Associate a @ref{15e,,gcc_jit_timer} instance with a context: +Associate a @ref{160,,gcc_jit_timer} instance with a context: @example gcc_jit_context_set_timer (ctxt, t); @@ -9373,7 +9413,7 @@ Timers have no locking, so if you have a multithreaded program, you must provide your own locks if more than one thread could be working with the same timer via timer-associated contexts. -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9382,12 +9422,12 @@ for its presence using @end deffn @geindex gcc_jit_context_get_timer (C function) -@anchor{topics/performance c gcc_jit_context_get_timer}@anchor{138} +@anchor{topics/performance c gcc_jit_context_get_timer}@anchor{139} @deffn {C Function} gcc_jit_timer *gcc_jit_context_get_timer (gcc_jit_context@w{ }*ctxt) Get the timer associated with a context (if any). -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9396,7 +9436,7 @@ for its presence using @end deffn @geindex gcc_jit_timer_push (C function) -@anchor{topics/performance c gcc_jit_timer_push}@anchor{13c} +@anchor{topics/performance c gcc_jit_timer_push}@anchor{13d} @deffn {C Function} void gcc_jit_timer_push (gcc_jit_timer@w{ }*timer, const char@w{ }*item_name) Push the given item onto the timer’s stack: @@ -9407,7 +9447,7 @@ run_the_code (ctxt, result); gcc_jit_timer_pop (t, "running code"); @end example -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9416,7 +9456,7 @@ for its presence using @end deffn @geindex gcc_jit_timer_pop (C function) -@anchor{topics/performance c gcc_jit_timer_pop}@anchor{13d} +@anchor{topics/performance c gcc_jit_timer_pop}@anchor{13e} @deffn {C Function} void gcc_jit_timer_pop (gcc_jit_timer@w{ }*timer, const char@w{ }*item_name) Pop the top item from the timer’s stack. @@ -9424,7 +9464,7 @@ Pop the top item from the timer’s stack. If “item_name” is provided, it must match that of the top item. Alternatively, @code{NULL} can be passed in, to suppress checking. -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9433,13 +9473,13 @@ for its presence using @end deffn @geindex gcc_jit_timer_print (C function) -@anchor{topics/performance c gcc_jit_timer_print}@anchor{13e} +@anchor{topics/performance c gcc_jit_timer_print}@anchor{13f} @deffn {C Function} void gcc_jit_timer_print (gcc_jit_timer@w{ }*timer, FILE@w{ }*f_out) Print timing information to the given stream about activity since the timer was started. -This API entrypoint was added in @ref{137,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{138,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9465,7 +9505,7 @@ for its presence using @c <https://www.gnu.org/licenses/>. @node Using Assembly Language with libgccjit,,Performance,Topic Reference -@anchor{topics/asm doc}@anchor{160}@anchor{topics/asm using-assembly-language-with-libgccjit}@anchor{161} +@anchor{topics/asm doc}@anchor{162}@anchor{topics/asm using-assembly-language-with-libgccjit}@anchor{163} @section Using Assembly Language with libgccjit @@ -9475,7 +9515,7 @@ following assumes a familiarity with that functionality. See How to Use Inline Assembly Language in C Code@footnote{https://gcc.gnu.org/onlinedocs/gcc/Using-Assembly-Language-with-C.html} in GCC’s documentation, the “Extended Asm” section in particular. -These entrypoints were added in @ref{14b,,LIBGCCJIT_ABI_15}; you can test +These entrypoints were added in @ref{14c,,LIBGCCJIT_ABI_15}; you can test for their presence using @quotation @@ -9492,12 +9532,12 @@ for their presence using @end menu @node Adding assembler instructions within a function,Adding top-level assembler statements,,Using Assembly Language with libgccjit -@anchor{topics/asm adding-assembler-instructions-within-a-function}@anchor{162} +@anchor{topics/asm adding-assembler-instructions-within-a-function}@anchor{164} @subsection Adding assembler instructions within a function @geindex gcc_jit_extended_asm (C type) -@anchor{topics/asm c gcc_jit_extended_asm}@anchor{11a} +@anchor{topics/asm c gcc_jit_extended_asm}@anchor{11b} @deffn {C Type} gcc_jit_extended_asm A @cite{gcc_jit_extended_asm} represents an extended @code{asm} statement: a @@ -9506,21 +9546,21 @@ to outputs. To avoid having an API entrypoint with a very large number of parameters, an extended @code{asm} statement is made in stages: -an initial call to create the @ref{11a,,gcc_jit_extended_asm}, +an initial call to create the @ref{11b,,gcc_jit_extended_asm}, followed by calls to add operands and set other properties of the statement. -There are two API entrypoints for creating a @ref{11a,,gcc_jit_extended_asm}: +There are two API entrypoints for creating a @ref{11b,,gcc_jit_extended_asm}: @itemize * @item -@ref{14c,,gcc_jit_block_add_extended_asm()} for an @code{asm} statement with +@ref{14d,,gcc_jit_block_add_extended_asm()} for an @code{asm} statement with no control flow, and @item -@ref{14d,,gcc_jit_block_end_with_extended_asm_goto()} for an @code{asm goto}. +@ref{14e,,gcc_jit_block_end_with_extended_asm_goto()} for an @code{asm goto}. @end itemize For example, to create the equivalent of: @@ -9551,8 +9591,8 @@ extended @code{asm} statement (e.g. the @code{%0} and @code{%1} above), the equivalent to the C syntax is followed i.e. all output operands, then all input operands, regardless of what order the calls to -@ref{151,,gcc_jit_extended_asm_add_output_operand()} and -@ref{152,,gcc_jit_extended_asm_add_input_operand()} were made in. +@ref{152,,gcc_jit_extended_asm_add_output_operand()} and +@ref{153,,gcc_jit_extended_asm_add_input_operand()} were made in. @end quotation @end cartouche @@ -9580,10 +9620,10 @@ the following API calls could be used: @end deffn @geindex gcc_jit_block_add_extended_asm (C function) -@anchor{topics/asm c gcc_jit_block_add_extended_asm}@anchor{14c} +@anchor{topics/asm c gcc_jit_block_add_extended_asm}@anchor{14d} @deffn {C Function} gcc_jit_extended_asm * gcc_jit_block_add_extended_asm (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, const char@w{ }*asm_template) -Create a @ref{11a,,gcc_jit_extended_asm} for an extended @code{asm} statement +Create a @ref{11b,,gcc_jit_extended_asm} for an extended @code{asm} statement with no control flow (i.e. without the @code{goto} qualifier). The parameter @code{asm_template} corresponds to the @cite{AssemblerTemplate} @@ -9593,10 +9633,10 @@ an on-stack buffer. @end deffn @geindex gcc_jit_block_end_with_extended_asm_goto (C function) -@anchor{topics/asm c gcc_jit_block_end_with_extended_asm_goto}@anchor{14d} +@anchor{topics/asm c gcc_jit_block_end_with_extended_asm_goto}@anchor{14e} @deffn {C Function} gcc_jit_extended_asm * gcc_jit_block_end_with_extended_asm_goto (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, const char@w{ }*asm_template, int@w{ }num_goto_blocks, gcc_jit_block@w{ }**goto_blocks, gcc_jit_block@w{ }*fallthrough_block) -Create a @ref{11a,,gcc_jit_extended_asm} for an extended @code{asm} statement +Create a @ref{11b,,gcc_jit_extended_asm} for an extended @code{asm} statement that may perform jumps, and use it to terminate the given block. This is equivalent to the @code{goto} qualifier in C’s extended @code{asm} syntax. @@ -9659,10 +9699,10 @@ would have happened in the C case. @end deffn @geindex gcc_jit_extended_asm_set_volatile_flag (C function) -@anchor{topics/asm c gcc_jit_extended_asm_set_volatile_flag}@anchor{14f} +@anchor{topics/asm c gcc_jit_extended_asm_set_volatile_flag}@anchor{150} @deffn {C Function} void gcc_jit_extended_asm_set_volatile_flag (gcc_jit_extended_asm@w{ }*ext_asm, int@w{ }flag) -Set whether the @ref{11a,,gcc_jit_extended_asm} has side-effects, equivalent to the +Set whether the @ref{11b,,gcc_jit_extended_asm} has side-effects, equivalent to the volatile@footnote{https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Volatile} qualifier in C’s extended asm syntax. @@ -9691,11 +9731,11 @@ the following API calls could be used: gcc_jit_extended_asm_add_clobber (ext_asm, "rdx"); @end example -where the @ref{11a,,gcc_jit_extended_asm} is flagged as volatile. +where the @ref{11b,,gcc_jit_extended_asm} is flagged as volatile. @end deffn @geindex gcc_jit_extended_asm_set_inline_flag (C function) -@anchor{topics/asm c gcc_jit_extended_asm_set_inline_flag}@anchor{150} +@anchor{topics/asm c gcc_jit_extended_asm_set_inline_flag}@anchor{151} @deffn {C Function} void gcc_jit_extended_asm_set_inline_flag (gcc_jit_extended_asm@w{ }*ext_asm, int@w{ }flag) Set the equivalent of the @@ -9704,7 +9744,7 @@ qualifier in C’s extended @code{asm} syntax. @end deffn @geindex gcc_jit_extended_asm_add_output_operand (C function) -@anchor{topics/asm c gcc_jit_extended_asm_add_output_operand}@anchor{151} +@anchor{topics/asm c gcc_jit_extended_asm_add_output_operand}@anchor{152} @deffn {C Function} void gcc_jit_extended_asm_add_output_operand (gcc_jit_extended_asm@w{ }*ext_asm, const char@w{ }*asm_symbolic_name, const char@w{ }*constraint, gcc_jit_lvalue@w{ }*dest) Add an output operand to the extended @code{asm} statement. See the @@ -9738,7 +9778,7 @@ section of GCC’s “Extended Asm” documentation. @end deffn @geindex gcc_jit_extended_asm_add_input_operand (C function) -@anchor{topics/asm c gcc_jit_extended_asm_add_input_operand}@anchor{152} +@anchor{topics/asm c gcc_jit_extended_asm_add_input_operand}@anchor{153} @deffn {C Function} void gcc_jit_extended_asm_add_input_operand (gcc_jit_extended_asm@w{ }*ext_asm, const char@w{ }*asm_symbolic_name, const char@w{ }*constraint, gcc_jit_rvalue@w{ }*src) Add an input operand to the extended @code{asm} statement. See the @@ -9769,7 +9809,7 @@ gcc_jit_extended_asm_add_input_operand (ext_asm, "aMask", "r", @end deffn @geindex gcc_jit_extended_asm_add_clobber (C function) -@anchor{topics/asm c gcc_jit_extended_asm_add_clobber}@anchor{153} +@anchor{topics/asm c gcc_jit_extended_asm_add_clobber}@anchor{154} @deffn {C Function} void gcc_jit_extended_asm_add_clobber (gcc_jit_extended_asm@w{ }*ext_asm, const char@w{ }*victim) Add @cite{victim} to the list of registers clobbered by the extended @code{asm} @@ -9789,18 +9829,18 @@ gcc_jit_extended_asm_add_clobber (ext_asm, "memory"); @end example @end deffn -A @ref{11a,,gcc_jit_extended_asm} is a @ref{e,,gcc_jit_object} “owned” by +A @ref{11b,,gcc_jit_extended_asm} is a @ref{e,,gcc_jit_object} “owned” by the block’s context. The following upcast is available: @geindex gcc_jit_extended_asm_as_object (C function) -@anchor{topics/asm c gcc_jit_extended_asm_as_object}@anchor{14e} +@anchor{topics/asm c gcc_jit_extended_asm_as_object}@anchor{14f} @deffn {C Function} gcc_jit_object * gcc_jit_extended_asm_as_object (gcc_jit_extended_asm@w{ }*ext_asm) Upcast from extended @code{asm} to object. @end deffn @node Adding top-level assembler statements,,Adding assembler instructions within a function,Using Assembly Language with libgccjit -@anchor{topics/asm adding-top-level-assembler-statements}@anchor{163} +@anchor{topics/asm adding-top-level-assembler-statements}@anchor{165} @subsection Adding top-level assembler statements @@ -9809,7 +9849,7 @@ there is support for creating “top-level” assembler statements, outside of any function. @geindex gcc_jit_context_add_top_level_asm (C function) -@anchor{topics/asm c gcc_jit_context_add_top_level_asm}@anchor{154} +@anchor{topics/asm c gcc_jit_context_add_top_level_asm}@anchor{155} @deffn {C Function} void gcc_jit_context_add_top_level_asm (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, const char@w{ }*asm_stmts) Create a set of top-level asm statements, analogous to those created @@ -9862,7 +9902,7 @@ the following API calls could be used: @c <https://www.gnu.org/licenses/>. @node C++ bindings for libgccjit,Internals,Topic Reference,Top -@anchor{cp/index doc}@anchor{164}@anchor{cp/index c-bindings-for-libgccjit}@anchor{165} +@anchor{cp/index doc}@anchor{166}@anchor{cp/index c-bindings-for-libgccjit}@anchor{167} @chapter C++ bindings for libgccjit @@ -9902,7 +9942,7 @@ Contents: @end menu @node Tutorial<2>,Topic Reference<2>,,C++ bindings for libgccjit -@anchor{cp/intro/index doc}@anchor{166}@anchor{cp/intro/index tutorial}@anchor{167} +@anchor{cp/intro/index doc}@anchor{168}@anchor{cp/intro/index tutorial}@anchor{169} @section Tutorial @@ -9932,7 +9972,7 @@ Contents: @end menu @node Tutorial part 1 “Hello world”<2>,Tutorial part 2 Creating a trivial machine code function<2>,,Tutorial<2> -@anchor{cp/intro/tutorial01 doc}@anchor{168}@anchor{cp/intro/tutorial01 tutorial-part-1-hello-world}@anchor{169} +@anchor{cp/intro/tutorial01 doc}@anchor{16a}@anchor{cp/intro/tutorial01 tutorial-part-1-hello-world}@anchor{16b} @subsection Tutorial part 1: “Hello world” @@ -10095,7 +10135,7 @@ hello world @c <https://www.gnu.org/licenses/>. @node Tutorial part 2 Creating a trivial machine code function<2>,Tutorial part 3 Loops and variables<2>,Tutorial part 1 “Hello world”<2>,Tutorial<2> -@anchor{cp/intro/tutorial02 doc}@anchor{16a}@anchor{cp/intro/tutorial02 tutorial-part-2-creating-a-trivial-machine-code-function}@anchor{16b} +@anchor{cp/intro/tutorial02 doc}@anchor{16c}@anchor{cp/intro/tutorial02 tutorial-part-2-creating-a-trivial-machine-code-function}@anchor{16d} @subsection Tutorial part 2: Creating a trivial machine code function @@ -10117,10 +10157,10 @@ First we need to include the relevant header: @end example All state associated with compilation is associated with a -@ref{16c,,gccjit;;context}, which is a thin C++ wrapper around the C API’s +@ref{16e,,gccjit;;context}, which is a thin C++ wrapper around the C API’s @ref{8,,gcc_jit_context *}. -Create one using @ref{16d,,gccjit;;context;;acquire()}: +Create one using @ref{16f,,gccjit;;context;;acquire()}: @example gccjit::context ctxt; @@ -10130,19 +10170,19 @@ ctxt = gccjit::context::acquire (); The JIT library has a system of types. It is statically-typed: every expression is of a specific type, fixed at compile-time. In our example, all of the expressions are of the C @cite{int} type, so let’s obtain this from -the context, as a @ref{16e,,gccjit;;type}, using -@ref{16f,,gccjit;;context;;get_type()}: +the context, as a @ref{170,,gccjit;;type}, using +@ref{171,,gccjit;;context;;get_type()}: @example gccjit::type int_type = ctxt.get_type (GCC_JIT_TYPE_INT); @end example -@ref{16e,,gccjit;;type} is an example of a “contextual” object: every -entity in the API is associated with a @ref{16c,,gccjit;;context}. +@ref{170,,gccjit;;type} is an example of a “contextual” object: every +entity in the API is associated with a @ref{16e,,gccjit;;context}. Memory management is easy: all such “contextual” objects are automatically cleaned up for you when the context is released, using -@ref{170,,gccjit;;context;;release()}: +@ref{172,,gccjit;;context;;release()}: @example ctxt.release (); @@ -10169,9 +10209,9 @@ The C++ class hierarchy within the @code{gccjit} namespace looks like this: +- param @end example -One thing you can do with a @ref{171,,gccjit;;object} is +One thing you can do with a @ref{173,,gccjit;;object} is to ask it for a human-readable description as a @code{std::string}, using -@ref{172,,gccjit;;object;;get_debug_string()}: +@ref{174,,gccjit;;object;;get_debug_string()}: @example printf ("obj: %s\n", obj.get_debug_string ().c_str ()); @@ -10187,7 +10227,7 @@ This is invaluable when debugging. Let’s create the function. To do so, we first need to construct its single parameter, specifying its type and giving it a name, -using @ref{173,,gccjit;;context;;new_param()}: +using @ref{175,,gccjit;;context;;new_param()}: @example gccjit::param param_i = ctxt.new_param (int_type, "i"); @@ -10228,7 +10268,7 @@ gccjit::block block = func.new_block (); Our basic block is relatively simple: it immediately terminates by returning the value of an expression. -We can build the expression using @ref{174,,gccjit;;context;;new_binary_op()}: +We can build the expression using @ref{176,,gccjit;;context;;new_binary_op()}: @example gccjit::rvalue expr = @@ -10237,9 +10277,9 @@ gccjit::rvalue expr = param_i, param_i); @end example -A @ref{175,,gccjit;;rvalue} is another example of a -@ref{171,,gccjit;;object} subclass. As before, we can print it with -@ref{172,,gccjit;;object;;get_debug_string()}. +A @ref{177,,gccjit;;rvalue} is another example of a +@ref{173,,gccjit;;object} subclass. As before, we can print it with +@ref{174,,gccjit;;object;;get_debug_string()}. @example printf ("expr: %s\n", expr.get_debug_string ().c_str ()); @@ -10251,7 +10291,7 @@ giving this output: expr: i * i @end example -Note that @ref{175,,gccjit;;rvalue} provides numerous overloaded operators +Note that @ref{177,,gccjit;;rvalue} provides numerous overloaded operators which can be used to dramatically reduce the amount of typing needed. We can build the above binary operation more directly with this one-liner: @@ -10268,7 +10308,7 @@ block.end_with_return (expr); @end example OK, we’ve populated the context. We can now compile it using -@ref{176,,gccjit;;context;;compile()}: +@ref{178,,gccjit;;context;;compile()}: @example gcc_jit_result *result; @@ -10310,12 +10350,12 @@ result: 25 @end menu @node Options<3>,Full example<3>,,Tutorial part 2 Creating a trivial machine code function<2> -@anchor{cp/intro/tutorial02 options}@anchor{177} +@anchor{cp/intro/tutorial02 options}@anchor{179} @subsubsection Options To get more information on what’s going on, you can set debugging flags -on the context using @ref{178,,gccjit;;context;;set_bool_option()}. +on the context using @ref{17a,,gccjit;;context;;set_bool_option()}. @c (I'm deliberately not mentioning @c :c:macro:`GCC_JIT_BOOL_OPTION_DUMP_INITIAL_TREE` here since I think @@ -10379,7 +10419,7 @@ square: By default, no optimizations are performed, the equivalent of GCC’s @cite{-O0} option. We can turn things up to e.g. @cite{-O3} by calling -@ref{179,,gccjit;;context;;set_int_option()} with +@ref{17b,,gccjit;;context;;set_int_option()} with @ref{1f,,GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL}: @example @@ -10409,7 +10449,7 @@ square: Naturally this has only a small effect on such a trivial function. @node Full example<3>,,Options<3>,Tutorial part 2 Creating a trivial machine code function<2> -@anchor{cp/intro/tutorial02 full-example}@anchor{17a} +@anchor{cp/intro/tutorial02 full-example}@anchor{17c} @subsubsection Full example @@ -10547,7 +10587,7 @@ result: 25 @c <https://www.gnu.org/licenses/>. @node Tutorial part 3 Loops and variables<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2>,Tutorial part 2 Creating a trivial machine code function<2>,Tutorial<2> -@anchor{cp/intro/tutorial03 doc}@anchor{17b}@anchor{cp/intro/tutorial03 tutorial-part-3-loops-and-variables}@anchor{17c} +@anchor{cp/intro/tutorial03 doc}@anchor{17d}@anchor{cp/intro/tutorial03 tutorial-part-3-loops-and-variables}@anchor{17e} @subsection Tutorial part 3: Loops and variables @@ -10603,7 +10643,7 @@ Here’s what the final control flow graph will look like: @end quotation As before, we include the libgccjit++ header and make a -@ref{16c,,gccjit;;context}. +@ref{16e,,gccjit;;context}. @example #include <libgccjit++.h> @@ -10657,18 +10697,18 @@ gccjit::function func = @end menu @node Expressions lvalues and rvalues<2>,Control flow<2>,,Tutorial part 3 Loops and variables<2> -@anchor{cp/intro/tutorial03 expressions-lvalues-and-rvalues}@anchor{17d} +@anchor{cp/intro/tutorial03 expressions-lvalues-and-rvalues}@anchor{17f} @subsubsection Expressions: lvalues and rvalues -The base class of expression is the @ref{175,,gccjit;;rvalue}, +The base class of expression is the @ref{177,,gccjit;;rvalue}, representing an expression that can be on the @emph{right}-hand side of an assignment: a value that can be computed somehow, and assigned @emph{to} a storage area (such as a variable). It has a specific -@ref{16e,,gccjit;;type}. +@ref{170,,gccjit;;type}. -Anothe important class is @ref{17e,,gccjit;;lvalue}. -A @ref{17e,,gccjit;;lvalue}. is something that can of the @emph{left}-hand +Anothe important class is @ref{180,,gccjit;;lvalue}. +A @ref{180,,gccjit;;lvalue}. is something that can of the @emph{left}-hand side of an assignment: a storage area (such as a variable). In other words, every assignment can be thought of as: @@ -10677,8 +10717,8 @@ In other words, every assignment can be thought of as: LVALUE = RVALUE; @end example -Note that @ref{17e,,gccjit;;lvalue} is a subclass of -@ref{175,,gccjit;;rvalue}, where in an assignment of the form: +Note that @ref{180,,gccjit;;lvalue} is a subclass of +@ref{177,,gccjit;;rvalue}, where in an assignment of the form: @example LVALUE_A = LVALUE_B; @@ -10708,7 +10748,7 @@ gccjit::rvalue expr = gccjit::rvalue expr = param_i * param_i; @end example -which is a @ref{175,,gccjit;;rvalue}, and +which is a @ref{177,,gccjit;;rvalue}, and @end quotation @@ -10716,15 +10756,15 @@ which is a @ref{175,,gccjit;;rvalue}, and @item the various function parameters: @cite{param_i} and @cite{param_n}, instances of -@ref{17f,,gccjit;;param}, which is a subclass of @ref{17e,,gccjit;;lvalue} -(and, in turn, of @ref{175,,gccjit;;rvalue}): +@ref{181,,gccjit;;param}, which is a subclass of @ref{180,,gccjit;;lvalue} +(and, in turn, of @ref{177,,gccjit;;rvalue}): we can both read from and write to function parameters within the body of a function. @end enumerate Our new example has a new kind of expression: we have two local variables. We create them by calling -@ref{180,,gccjit;;function;;new_local()}, supplying a type and a name: +@ref{182,,gccjit;;function;;new_local()}, supplying a type and a name: @example /* Build locals: */ @@ -10732,7 +10772,7 @@ gccjit::lvalue i = func.new_local (the_type, "i"); gccjit::lvalue sum = func.new_local (the_type, "sum"); @end example -These are instances of @ref{17e,,gccjit;;lvalue} - they can be read from +These are instances of @ref{180,,gccjit;;lvalue} - they can be read from and written to. Note that there is no precanned way to create @emph{and} initialize a variable @@ -10746,7 +10786,7 @@ Instead, having added the local to the function, we have to separately add an assignment of @cite{0} to @cite{local_i} at the beginning of the function. @node Control flow<2>,Visualizing the control flow graph<2>,Expressions lvalues and rvalues<2>,Tutorial part 3 Loops and variables<2> -@anchor{cp/intro/tutorial03 control-flow}@anchor{181} +@anchor{cp/intro/tutorial03 control-flow}@anchor{183} @subsubsection Control flow @@ -10769,8 +10809,8 @@ the body of the loop after the loop terminates (@cite{return sum}) @end enumerate -so we create these as @ref{182,,gccjit;;block} instances within the -@ref{183,,gccjit;;function}: +so we create these as @ref{184,,gccjit;;block} instances within the +@ref{185,,gccjit;;function}: @example gccjit::block b_initial = func.new_block ("initial"); @@ -10783,8 +10823,8 @@ We now populate each block with statements. The entry block @cite{b_initial} consists of initializations followed by a jump to the conditional. We assign @cite{0} to @cite{i} and to @cite{sum}, using -@ref{184,,gccjit;;block;;add_assignment()} to add -an assignment statement, and using @ref{185,,gccjit;;context;;zero()} to get +@ref{186,,gccjit;;block;;add_assignment()} to add +an assignment statement, and using @ref{187,,gccjit;;context;;zero()} to get the constant value @cite{0} for the relevant type for the right-hand side of the assignment: @@ -10805,9 +10845,9 @@ b_initial.end_with_jump (b_loop_cond); The conditional block is equivalent to the line @cite{while (i < n)} from our C example. It contains a single statement: a conditional, which jumps to one of two destination blocks depending on a boolean -@ref{175,,gccjit;;rvalue}, in this case the comparison of @cite{i} and @cite{n}. +@ref{177,,gccjit;;rvalue}, in this case the comparison of @cite{i} and @cite{n}. -We could build the comparison using @ref{186,,gccjit;;context;;new_comparison()}: +We could build the comparison using @ref{188,,gccjit;;context;;new_comparison()}: @example gccjit::rvalue guard = @@ -10816,7 +10856,7 @@ gccjit::rvalue guard = @end example and can then use this to add @cite{b_loop_cond}’s sole statement, via -@ref{187,,gccjit;;block;;end_with_conditional()}: +@ref{189,,gccjit;;block;;end_with_conditional()}: @example b_loop_cond.end_with_conditional (guard, @@ -10824,7 +10864,7 @@ b_loop_cond.end_with_conditional (guard, b_loop_body); // on_false @end example -However @ref{175,,gccjit;;rvalue} has overloaded operators for this, so we +However @ref{177,,gccjit;;rvalue} has overloaded operators for this, so we express the conditional as @example @@ -10844,7 +10884,7 @@ Next, we populate the body of the loop. The C statement @cite{sum += i * i;} is an assignment operation, where an lvalue is modified “in-place”. We use -@ref{188,,gccjit;;block;;add_assignment_op()} to handle these operations: +@ref{18a,,gccjit;;block;;add_assignment_op()} to handle these operations: @example /* sum += i * i */ @@ -10868,7 +10908,7 @@ b_loop_body.add_assignment_op (i, @cartouche @quotation Note For numeric constants other than 0 or 1, we could use -@ref{189,,gccjit;;context;;new_rvalue()}, which has overloads +@ref{18b,,gccjit;;context;;new_rvalue()}, which has overloads for both @code{int} and @code{double}. @end quotation @end cartouche @@ -10934,12 +10974,12 @@ result: 285 @end example @node Visualizing the control flow graph<2>,Full example<4>,Control flow<2>,Tutorial part 3 Loops and variables<2> -@anchor{cp/intro/tutorial03 visualizing-the-control-flow-graph}@anchor{18a} +@anchor{cp/intro/tutorial03 visualizing-the-control-flow-graph}@anchor{18c} @subsubsection Visualizing the control flow graph You can see the control flow graph of a function using -@ref{18b,,gccjit;;function;;dump_to_dot()}: +@ref{18d,,gccjit;;function;;dump_to_dot()}: @example func.dump_to_dot ("/tmp/sum-of-squares.dot"); @@ -10969,7 +11009,7 @@ install it with @cite{yum install python-xdot}): @end quotation @node Full example<4>,,Visualizing the control flow graph<2>,Tutorial part 3 Loops and variables<2> -@anchor{cp/intro/tutorial03 full-example}@anchor{18c} +@anchor{cp/intro/tutorial03 full-example}@anchor{18e} @subsubsection Full example @@ -11147,7 +11187,7 @@ loop_test returned: 285 @c <https://www.gnu.org/licenses/>. @node Tutorial part 4 Adding JIT-compilation to a toy interpreter<2>,,Tutorial part 3 Loops and variables<2>,Tutorial<2> -@anchor{cp/intro/tutorial04 doc}@anchor{18d}@anchor{cp/intro/tutorial04 tutorial-part-4-adding-jit-compilation-to-a-toy-interpreter}@anchor{18e} +@anchor{cp/intro/tutorial04 doc}@anchor{18f}@anchor{cp/intro/tutorial04 tutorial-part-4-adding-jit-compilation-to-a-toy-interpreter}@anchor{190} @subsection Tutorial part 4: Adding JIT-compilation to a toy interpreter @@ -11169,7 +11209,7 @@ to it. @end menu @node Our toy interpreter<2>,Compiling to machine code<2>,,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 our-toy-interpreter}@anchor{18f} +@anchor{cp/intro/tutorial04 our-toy-interpreter}@anchor{191} @subsubsection Our toy interpreter @@ -11571,7 +11611,7 @@ toyvm_function::interpret (int arg, FILE *trace) @end quotation @node Compiling to machine code<2>,Setting things up<2>,Our toy interpreter<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 compiling-to-machine-code}@anchor{190} +@anchor{cp/intro/tutorial04 compiling-to-machine-code}@anchor{192} @subsubsection Compiling to machine code @@ -11641,7 +11681,7 @@ This means our compiler has the following state: @end quotation @node Setting things up<2>,Populating the function<2>,Compiling to machine code<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 setting-things-up}@anchor{191} +@anchor{cp/intro/tutorial04 setting-things-up}@anchor{193} @subsubsection Setting things up @@ -11731,7 +11771,7 @@ compilation_state::add_pop (gccjit::block block, @end quotation We will support single-stepping through the generated code in the -debugger, so we need to create @ref{192,,gccjit;;location} instances, one +debugger, so we need to create @ref{194,,gccjit;;location} instances, one per operation in the source code. These will reference the lines of e.g. @code{factorial.toy}. @@ -11791,7 +11831,7 @@ We create the locals within the function. @end quotation @node Populating the function<2>,Verifying the control flow graph<2>,Setting things up<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 populating-the-function}@anchor{193} +@anchor{cp/intro/tutorial04 populating-the-function}@anchor{195} @subsubsection Populating the function @@ -11904,7 +11944,7 @@ stack into @code{y} instead erroneously assigned it to @code{x}, leaving @code{y uninitialized. To track this kind of thing down, we can use -@ref{194,,gccjit;;block;;add_comment()} to add descriptive comments +@ref{196,,gccjit;;block;;add_comment()} to add descriptive comments to the internal representation. This is invaluable when looking through the generated IR for, say @code{factorial}: @@ -12044,14 +12084,14 @@ to the next block. This is analogous to simply incrementing the program counter. @node Verifying the control flow graph<2>,Compiling the context<2>,Populating the function<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 verifying-the-control-flow-graph}@anchor{195} +@anchor{cp/intro/tutorial04 verifying-the-control-flow-graph}@anchor{197} @subsubsection Verifying the control flow graph Having finished looping over the blocks, the context is complete. As before, we can verify that the control flow and statements are sane by -using @ref{18b,,gccjit;;function;;dump_to_dot()}: +using @ref{18d,,gccjit;;function;;dump_to_dot()}: @example fn.dump_to_dot ("/tmp/factorial.dot"); @@ -12073,7 +12113,7 @@ errors in our compiler. @end quotation @node Compiling the context<2>,Single-stepping through the generated code<2>,Verifying the control flow graph<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 compiling-the-context}@anchor{196} +@anchor{cp/intro/tutorial04 compiling-the-context}@anchor{198} @subsubsection Compiling the context @@ -12124,7 +12164,7 @@ private: @end quotation @node Single-stepping through the generated code<2>,Examining the generated code<2>,Compiling the context<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 single-stepping-through-the-generated-code}@anchor{197} +@anchor{cp/intro/tutorial04 single-stepping-through-the-generated-code}@anchor{199} @subsubsection Single-stepping through the generated code @@ -12138,14 +12178,14 @@ It’s possible to debug the generated code. To do this we need to both: @item Set up source code locations for our statements, so that we can meaningfully step through the code. We did this above by -calling @ref{198,,gccjit;;context;;new_location()} and using the +calling @ref{19a,,gccjit;;context;;new_location()} and using the results. @item Enable the generation of debugging information, by setting @ref{42,,GCC_JIT_BOOL_OPTION_DEBUGINFO} on the -@ref{16c,,gccjit;;context} via -@ref{178,,gccjit;;context;;set_bool_option()}: +@ref{16e,,gccjit;;context} via +@ref{17a,,gccjit;;context;;set_bool_option()}: @example ctxt.set_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO, 1); @@ -12209,14 +12249,14 @@ optimization level in a regular compiler. @end cartouche @node Examining the generated code<2>,Putting it all together<2>,Single-stepping through the generated code<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 examining-the-generated-code}@anchor{199} +@anchor{cp/intro/tutorial04 examining-the-generated-code}@anchor{19b} @subsubsection Examining the generated code How good is the optimized code? We can turn up optimizations, by calling -@ref{179,,gccjit;;context;;set_int_option()} with +@ref{17b,,gccjit;;context;;set_int_option()} with @ref{1f,,GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL}: @example @@ -12384,7 +12424,7 @@ Note that the stack pushing and popping have been eliminated, as has the recursive call (in favor of an iteration). @node Putting it all together<2>,Behind the curtain How does our code get optimized?<2>,Examining the generated code<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 putting-it-all-together}@anchor{19a} +@anchor{cp/intro/tutorial04 putting-it-all-together}@anchor{19c} @subsubsection Putting it all together @@ -12415,7 +12455,7 @@ compiler result: 55 @end example @node Behind the curtain How does our code get optimized?<2>,,Putting it all together<2>,Tutorial part 4 Adding JIT-compilation to a toy interpreter<2> -@anchor{cp/intro/tutorial04 behind-the-curtain-how-does-our-code-get-optimized}@anchor{19b} +@anchor{cp/intro/tutorial04 behind-the-curtain-how-does-our-code-get-optimized}@anchor{19d} @subsubsection Behind the curtain: How does our code get optimized? @@ -12593,7 +12633,7 @@ instr9: @} @end example -Note in the above how all the @ref{182,,gccjit;;block} instances we +Note in the above how all the @ref{184,,gccjit;;block} instances we created have been consolidated into just 3 blocks in GCC’s internal representation: @code{initial}, @code{instr4} and @code{instr9}. @@ -12604,7 +12644,7 @@ representation: @code{initial}, @code{instr4} and @code{instr9}. @end menu @node Optimizing away stack manipulation<2>,Elimination of tail recursion<2>,,Behind the curtain How does our code get optimized?<2> -@anchor{cp/intro/tutorial04 optimizing-away-stack-manipulation}@anchor{19c} +@anchor{cp/intro/tutorial04 optimizing-away-stack-manipulation}@anchor{19e} @subsubsection Optimizing away stack manipulation @@ -12868,7 +12908,7 @@ instr9: @end example @node Elimination of tail recursion<2>,,Optimizing away stack manipulation<2>,Behind the curtain How does our code get optimized?<2> -@anchor{cp/intro/tutorial04 elimination-of-tail-recursion}@anchor{19d} +@anchor{cp/intro/tutorial04 elimination-of-tail-recursion}@anchor{19f} @subsubsection Elimination of tail recursion @@ -12951,7 +12991,7 @@ instr9: @c <https://www.gnu.org/licenses/>. @node Topic Reference<2>,,Tutorial<2>,C++ bindings for libgccjit -@anchor{cp/topics/index doc}@anchor{19e}@anchor{cp/topics/index topic-reference}@anchor{19f} +@anchor{cp/topics/index doc}@anchor{1a0}@anchor{cp/topics/index topic-reference}@anchor{1a1} @section Topic Reference @@ -12985,22 +13025,22 @@ instr9: @end menu @node Compilation contexts<2>,Objects<2>,,Topic Reference<2> -@anchor{cp/topics/contexts doc}@anchor{1a0}@anchor{cp/topics/contexts compilation-contexts}@anchor{1a1} +@anchor{cp/topics/contexts doc}@anchor{1a2}@anchor{cp/topics/contexts compilation-contexts}@anchor{1a3} @subsection Compilation contexts @geindex gccjit;;context (C++ class) -@anchor{cp/topics/contexts _CPPv4N6gccjit7contextE}@anchor{16c}@anchor{cp/topics/contexts _CPPv3N6gccjit7contextE}@anchor{1a2}@anchor{cp/topics/contexts _CPPv2N6gccjit7contextE}@anchor{1a3}@anchor{cp/topics/contexts gccjit context}@anchor{1a4} +@anchor{cp/topics/contexts _CPPv4N6gccjit7contextE}@anchor{16e}@anchor{cp/topics/contexts _CPPv3N6gccjit7contextE}@anchor{1a4}@anchor{cp/topics/contexts _CPPv2N6gccjit7contextE}@anchor{1a5}@anchor{cp/topics/contexts gccjit context}@anchor{1a6} @deffn {C++ Class} gccjit::context @end deffn -The top-level of the C++ API is the @ref{16c,,gccjit;;context} type. +The top-level of the C++ API is the @ref{16e,,gccjit;;context} type. -A @ref{16c,,gccjit;;context} instance encapsulates the state of a +A @ref{16e,,gccjit;;context} instance encapsulates the state of a compilation. You can set up options on it, and add types, functions and code. -Invoking @ref{176,,gccjit;;context;;compile()} on it gives you a +Invoking @ref{178,,gccjit;;context;;compile()} on it gives you a @ref{16,,gcc_jit_result *}. It is a thin wrapper around the C API’s @ref{8,,gcc_jit_context *}. @@ -13015,7 +13055,7 @@ It is a thin wrapper around the C API’s @ref{8,,gcc_jit_context *}. @end menu @node Lifetime-management<2>,Thread-safety<2>,,Compilation contexts<2> -@anchor{cp/topics/contexts lifetime-management}@anchor{1a5} +@anchor{cp/topics/contexts lifetime-management}@anchor{1a7} @subsubsection Lifetime-management @@ -13024,17 +13064,17 @@ have their lifetime bounded by the context they are created within, and cleanup of such objects is done for you when the context is released. @geindex gccjit;;context;;acquire (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context7acquireEv}@anchor{16d}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7acquireEv}@anchor{1a6}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7acquireEv}@anchor{1a7}@anchor{cp/topics/contexts gccjit context acquire}@anchor{1a8} -@deffn {C++ Function} gccjit::@ref{16c,,context} gccjit::@ref{16c,,context}::acquire () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context7acquireEv}@anchor{16f}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7acquireEv}@anchor{1a8}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7acquireEv}@anchor{1a9}@anchor{cp/topics/contexts gccjit context acquire}@anchor{1aa} +@deffn {C++ Function} gccjit::@ref{16e,,context} gccjit::@ref{16e,,context}::acquire () -This function acquires a new @ref{16c,,gccjit;;context} instance, +This function acquires a new @ref{16e,,gccjit;;context} instance, which is independent of any others that may be present within this process. @end deffn @geindex gccjit;;context;;release (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context7releaseEv}@anchor{170}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7releaseEv}@anchor{1a9}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7releaseEv}@anchor{1aa}@anchor{cp/topics/contexts gccjit context release}@anchor{1ab} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::release () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context7releaseEv}@anchor{172}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7releaseEv}@anchor{1ab}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7releaseEv}@anchor{1ac}@anchor{cp/topics/contexts gccjit context release}@anchor{1ad} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::release () This function releases all resources associated with the given context. Both the context itself and all of its @code{gccjit::object *} @@ -13050,8 +13090,8 @@ ctxt.release (); @end deffn @geindex gccjit;;context;;new_child_context (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context17new_child_contextEv}@anchor{1ac}@anchor{cp/topics/contexts _CPPv3N6gccjit7context17new_child_contextEv}@anchor{1ad}@anchor{cp/topics/contexts _CPPv2N6gccjit7context17new_child_contextEv}@anchor{1ae}@anchor{cp/topics/contexts gccjit context new_child_context}@anchor{1af} -@deffn {C++ Function} gccjit::@ref{16c,,context} gccjit::@ref{16c,,context}::new_child_context () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context17new_child_contextEv}@anchor{1ae}@anchor{cp/topics/contexts _CPPv3N6gccjit7context17new_child_contextEv}@anchor{1af}@anchor{cp/topics/contexts _CPPv2N6gccjit7context17new_child_contextEv}@anchor{1b0}@anchor{cp/topics/contexts gccjit context new_child_context}@anchor{1b1} +@deffn {C++ Function} gccjit::@ref{16e,,context} gccjit::@ref{16e,,context}::new_child_context () Given an existing JIT context, create a child context. @@ -13082,16 +13122,16 @@ there will likely be a performance hit for such nesting. @end deffn @node Thread-safety<2>,Error-handling<3>,Lifetime-management<2>,Compilation contexts<2> -@anchor{cp/topics/contexts thread-safety}@anchor{1b0} +@anchor{cp/topics/contexts thread-safety}@anchor{1b2} @subsubsection Thread-safety -Instances of @ref{16c,,gccjit;;context} created via -@ref{16d,,gccjit;;context;;acquire()} are independent from each other: +Instances of @ref{16e,,gccjit;;context} created via +@ref{16f,,gccjit;;context;;acquire()} are independent from each other: only one thread may use a given context at once, but multiple threads could each have their own contexts without needing locks. -Contexts created via @ref{1ac,,gccjit;;context;;new_child_context()} are +Contexts created via @ref{1ae,,gccjit;;context;;new_child_context()} are related to their parent context. They can be partitioned by their ultimate ancestor into independent “family trees”. Only one thread within a process may use a given “family tree” of such contexts at once, @@ -13099,7 +13139,7 @@ and if you’re using multiple threads you should provide your own locking around entire such context partitions. @node Error-handling<3>,Debugging<2>,Thread-safety<2>,Compilation contexts<2> -@anchor{cp/topics/contexts error-handling}@anchor{1b1} +@anchor{cp/topics/contexts error-handling}@anchor{1b3} @subsubsection Error-handling @@ -13112,11 +13152,11 @@ NULL. You don’t have to check everywhere for NULL results, since the API gracefully handles a NULL being passed in for any argument. Errors are printed on stderr and can be queried using -@ref{1b2,,gccjit;;context;;get_first_error()}. +@ref{1b4,,gccjit;;context;;get_first_error()}. @geindex gccjit;;context;;get_first_error (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b2}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b3}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b4}@anchor{cp/topics/contexts gccjit context get_first_error__gccjit contextP}@anchor{1b5} -@deffn {C++ Function} const char *gccjit::@ref{16c,,context}::get_first_error (gccjit::context *ctxt) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b4}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b5}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b6}@anchor{cp/topics/contexts gccjit context get_first_error__gccjit contextP}@anchor{1b7} +@deffn {C++ Function} const char *gccjit::@ref{16e,,context}::get_first_error (gccjit::context *ctxt) Returns the first error message that occurred on the context. @@ -13127,18 +13167,18 @@ If no errors occurred, this will be NULL. @end deffn @node Debugging<2>,Options<4>,Error-handling<3>,Compilation contexts<2> -@anchor{cp/topics/contexts debugging}@anchor{1b6} +@anchor{cp/topics/contexts debugging}@anchor{1b8} @subsubsection Debugging @geindex gccjit;;context;;dump_to_file (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b7}@anchor{cp/topics/contexts _CPPv3N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b8}@anchor{cp/topics/contexts _CPPv2N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b9}@anchor{cp/topics/contexts gccjit context dump_to_file__ssCR i}@anchor{1ba} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::dump_to_file (const std::string &path, int update_locations) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b9}@anchor{cp/topics/contexts _CPPv3N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1ba}@anchor{cp/topics/contexts _CPPv2N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1bb}@anchor{cp/topics/contexts gccjit context dump_to_file__ssCR i}@anchor{1bc} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::dump_to_file (const std::string &path, int update_locations) To help with debugging: dump a C-like representation to the given path, describing what’s been set up on the context. -If “update_locations” is true, then also set up @ref{192,,gccjit;;location} +If “update_locations” is true, then also set up @ref{194,,gccjit;;location} information throughout the context, pointing at the dump file as if it were a source file. This may be of use in conjunction with @code{GCCJIT::BOOL_OPTION_DEBUGINFO} to allow stepping through the @@ -13146,8 +13186,8 @@ code in a debugger. @end deffn @geindex gccjit;;context;;dump_reproducer_to_file (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1bb}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1bc}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1bd}@anchor{cp/topics/contexts gccjit context dump_reproducer_to_file__gcc_jit_contextP cCP}@anchor{1be} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::dump_reproducer_to_file (gcc_jit_context *ctxt, const char *path) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1bd}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1be}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1bf}@anchor{cp/topics/contexts gccjit context dump_reproducer_to_file__gcc_jit_contextP cCP}@anchor{1c0} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::dump_reproducer_to_file (gcc_jit_context *ctxt, const char *path) This is a thin wrapper around the C API @ref{5d,,gcc_jit_context_dump_reproducer_to_file()}, and hence works the @@ -13158,7 +13198,7 @@ for seeing what the C++ bindings are doing at the C level. @end deffn @node Options<4>,,Debugging<2>,Compilation contexts<2> -@anchor{cp/topics/contexts options}@anchor{1bf} +@anchor{cp/topics/contexts options}@anchor{1c1} @subsubsection Options @@ -13171,13 +13211,13 @@ for seeing what the C++ bindings are doing at the C level. @end menu @node String Options<2>,Boolean options<2>,,Options<4> -@anchor{cp/topics/contexts string-options}@anchor{1c0} +@anchor{cp/topics/contexts string-options}@anchor{1c2} @subsubsection String Options @geindex gccjit;;context;;set_str_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c1}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c2}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c3}@anchor{cp/topics/contexts gccjit context set_str_option__gcc_jit_str_option cCP}@anchor{1c4} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::set_str_option (enum gcc_jit_str_option, const char *value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c3}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c4}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c5}@anchor{cp/topics/contexts gccjit context set_str_option__gcc_jit_str_option cCP}@anchor{1c6} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::set_str_option (enum gcc_jit_str_option, const char *value) Set a string option of the context. @@ -13187,13 +13227,13 @@ meaning. @end deffn @node Boolean options<2>,Integer options<2>,String Options<2>,Options<4> -@anchor{cp/topics/contexts boolean-options}@anchor{1c5} +@anchor{cp/topics/contexts boolean-options}@anchor{1c7} @subsubsection Boolean options @geindex gccjit;;context;;set_bool_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{178}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c6}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c7}@anchor{cp/topics/contexts gccjit context set_bool_option__gcc_jit_bool_option i}@anchor{1c8} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::set_bool_option (enum gcc_jit_bool_option, int value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{17a}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c8}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c9}@anchor{cp/topics/contexts gccjit context set_bool_option__gcc_jit_bool_option i}@anchor{1ca} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::set_bool_option (enum gcc_jit_bool_option, int value) Set a boolean option of the context. @@ -13203,8 +13243,8 @@ meaning. @end deffn @geindex gccjit;;context;;set_bool_allow_unreachable_blocks (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c9}@anchor{cp/topics/contexts _CPPv3N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1ca}@anchor{cp/topics/contexts _CPPv2N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1cb}@anchor{cp/topics/contexts gccjit context set_bool_allow_unreachable_blocks__i}@anchor{1cc} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::set_bool_allow_unreachable_blocks (int bool_value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1cb}@anchor{cp/topics/contexts _CPPv3N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1cc}@anchor{cp/topics/contexts _CPPv2N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1cd}@anchor{cp/topics/contexts gccjit context set_bool_allow_unreachable_blocks__i}@anchor{1ce} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::set_bool_allow_unreachable_blocks (int bool_value) By default, libgccjit will issue an error about unreachable blocks within a function. @@ -13222,8 +13262,8 @@ its presence using @end deffn @geindex gccjit;;context;;set_bool_use_external_driver (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context28set_bool_use_external_driverEi}@anchor{1cd}@anchor{cp/topics/contexts _CPPv3N6gccjit7context28set_bool_use_external_driverEi}@anchor{1ce}@anchor{cp/topics/contexts _CPPv2N6gccjit7context28set_bool_use_external_driverEi}@anchor{1cf}@anchor{cp/topics/contexts gccjit context set_bool_use_external_driver__i}@anchor{1d0} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::set_bool_use_external_driver (int bool_value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context28set_bool_use_external_driverEi}@anchor{1cf}@anchor{cp/topics/contexts _CPPv3N6gccjit7context28set_bool_use_external_driverEi}@anchor{1d0}@anchor{cp/topics/contexts _CPPv2N6gccjit7context28set_bool_use_external_driverEi}@anchor{1d1}@anchor{cp/topics/contexts gccjit context set_bool_use_external_driver__i}@anchor{1d2} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::set_bool_use_external_driver (int bool_value) libgccjit internally generates assembler, and uses “driver” code for converting it to other formats (e.g. shared libraries). @@ -13244,13 +13284,13 @@ its presence using @end deffn @node Integer options<2>,Additional command-line options<2>,Boolean options<2>,Options<4> -@anchor{cp/topics/contexts integer-options}@anchor{1d1} +@anchor{cp/topics/contexts integer-options}@anchor{1d3} @subsubsection Integer options @geindex gccjit;;context;;set_int_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{179}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1d2}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1d3}@anchor{cp/topics/contexts gccjit context set_int_option__gcc_jit_int_option i}@anchor{1d4} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::set_int_option (enum gcc_jit_int_option, int value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{17b}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1d4}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1d5}@anchor{cp/topics/contexts gccjit context set_int_option__gcc_jit_int_option i}@anchor{1d6} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::set_int_option (enum gcc_jit_int_option, int value) Set an integer option of the context. @@ -13260,13 +13300,13 @@ meaning. @end deffn @node Additional command-line options<2>,,Integer options<2>,Options<4> -@anchor{cp/topics/contexts additional-command-line-options}@anchor{1d5} +@anchor{cp/topics/contexts additional-command-line-options}@anchor{1d7} @subsubsection Additional command-line options @geindex gccjit;;context;;add_command_line_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context23add_command_line_optionEPKc}@anchor{1d6}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23add_command_line_optionEPKc}@anchor{1d7}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23add_command_line_optionEPKc}@anchor{1d8}@anchor{cp/topics/contexts gccjit context add_command_line_option__cCP}@anchor{1d9} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::add_command_line_option (const char *optname) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context23add_command_line_optionEPKc}@anchor{1d8}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23add_command_line_optionEPKc}@anchor{1d9}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23add_command_line_optionEPKc}@anchor{1da}@anchor{cp/topics/contexts gccjit context add_command_line_option__cCP}@anchor{1db} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::add_command_line_option (const char *optname) Add an arbitrary gcc command-line option to the context for use when compiling. @@ -13300,18 +13340,18 @@ its presence using @c <https://www.gnu.org/licenses/>. @node Objects<2>,Types<2>,Compilation contexts<2>,Topic Reference<2> -@anchor{cp/topics/objects doc}@anchor{1da}@anchor{cp/topics/objects objects}@anchor{1db} +@anchor{cp/topics/objects doc}@anchor{1dc}@anchor{cp/topics/objects objects}@anchor{1dd} @subsection Objects @geindex gccjit;;object (C++ class) -@anchor{cp/topics/objects _CPPv4N6gccjit6objectE}@anchor{171}@anchor{cp/topics/objects _CPPv3N6gccjit6objectE}@anchor{1dc}@anchor{cp/topics/objects _CPPv2N6gccjit6objectE}@anchor{1dd}@anchor{cp/topics/objects gccjit object}@anchor{1de} +@anchor{cp/topics/objects _CPPv4N6gccjit6objectE}@anchor{173}@anchor{cp/topics/objects _CPPv3N6gccjit6objectE}@anchor{1de}@anchor{cp/topics/objects _CPPv2N6gccjit6objectE}@anchor{1df}@anchor{cp/topics/objects gccjit object}@anchor{1e0} @deffn {C++ Class} gccjit::object @end deffn Almost every entity in the API (with the exception of -@ref{16c,,gccjit;;context} and @ref{16,,gcc_jit_result *}) is a -“contextual” object, a @ref{171,,gccjit;;object}. +@ref{16e,,gccjit;;context} and @ref{16,,gcc_jit_result *}) is a +“contextual” object, a @ref{173,,gccjit;;object}. A JIT object: @@ -13321,7 +13361,7 @@ A JIT object: @itemize * @item -is associated with a @ref{16c,,gccjit;;context}. +is associated with a @ref{16e,,gccjit;;context}. @item is automatically cleaned up for you when its context is released so @@ -13346,18 +13386,18 @@ The C++ class hierarchy within the @code{gccjit} namespace looks like this: +- case_ @end example -The @ref{171,,gccjit;;object} base class has the following operations: +The @ref{173,,gccjit;;object} base class has the following operations: @geindex gccjit;;object;;get_context (C++ function) -@anchor{cp/topics/objects _CPPv4NK6gccjit6object11get_contextEv}@anchor{1df}@anchor{cp/topics/objects _CPPv3NK6gccjit6object11get_contextEv}@anchor{1e0}@anchor{cp/topics/objects _CPPv2NK6gccjit6object11get_contextEv}@anchor{1e1}@anchor{cp/topics/objects gccjit object get_contextC}@anchor{1e2} -@deffn {C++ Function} gccjit::@ref{16c,,context} gccjit::@ref{171,,object}::get_context () const +@anchor{cp/topics/objects _CPPv4NK6gccjit6object11get_contextEv}@anchor{1e1}@anchor{cp/topics/objects _CPPv3NK6gccjit6object11get_contextEv}@anchor{1e2}@anchor{cp/topics/objects _CPPv2NK6gccjit6object11get_contextEv}@anchor{1e3}@anchor{cp/topics/objects gccjit object get_contextC}@anchor{1e4} +@deffn {C++ Function} gccjit::@ref{16e,,context} gccjit::@ref{173,,object}::get_context () const Which context is the obj within? @end deffn @geindex gccjit;;object;;get_debug_string (C++ function) -@anchor{cp/topics/objects _CPPv4NK6gccjit6object16get_debug_stringEv}@anchor{172}@anchor{cp/topics/objects _CPPv3NK6gccjit6object16get_debug_stringEv}@anchor{1e3}@anchor{cp/topics/objects _CPPv2NK6gccjit6object16get_debug_stringEv}@anchor{1e4}@anchor{cp/topics/objects gccjit object get_debug_stringC}@anchor{1e5} -@deffn {C++ Function} std::string gccjit::@ref{171,,object}::get_debug_string () const +@anchor{cp/topics/objects _CPPv4NK6gccjit6object16get_debug_stringEv}@anchor{174}@anchor{cp/topics/objects _CPPv3NK6gccjit6object16get_debug_stringEv}@anchor{1e5}@anchor{cp/topics/objects _CPPv2NK6gccjit6object16get_debug_stringEv}@anchor{1e6}@anchor{cp/topics/objects gccjit object get_debug_stringC}@anchor{1e7} +@deffn {C++ Function} std::string gccjit::@ref{173,,object}::get_debug_string () const Generate a human-readable description for the given object. @@ -13392,16 +13432,16 @@ obj: 4.0 * (float)i @c <https://www.gnu.org/licenses/>. @node Types<2>,Expressions<2>,Objects<2>,Topic Reference<2> -@anchor{cp/topics/types doc}@anchor{1e6}@anchor{cp/topics/types types}@anchor{1e7} +@anchor{cp/topics/types doc}@anchor{1e8}@anchor{cp/topics/types types}@anchor{1e9} @subsection Types @geindex gccjit;;type (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit4typeE}@anchor{16e}@anchor{cp/topics/types _CPPv3N6gccjit4typeE}@anchor{1e8}@anchor{cp/topics/types _CPPv2N6gccjit4typeE}@anchor{1e9}@anchor{cp/topics/types gccjit type}@anchor{1ea} +@anchor{cp/topics/types _CPPv4N6gccjit4typeE}@anchor{170}@anchor{cp/topics/types _CPPv3N6gccjit4typeE}@anchor{1ea}@anchor{cp/topics/types _CPPv2N6gccjit4typeE}@anchor{1eb}@anchor{cp/topics/types gccjit type}@anchor{1ec} @deffn {C++ Class} gccjit::type gccjit::type represents a type within the library. It is a subclass -of @ref{171,,gccjit;;object}. +of @ref{173,,gccjit;;object}. @end deffn Types can be created in several ways: @@ -13411,7 +13451,7 @@ Types can be created in several ways: @item fundamental types can be accessed using -@ref{16f,,gccjit;;context;;get_type()}: +@ref{171,,gccjit;;context;;get_type()}: @example gccjit::type int_type = ctxt.get_type (GCC_JIT_TYPE_INT); @@ -13427,7 +13467,7 @@ See @ref{b,,gcc_jit_context_get_type()} for the available types. @item derived types can be accessed by using functions such as -@ref{1eb,,gccjit;;type;;get_pointer()} and @ref{1ec,,gccjit;;type;;get_const()}: +@ref{1ed,,gccjit;;type;;get_pointer()} and @ref{1ee,,gccjit;;type;;get_const()}: @example gccjit::type const_int_star = int_type.get_const ().get_pointer (); @@ -13447,28 +13487,28 @@ by creating structures (see below). @end menu @node Standard types<2>,Pointers const and volatile<2>,,Types<2> -@anchor{cp/topics/types standard-types}@anchor{1ed} +@anchor{cp/topics/types standard-types}@anchor{1ef} @subsubsection Standard types @geindex gccjit;;context;;get_type (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context8get_typeE13gcc_jit_types}@anchor{16f}@anchor{cp/topics/types _CPPv3N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1ee}@anchor{cp/topics/types _CPPv2N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1ef}@anchor{cp/topics/types gccjit context get_type__gcc_jit_types}@anchor{1f0} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16c,,context}::get_type (enum gcc_jit_types) +@anchor{cp/topics/types _CPPv4N6gccjit7context8get_typeE13gcc_jit_types}@anchor{171}@anchor{cp/topics/types _CPPv3N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1f0}@anchor{cp/topics/types _CPPv2N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1f1}@anchor{cp/topics/types gccjit context get_type__gcc_jit_types}@anchor{1f2} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{16e,,context}::get_type (enum gcc_jit_types) Access a specific type. This is a thin wrapper around @ref{b,,gcc_jit_context_get_type()}; the parameter has the same meaning. @end deffn @geindex gccjit;;context;;get_int_type (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context12get_int_typeE6size_ti}@anchor{1f1}@anchor{cp/topics/types _CPPv3N6gccjit7context12get_int_typeE6size_ti}@anchor{1f2}@anchor{cp/topics/types _CPPv2N6gccjit7context12get_int_typeE6size_ti}@anchor{1f3}@anchor{cp/topics/types gccjit context get_int_type__s i}@anchor{1f4} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16c,,context}::get_int_type (size_t num_bytes, int is_signed) +@anchor{cp/topics/types _CPPv4N6gccjit7context12get_int_typeE6size_ti}@anchor{1f3}@anchor{cp/topics/types _CPPv3N6gccjit7context12get_int_typeE6size_ti}@anchor{1f4}@anchor{cp/topics/types _CPPv2N6gccjit7context12get_int_typeE6size_ti}@anchor{1f5}@anchor{cp/topics/types gccjit context get_int_type__s i}@anchor{1f6} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{16e,,context}::get_int_type (size_t num_bytes, int is_signed) Access the integer type of the given size. @end deffn @geindex gccjit;;context;;get_int_type<T> (C++ function) -@anchor{cp/topics/types _CPPv4IEN6gccjit7context12get_int_typeI1TEEN6gccjit4typeEv}@anchor{1f5}@anchor{cp/topics/types _CPPv3IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f6}@anchor{cp/topics/types _CPPv2IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f7} -@deffn {C++ Function} template<>gccjit::@ref{16e,,type} gccjit::@ref{16c,,context}::get_int_type<T> () +@anchor{cp/topics/types _CPPv4IEN6gccjit7context12get_int_typeI1TEEN6gccjit4typeEv}@anchor{1f7}@anchor{cp/topics/types _CPPv3IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f8}@anchor{cp/topics/types _CPPv2IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f9} +@deffn {C++ Function} template<>gccjit::@ref{170,,type} gccjit::@ref{16e,,context}::get_int_type<T> () Access the given integer type. For example, you could map the @code{unsigned short} type into a gccjit::type via: @@ -13479,34 +13519,34 @@ gccjit::type t = ctxt.get_int_type <unsigned short> (); @end deffn @node Pointers const and volatile<2>,Vector types<2>,Standard types<2>,Types<2> -@anchor{cp/topics/types pointers-const-and-volatile}@anchor{1f8} +@anchor{cp/topics/types pointers-const-and-volatile}@anchor{1fa} @subsubsection Pointers, @cite{const}, and @cite{volatile} @geindex gccjit;;type;;get_pointer (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type11get_pointerEv}@anchor{1eb}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_pointerEv}@anchor{1f9}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_pointerEv}@anchor{1fa}@anchor{cp/topics/types gccjit type get_pointer}@anchor{1fb} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16e,,type}::get_pointer () +@anchor{cp/topics/types _CPPv4N6gccjit4type11get_pointerEv}@anchor{1ed}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_pointerEv}@anchor{1fb}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_pointerEv}@anchor{1fc}@anchor{cp/topics/types gccjit type get_pointer}@anchor{1fd} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{170,,type}::get_pointer () Given type “T”, get type “T*”. @end deffn @geindex gccjit;;type;;get_const (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type9get_constEv}@anchor{1ec}@anchor{cp/topics/types _CPPv3N6gccjit4type9get_constEv}@anchor{1fc}@anchor{cp/topics/types _CPPv2N6gccjit4type9get_constEv}@anchor{1fd}@anchor{cp/topics/types gccjit type get_const}@anchor{1fe} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16e,,type}::get_const () +@anchor{cp/topics/types _CPPv4N6gccjit4type9get_constEv}@anchor{1ee}@anchor{cp/topics/types _CPPv3N6gccjit4type9get_constEv}@anchor{1fe}@anchor{cp/topics/types _CPPv2N6gccjit4type9get_constEv}@anchor{1ff}@anchor{cp/topics/types gccjit type get_const}@anchor{200} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{170,,type}::get_const () Given type “T”, get type “const T”. @end deffn @geindex gccjit;;type;;get_volatile (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type12get_volatileEv}@anchor{1ff}@anchor{cp/topics/types _CPPv3N6gccjit4type12get_volatileEv}@anchor{200}@anchor{cp/topics/types _CPPv2N6gccjit4type12get_volatileEv}@anchor{201}@anchor{cp/topics/types gccjit type get_volatile}@anchor{202} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16e,,type}::get_volatile () +@anchor{cp/topics/types _CPPv4N6gccjit4type12get_volatileEv}@anchor{201}@anchor{cp/topics/types _CPPv3N6gccjit4type12get_volatileEv}@anchor{202}@anchor{cp/topics/types _CPPv2N6gccjit4type12get_volatileEv}@anchor{203}@anchor{cp/topics/types gccjit type get_volatile}@anchor{204} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{170,,type}::get_volatile () Given type “T”, get type “volatile T”. @end deffn @geindex gccjit;;type;;get_aligned (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type11get_alignedE6size_t}@anchor{203}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_alignedE6size_t}@anchor{204}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_alignedE6size_t}@anchor{205}@anchor{cp/topics/types gccjit type get_aligned__s}@anchor{206} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16e,,type}::get_aligned (size_t alignment_in_bytes) +@anchor{cp/topics/types _CPPv4N6gccjit4type11get_alignedE6size_t}@anchor{205}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_alignedE6size_t}@anchor{206}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_alignedE6size_t}@anchor{207}@anchor{cp/topics/types gccjit type get_aligned__s}@anchor{208} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{170,,type}::get_aligned (size_t alignment_in_bytes) Given type “T”, get type: @@ -13518,21 +13558,21 @@ The alignment must be a power of two. @end deffn @geindex gccjit;;context;;new_array_type (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{207}@anchor{cp/topics/types _CPPv3N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{208}@anchor{cp/topics/types _CPPv2N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{209}@anchor{cp/topics/types gccjit context new_array_type__gccjit type i gccjit location}@anchor{20a} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16c,,context}::new_array_type (gccjit::type element_type, int num_elements, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{209}@anchor{cp/topics/types _CPPv3N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{20a}@anchor{cp/topics/types _CPPv2N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{20b}@anchor{cp/topics/types gccjit context new_array_type__gccjit type i gccjit location}@anchor{20c} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{16e,,context}::new_array_type (gccjit::type element_type, int num_elements, gccjit::location loc) Given type “T”, get type “T[N]” (for a constant N). Param “loc” is optional. @end deffn @node Vector types<2>,Structures and unions<2>,Pointers const and volatile<2>,Types<2> -@anchor{cp/topics/types vector-types}@anchor{20b} +@anchor{cp/topics/types vector-types}@anchor{20d} @subsubsection Vector types @geindex gccjit;;type;;get_vector (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type10get_vectorE6size_t}@anchor{20c}@anchor{cp/topics/types _CPPv3N6gccjit4type10get_vectorE6size_t}@anchor{20d}@anchor{cp/topics/types _CPPv2N6gccjit4type10get_vectorE6size_t}@anchor{20e}@anchor{cp/topics/types gccjit type get_vector__s}@anchor{20f} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{16e,,type}::get_vector (size_t num_units) +@anchor{cp/topics/types _CPPv4N6gccjit4type10get_vectorE6size_t}@anchor{20e}@anchor{cp/topics/types _CPPv3N6gccjit4type10get_vectorE6size_t}@anchor{20f}@anchor{cp/topics/types _CPPv2N6gccjit4type10get_vectorE6size_t}@anchor{210}@anchor{cp/topics/types gccjit type get_vector__s}@anchor{211} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{170,,type}::get_vector (size_t num_units) Given type “T”, get type: @@ -13544,31 +13584,31 @@ T must be integral or floating point; num_units must be a power of two. @end deffn @node Structures and unions<2>,,Vector types<2>,Types<2> -@anchor{cp/topics/types structures-and-unions}@anchor{210} +@anchor{cp/topics/types structures-and-unions}@anchor{212} @subsubsection Structures and unions @geindex gccjit;;struct_ (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit7struct_E}@anchor{211}@anchor{cp/topics/types _CPPv3N6gccjit7struct_E}@anchor{212}@anchor{cp/topics/types _CPPv2N6gccjit7struct_E}@anchor{213}@anchor{cp/topics/types gccjit struct_}@anchor{214} +@anchor{cp/topics/types _CPPv4N6gccjit7struct_E}@anchor{213}@anchor{cp/topics/types _CPPv3N6gccjit7struct_E}@anchor{214}@anchor{cp/topics/types _CPPv2N6gccjit7struct_E}@anchor{215}@anchor{cp/topics/types gccjit struct_}@anchor{216} @deffn {C++ Class} gccjit::struct_ @end deffn A compound type analagous to a C @cite{struct}. -@ref{211,,gccjit;;struct_} is a subclass of @ref{16e,,gccjit;;type} (and thus -of @ref{171,,gccjit;;object} in turn). +@ref{213,,gccjit;;struct_} is a subclass of @ref{170,,gccjit;;type} (and thus +of @ref{173,,gccjit;;object} in turn). @geindex gccjit;;field (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit5fieldE}@anchor{215}@anchor{cp/topics/types _CPPv3N6gccjit5fieldE}@anchor{216}@anchor{cp/topics/types _CPPv2N6gccjit5fieldE}@anchor{217}@anchor{cp/topics/types gccjit field}@anchor{218} +@anchor{cp/topics/types _CPPv4N6gccjit5fieldE}@anchor{217}@anchor{cp/topics/types _CPPv3N6gccjit5fieldE}@anchor{218}@anchor{cp/topics/types _CPPv2N6gccjit5fieldE}@anchor{219}@anchor{cp/topics/types gccjit field}@anchor{21a} @deffn {C++ Class} gccjit::field @end deffn -A field within a @ref{211,,gccjit;;struct_}. +A field within a @ref{213,,gccjit;;struct_}. -@ref{215,,gccjit;;field} is a subclass of @ref{171,,gccjit;;object}. +@ref{217,,gccjit;;field} is a subclass of @ref{173,,gccjit;;object}. -You can model C @cite{struct} types by creating @ref{211,,gccjit;;struct_} and -@ref{215,,gccjit;;field} instances, in either order: +You can model C @cite{struct} types by creating @ref{213,,gccjit;;struct_} and +@ref{217,,gccjit;;field} instances, in either order: @itemize * @@ -13616,15 +13656,15 @@ node.set_fields (fields); @c FIXME: the above API doesn't seem to exist yet @geindex gccjit;;context;;new_field (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{219}@anchor{cp/topics/types _CPPv3N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{21a}@anchor{cp/topics/types _CPPv2N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{21b}@anchor{cp/topics/types gccjit context new_field__gccjit type cCP gccjit location}@anchor{21c} -@deffn {C++ Function} gccjit::@ref{215,,field} gccjit::@ref{16c,,context}::new_field (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{21b}@anchor{cp/topics/types _CPPv3N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{21c}@anchor{cp/topics/types _CPPv2N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{21d}@anchor{cp/topics/types gccjit context new_field__gccjit type cCP gccjit location}@anchor{21e} +@deffn {C++ Function} gccjit::@ref{217,,field} gccjit::@ref{16e,,context}::new_field (gccjit::type type, const char *name, gccjit::location loc) Construct a new field, with the given type and name. @end deffn @geindex gccjit;;context;;new_struct_type (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21d}@anchor{cp/topics/types _CPPv3N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21e}@anchor{cp/topics/types _CPPv2N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21f}@anchor{cp/topics/types gccjit context new_struct_type__ssCR std vector field R gccjit location}@anchor{220} -@deffn {C++ Function} gccjit::@ref{211,,struct_} gccjit::@ref{16c,,context}::new_struct_type (const std::string &name, std::vector<field> &fields, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21f}@anchor{cp/topics/types _CPPv3N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{220}@anchor{cp/topics/types _CPPv2N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{221}@anchor{cp/topics/types gccjit context new_struct_type__ssCR std vector field R gccjit location}@anchor{222} +@deffn {C++ Function} gccjit::@ref{213,,struct_} gccjit::@ref{16e,,context}::new_struct_type (const std::string &name, std::vector<field> &fields, gccjit::location loc) @quotation @@ -13633,8 +13673,8 @@ Construct a new struct type, with the given name and fields. @end deffn @geindex gccjit;;context;;new_opaque_struct (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{221}@anchor{cp/topics/types _CPPv3N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{222}@anchor{cp/topics/types _CPPv2N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{223}@anchor{cp/topics/types gccjit context new_opaque_struct__ssCR gccjit location}@anchor{224} -@deffn {C++ Function} gccjit::@ref{211,,struct_} gccjit::@ref{16c,,context}::new_opaque_struct (const std::string &name, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{223}@anchor{cp/topics/types _CPPv3N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{224}@anchor{cp/topics/types _CPPv2N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{225}@anchor{cp/topics/types gccjit context new_opaque_struct__ssCR gccjit location}@anchor{226} +@deffn {C++ Function} gccjit::@ref{213,,struct_} gccjit::@ref{16e,,context}::new_opaque_struct (const std::string &name, gccjit::location loc) Construct a new struct type, with the given name, but without specifying the fields. The fields can be omitted (in which case the @@ -13660,7 +13700,7 @@ size of the struct is not known), or later specified using @c <https://www.gnu.org/licenses/>. @node Expressions<2>,Creating and using functions<2>,Types<2>,Topic Reference<2> -@anchor{cp/topics/expressions doc}@anchor{225}@anchor{cp/topics/expressions expressions}@anchor{226} +@anchor{cp/topics/expressions doc}@anchor{227}@anchor{cp/topics/expressions expressions}@anchor{228} @subsection Expressions @@ -13672,17 +13712,17 @@ size of the struct is not known), or later specified using @end menu @node Rvalues<2>,Lvalues<2>,,Expressions<2> -@anchor{cp/topics/expressions rvalues}@anchor{227} +@anchor{cp/topics/expressions rvalues}@anchor{229} @subsubsection Rvalues @geindex gccjit;;rvalue (C++ class) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalueE}@anchor{175}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalueE}@anchor{228}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalueE}@anchor{229}@anchor{cp/topics/expressions gccjit rvalue}@anchor{22a} +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalueE}@anchor{177}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalueE}@anchor{22a}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalueE}@anchor{22b}@anchor{cp/topics/expressions gccjit rvalue}@anchor{22c} @deffn {C++ Class} gccjit::rvalue @end deffn -A @ref{175,,gccjit;;rvalue} is an expression that can be computed. It is a -subclass of @ref{171,,gccjit;;object}, and is a thin wrapper around +A @ref{177,,gccjit;;rvalue} is an expression that can be computed. It is a +subclass of @ref{173,,gccjit;;object}, and is a thin wrapper around @ref{13,,gcc_jit_rvalue *} from the C API. It can be simple, e.g.: @@ -13728,8 +13768,8 @@ Every rvalue has an associated type, and the API will check to ensure that types match up correctly (otherwise the context will emit an error). @geindex gccjit;;rvalue;;get_type (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue8get_typeEv}@anchor{22b}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue8get_typeEv}@anchor{22c}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue8get_typeEv}@anchor{22d}@anchor{cp/topics/expressions gccjit rvalue get_type}@anchor{22e} -@deffn {C++ Function} gccjit::@ref{16e,,type} gccjit::@ref{175,,rvalue}::get_type () +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue8get_typeEv}@anchor{22d}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue8get_typeEv}@anchor{22e}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue8get_typeEv}@anchor{22f}@anchor{cp/topics/expressions gccjit rvalue get_type}@anchor{230} +@deffn {C++ Function} gccjit::@ref{170,,type} gccjit::@ref{177,,rvalue}::get_type () Get the type of this rvalue. @end deffn @@ -13747,29 +13787,29 @@ Get the type of this rvalue. @end menu @node Simple expressions<2>,Vector expressions<2>,,Rvalues<2> -@anchor{cp/topics/expressions simple-expressions}@anchor{22f} +@anchor{cp/topics/expressions simple-expressions}@anchor{231} @subsubsection Simple expressions @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{189}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{230}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{231}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type iC}@anchor{232} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (gccjit::type numeric_type, int value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{18b}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{232}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{233}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type iC}@anchor{234} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (gccjit::type numeric_type, int value) const Given a numeric type (integer or floating point), build an rvalue for the given constant @code{int} value. @end deffn @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{233}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{234}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{235}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type lC}@anchor{236} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (gccjit::type numeric_type, long value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{235}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{236}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{237}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type lC}@anchor{238} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (gccjit::type numeric_type, long value) const Given a numeric type (integer or floating point), build an rvalue for the given constant @code{long} value. @end deffn @geindex gccjit;;context;;zero (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{185}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{237}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{238}@anchor{cp/topics/expressions gccjit context zero__gccjit typeC}@anchor{239} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::zero (gccjit::type numeric_type) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{187}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{239}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{23a}@anchor{cp/topics/expressions gccjit context zero__gccjit typeC}@anchor{23b} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::zero (gccjit::type numeric_type) const Given a numeric type (integer or floating point), get the rvalue for zero. Essentially this is just a shortcut for: @@ -13780,8 +13820,8 @@ ctxt.new_rvalue (numeric_type, 0) @end deffn @geindex gccjit;;context;;one (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23a}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23b}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23c}@anchor{cp/topics/expressions gccjit context one__gccjit typeC}@anchor{23d} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::one (gccjit::type numeric_type) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23c}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23d}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context3oneEN6gccjit4typeE}@anchor{23e}@anchor{cp/topics/expressions gccjit context one__gccjit typeC}@anchor{23f} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::one (gccjit::type numeric_type) const Given a numeric type (integer or floating point), get the rvalue for one. Essentially this is just a shortcut for: @@ -13792,36 +13832,36 @@ ctxt.new_rvalue (numeric_type, 1) @end deffn @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{23e}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{23f}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{240}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type doubleC}@anchor{241} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (gccjit::type numeric_type, double value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{240}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{241}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{242}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type doubleC}@anchor{243} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (gccjit::type numeric_type, double value) const Given a numeric type (integer or floating point), build an rvalue for the given constant @code{double} value. @end deffn @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{242}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{243}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{244}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type voidPC}@anchor{245} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (gccjit::type pointer_type, void *value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{244}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{245}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{246}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type voidPC}@anchor{247} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (gccjit::type pointer_type, void *value) const Given a pointer type, build an rvalue for the given address. @end deffn @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{246}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{247}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{248}@anchor{cp/topics/expressions gccjit context new_rvalue__ssCRC}@anchor{249} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (const std::string &value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{248}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{249}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{24a}@anchor{cp/topics/expressions gccjit context new_rvalue__ssCRC}@anchor{24b} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (const std::string &value) const Generate an rvalue of type @code{GCC_JIT_TYPE_CONST_CHAR_PTR} for the given string. This is akin to a string literal. @end deffn @node Vector expressions<2>,Unary Operations<2>,Simple expressions<2>,Rvalues<2> -@anchor{cp/topics/expressions vector-expressions}@anchor{24a} +@anchor{cp/topics/expressions vector-expressions}@anchor{24c} @subsubsection Vector expressions @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24b}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24c}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24d}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type std vector gccjit rvalue C}@anchor{24e} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_rvalue (gccjit::type vector_type, std::vector<gccjit::rvalue> elements) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24d}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24e}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24f}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type std vector gccjit rvalue C}@anchor{250} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_rvalue (gccjit::type vector_type, std::vector<gccjit::rvalue> elements) const Given a vector type, and a vector of scalar rvalue elements, generate a vector rvalue. @@ -13830,13 +13870,13 @@ The number of elements needs to match that of the vector type. @end deffn @node Unary Operations<2>,Binary Operations<2>,Vector expressions<2>,Rvalues<2> -@anchor{cp/topics/expressions unary-operations}@anchor{24f} +@anchor{cp/topics/expressions unary-operations}@anchor{251} @subsubsection Unary Operations @geindex gccjit;;context;;new_unary_op (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{250}@anchor{cp/topics/expressions _CPPv3N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{251}@anchor{cp/topics/expressions _CPPv2N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{252}@anchor{cp/topics/expressions gccjit context new_unary_op__gcc_jit_unary_op gccjit type gccjit rvalue gccjit location}@anchor{253} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_unary_op (enum gcc_jit_unary_op, gccjit::type result_type, gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{252}@anchor{cp/topics/expressions _CPPv3N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{253}@anchor{cp/topics/expressions _CPPv2N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{254}@anchor{cp/topics/expressions gccjit context new_unary_op__gcc_jit_unary_op gccjit type gccjit rvalue gccjit location}@anchor{255} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_unary_op (enum gcc_jit_unary_op, gccjit::type result_type, gccjit::rvalue rvalue, gccjit::location loc) Build a unary operation out of an input rvalue. @@ -13851,8 +13891,8 @@ There are shorter ways to spell the various specific kinds of unary operation: @geindex gccjit;;context;;new_minus (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{254}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{255}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{256}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit location}@anchor{257} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{256}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{257}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{258}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit location}@anchor{259} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) Negate an arithmetic value; for example: @@ -13868,8 +13908,8 @@ builds the equivalent of this C expression: @end deffn @geindex new_bitwise_negate (C++ function) -@anchor{cp/topics/expressions _CPPv418new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{258}@anchor{cp/topics/expressions _CPPv318new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{259}@anchor{cp/topics/expressions _CPPv218new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25a}@anchor{cp/topics/expressions new_bitwise_negate__gccjit type gccjit rvalue gccjit location}@anchor{25b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} new_bitwise_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv418new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25a}@anchor{cp/topics/expressions _CPPv318new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25b}@anchor{cp/topics/expressions _CPPv218new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25c}@anchor{cp/topics/expressions new_bitwise_negate__gccjit type gccjit rvalue gccjit location}@anchor{25d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} new_bitwise_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) Bitwise negation of an integer value (one’s complement); for example: @@ -13885,8 +13925,8 @@ builds the equivalent of this C expression: @end deffn @geindex new_logical_negate (C++ function) -@anchor{cp/topics/expressions _CPPv418new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25c}@anchor{cp/topics/expressions _CPPv318new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25d}@anchor{cp/topics/expressions _CPPv218new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25e}@anchor{cp/topics/expressions new_logical_negate__gccjit type gccjit rvalue gccjit location}@anchor{25f} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} new_logical_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv418new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25e}@anchor{cp/topics/expressions _CPPv318new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25f}@anchor{cp/topics/expressions _CPPv218new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{260}@anchor{cp/topics/expressions new_logical_negate__gccjit type gccjit rvalue gccjit location}@anchor{261} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} new_logical_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) Logical negation of an arithmetic or pointer value; for example: @@ -13904,8 +13944,8 @@ builds the equivalent of this C expression: The most concise way to spell them is with overloaded operators: @geindex operator- (C++ function) -@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueE}@anchor{260}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueE}@anchor{261}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueE}@anchor{262}@anchor{cp/topics/expressions sub-operator__gccjit rvalue}@anchor{263} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator@w{-} (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueE}@anchor{262}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueE}@anchor{263}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueE}@anchor{264}@anchor{cp/topics/expressions sub-operator__gccjit rvalue}@anchor{265} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator@w{-} (gccjit::rvalue a) @example gccjit::rvalue negpi = -pi; @@ -13913,8 +13953,8 @@ gccjit::rvalue negpi = -pi; @end deffn @geindex operator~ (C++ function) -@anchor{cp/topics/expressions _CPPv4coN6gccjit6rvalueE}@anchor{264}@anchor{cp/topics/expressions _CPPv3coN6gccjit6rvalueE}@anchor{265}@anchor{cp/topics/expressions _CPPv2coN6gccjit6rvalueE}@anchor{266}@anchor{cp/topics/expressions inv-operator__gccjit rvalue}@anchor{267} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator~ (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4coN6gccjit6rvalueE}@anchor{266}@anchor{cp/topics/expressions _CPPv3coN6gccjit6rvalueE}@anchor{267}@anchor{cp/topics/expressions _CPPv2coN6gccjit6rvalueE}@anchor{268}@anchor{cp/topics/expressions inv-operator__gccjit rvalue}@anchor{269} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator~ (gccjit::rvalue a) @example gccjit::rvalue mask = ~a; @@ -13922,8 +13962,8 @@ gccjit::rvalue mask = ~a; @end deffn @geindex operator! (C++ function) -@anchor{cp/topics/expressions _CPPv4ntN6gccjit6rvalueE}@anchor{268}@anchor{cp/topics/expressions _CPPv3ntN6gccjit6rvalueE}@anchor{269}@anchor{cp/topics/expressions _CPPv2ntN6gccjit6rvalueE}@anchor{26a}@anchor{cp/topics/expressions not-operator__gccjit rvalue}@anchor{26b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator! (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4ntN6gccjit6rvalueE}@anchor{26a}@anchor{cp/topics/expressions _CPPv3ntN6gccjit6rvalueE}@anchor{26b}@anchor{cp/topics/expressions _CPPv2ntN6gccjit6rvalueE}@anchor{26c}@anchor{cp/topics/expressions not-operator__gccjit rvalue}@anchor{26d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator! (gccjit::rvalue a) @example gccjit::rvalue guard = !cond; @@ -13931,13 +13971,13 @@ gccjit::rvalue guard = !cond; @end deffn @node Binary Operations<2>,Comparisons<2>,Unary Operations<2>,Rvalues<2> -@anchor{cp/topics/expressions binary-operations}@anchor{26c} +@anchor{cp/topics/expressions binary-operations}@anchor{26e} @subsubsection Binary Operations @geindex gccjit;;context;;new_binary_op (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{174}@anchor{cp/topics/expressions _CPPv3N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26d}@anchor{cp/topics/expressions _CPPv2N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26e}@anchor{cp/topics/expressions gccjit context new_binary_op__gcc_jit_binary_op gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{26f} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_binary_op (enum gcc_jit_binary_op, gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{176}@anchor{cp/topics/expressions _CPPv3N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26f}@anchor{cp/topics/expressions _CPPv2N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{270}@anchor{cp/topics/expressions gccjit context new_binary_op__gcc_jit_binary_op gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{271} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_binary_op (enum gcc_jit_binary_op, gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) Build a binary operation out of two constituent rvalues. @@ -13952,60 +13992,60 @@ There are shorter ways to spell the various specific kinds of binary operation: @geindex gccjit;;context;;new_plus (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{270}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{271}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{272}@anchor{cp/topics/expressions gccjit context new_plus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{273} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_plus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{272}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{273}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{274}@anchor{cp/topics/expressions gccjit context new_plus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{275} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_plus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_minus (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{274}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{275}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{276}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{277} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{276}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{277}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{278}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{279} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_mult (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{278}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{279}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27a}@anchor{cp/topics/expressions gccjit context new_mult__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{27b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_mult (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27a}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27b}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27c}@anchor{cp/topics/expressions gccjit context new_mult__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{27d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_mult (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_divide (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27c}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27d}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27e}@anchor{cp/topics/expressions gccjit context new_divide__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{27f} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_divide (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27e}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27f}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{280}@anchor{cp/topics/expressions gccjit context new_divide__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{281} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_divide (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_modulo (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{280}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{281}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{282}@anchor{cp/topics/expressions gccjit context new_modulo__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{283} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_modulo (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{282}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{283}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{284}@anchor{cp/topics/expressions gccjit context new_modulo__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{285} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_modulo (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_bitwise_and (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{284}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{285}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{286}@anchor{cp/topics/expressions gccjit context new_bitwise_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{287} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_bitwise_and (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{286}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{287}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{288}@anchor{cp/topics/expressions gccjit context new_bitwise_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{289} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_bitwise_and (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_bitwise_xor (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{288}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{289}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28a}@anchor{cp/topics/expressions gccjit context new_bitwise_xor__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{28b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_bitwise_xor (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28a}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28b}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28c}@anchor{cp/topics/expressions gccjit context new_bitwise_xor__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{28d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_bitwise_xor (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_bitwise_or (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28c}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28d}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28e}@anchor{cp/topics/expressions gccjit context new_bitwise_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{28f} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_bitwise_or (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28e}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28f}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{290}@anchor{cp/topics/expressions gccjit context new_bitwise_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{291} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_bitwise_or (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_logical_and (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{290}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{291}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{292}@anchor{cp/topics/expressions gccjit context new_logical_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{293} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_logical_and (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{292}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{293}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{294}@anchor{cp/topics/expressions gccjit context new_logical_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{295} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_logical_and (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_logical_or (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{294}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{295}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{296}@anchor{cp/topics/expressions gccjit context new_logical_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{297} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_logical_or (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{296}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{297}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{298}@anchor{cp/topics/expressions gccjit context new_logical_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{299} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_logical_or (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn The most concise way to spell them is with overloaded operators: @geindex operator+ (C++ function) -@anchor{cp/topics/expressions _CPPv4plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{298}@anchor{cp/topics/expressions _CPPv3plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{299}@anchor{cp/topics/expressions _CPPv2plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29a}@anchor{cp/topics/expressions add-operator__gccjit rvalue gccjit rvalue}@anchor{29b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator+ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29a}@anchor{cp/topics/expressions _CPPv3plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29b}@anchor{cp/topics/expressions _CPPv2plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29c}@anchor{cp/topics/expressions add-operator__gccjit rvalue gccjit rvalue}@anchor{29d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator+ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue sum = a + b; @@ -14013,8 +14053,8 @@ gccjit::rvalue sum = a + b; @end deffn @geindex operator- (C++ function) -@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29c}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29d}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29e}@anchor{cp/topics/expressions sub-operator__gccjit rvalue gccjit rvalue}@anchor{29f} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator@w{-} (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29e}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29f}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a0}@anchor{cp/topics/expressions sub-operator__gccjit rvalue gccjit rvalue}@anchor{2a1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator@w{-} (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue diff = a - b; @@ -14022,8 +14062,8 @@ gccjit::rvalue diff = a - b; @end deffn @geindex operator* (C++ function) -@anchor{cp/topics/expressions _CPPv4mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a0}@anchor{cp/topics/expressions _CPPv3mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a1}@anchor{cp/topics/expressions _CPPv2mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a2}@anchor{cp/topics/expressions mul-operator__gccjit rvalue gccjit rvalue}@anchor{2a3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator* (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a2}@anchor{cp/topics/expressions _CPPv3mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a3}@anchor{cp/topics/expressions _CPPv2mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a4}@anchor{cp/topics/expressions mul-operator__gccjit rvalue gccjit rvalue}@anchor{2a5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator* (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue prod = a * b; @@ -14031,8 +14071,8 @@ gccjit::rvalue prod = a * b; @end deffn @geindex operator/ (C++ function) -@anchor{cp/topics/expressions _CPPv4dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a4}@anchor{cp/topics/expressions _CPPv3dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a5}@anchor{cp/topics/expressions _CPPv2dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a6}@anchor{cp/topics/expressions div-operator__gccjit rvalue gccjit rvalue}@anchor{2a7} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator/ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a6}@anchor{cp/topics/expressions _CPPv3dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a7}@anchor{cp/topics/expressions _CPPv2dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a8}@anchor{cp/topics/expressions div-operator__gccjit rvalue gccjit rvalue}@anchor{2a9} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator/ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue result = a / b; @@ -14040,8 +14080,8 @@ gccjit::rvalue result = a / b; @end deffn @geindex operator% (C++ function) -@anchor{cp/topics/expressions _CPPv4rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a8}@anchor{cp/topics/expressions _CPPv3rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a9}@anchor{cp/topics/expressions _CPPv2rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2aa}@anchor{cp/topics/expressions mod-operator__gccjit rvalue gccjit rvalue}@anchor{2ab} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator% (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2aa}@anchor{cp/topics/expressions _CPPv3rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ab}@anchor{cp/topics/expressions _CPPv2rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ac}@anchor{cp/topics/expressions mod-operator__gccjit rvalue gccjit rvalue}@anchor{2ad} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator% (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue mod = a % b; @@ -14049,8 +14089,8 @@ gccjit::rvalue mod = a % b; @end deffn @geindex operator& (C++ function) -@anchor{cp/topics/expressions _CPPv4anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ac}@anchor{cp/topics/expressions _CPPv3anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ad}@anchor{cp/topics/expressions _CPPv2anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ae}@anchor{cp/topics/expressions and-operator__gccjit rvalue gccjit rvalue}@anchor{2af} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator& (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ae}@anchor{cp/topics/expressions _CPPv3anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2af}@anchor{cp/topics/expressions _CPPv2anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b0}@anchor{cp/topics/expressions and-operator__gccjit rvalue gccjit rvalue}@anchor{2b1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator& (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a & b; @@ -14058,8 +14098,8 @@ gccjit::rvalue x = a & b; @end deffn @geindex operator^ (C++ function) -@anchor{cp/topics/expressions _CPPv4eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b0}@anchor{cp/topics/expressions _CPPv3eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b1}@anchor{cp/topics/expressions _CPPv2eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b2}@anchor{cp/topics/expressions xor-operator__gccjit rvalue gccjit rvalue}@anchor{2b3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator^ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b2}@anchor{cp/topics/expressions _CPPv3eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b3}@anchor{cp/topics/expressions _CPPv2eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b4}@anchor{cp/topics/expressions xor-operator__gccjit rvalue gccjit rvalue}@anchor{2b5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator^ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a ^ b; @@ -14067,8 +14107,8 @@ gccjit::rvalue x = a ^ b; @end deffn @geindex operator| (C++ function) -@anchor{cp/topics/expressions _CPPv4orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b4}@anchor{cp/topics/expressions _CPPv3orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b5}@anchor{cp/topics/expressions _CPPv2orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b6}@anchor{cp/topics/expressions or-operator__gccjit rvalue gccjit rvalue}@anchor{2b7} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator| (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b6}@anchor{cp/topics/expressions _CPPv3orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b7}@anchor{cp/topics/expressions _CPPv2orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b8}@anchor{cp/topics/expressions or-operator__gccjit rvalue gccjit rvalue}@anchor{2b9} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator| (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a | b; @@ -14076,8 +14116,8 @@ gccjit::rvalue x = a | b; @end deffn @geindex operator&& (C++ function) -@anchor{cp/topics/expressions _CPPv4aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b8}@anchor{cp/topics/expressions _CPPv3aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b9}@anchor{cp/topics/expressions _CPPv2aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ba}@anchor{cp/topics/expressions sand-operator__gccjit rvalue gccjit rvalue}@anchor{2bb} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator&& (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ba}@anchor{cp/topics/expressions _CPPv3aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bb}@anchor{cp/topics/expressions _CPPv2aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bc}@anchor{cp/topics/expressions sand-operator__gccjit rvalue gccjit rvalue}@anchor{2bd} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator&& (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = a && b; @@ -14085,8 +14125,8 @@ gccjit::rvalue cond = a && b; @end deffn @geindex operator|| (C++ function) -@anchor{cp/topics/expressions _CPPv4ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bc}@anchor{cp/topics/expressions _CPPv3ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bd}@anchor{cp/topics/expressions _CPPv2ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2be}@anchor{cp/topics/expressions sor-operator__gccjit rvalue gccjit rvalue}@anchor{2bf} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator|| (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2be}@anchor{cp/topics/expressions _CPPv3ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bf}@anchor{cp/topics/expressions _CPPv2ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2c0}@anchor{cp/topics/expressions sor-operator__gccjit rvalue gccjit rvalue}@anchor{2c1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator|| (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = a || b; @@ -14104,13 +14144,13 @@ gccjit::rvalue discriminant = (b * b) - (four * a * c); @end quotation @node Comparisons<2>,Function calls<2>,Binary Operations<2>,Rvalues<2> -@anchor{cp/topics/expressions comparisons}@anchor{2c0} +@anchor{cp/topics/expressions comparisons}@anchor{2c2} @subsubsection Comparisons @geindex gccjit;;context;;new_comparison (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{186}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c1}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c2}@anchor{cp/topics/expressions gccjit context new_comparison__gcc_jit_comparison gccjit rvalue gccjit rvalue gccjit location}@anchor{2c3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_comparison (enum gcc_jit_comparison, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{188}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c3}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c4}@anchor{cp/topics/expressions gccjit context new_comparison__gcc_jit_comparison gccjit rvalue gccjit rvalue gccjit location}@anchor{2c5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_comparison (enum gcc_jit_comparison, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) Build a boolean rvalue out of the comparison of two other rvalues. @@ -14125,40 +14165,40 @@ There are shorter ways to spell the various specific kinds of binary operation: @geindex gccjit;;context;;new_eq (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c4}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c5}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c6}@anchor{cp/topics/expressions gccjit context new_eq__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c7} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_eq (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c6}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c7}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c8}@anchor{cp/topics/expressions gccjit context new_eq__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c9} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_eq (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_ne (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c8}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c9}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ca}@anchor{cp/topics/expressions gccjit context new_ne__gccjit rvalue gccjit rvalue gccjit location}@anchor{2cb} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_ne (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ca}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cb}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cc}@anchor{cp/topics/expressions gccjit context new_ne__gccjit rvalue gccjit rvalue gccjit location}@anchor{2cd} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_ne (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_lt (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cc}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cd}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ce}@anchor{cp/topics/expressions gccjit context new_lt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2cf} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_lt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ce}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cf}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d0}@anchor{cp/topics/expressions gccjit context new_lt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_lt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_le (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d0}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d1}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d2}@anchor{cp/topics/expressions gccjit context new_le__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_le (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d2}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d3}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d4}@anchor{cp/topics/expressions gccjit context new_le__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_le (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_gt (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d4}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d5}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d6}@anchor{cp/topics/expressions gccjit context new_gt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d7} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_gt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d6}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d7}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d8}@anchor{cp/topics/expressions gccjit context new_gt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d9} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_gt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn @geindex gccjit;;context;;new_ge (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d8}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d9}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2da}@anchor{cp/topics/expressions gccjit context new_ge__gccjit rvalue gccjit rvalue gccjit location}@anchor{2db} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_ge (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2da}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2db}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2dc}@anchor{cp/topics/expressions gccjit context new_ge__gccjit rvalue gccjit rvalue gccjit location}@anchor{2dd} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_ge (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) @end deffn The most concise way to spell them is with overloaded operators: @geindex operator== (C++ function) -@anchor{cp/topics/expressions _CPPv4eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2dc}@anchor{cp/topics/expressions _CPPv3eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2dd}@anchor{cp/topics/expressions _CPPv2eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2de}@anchor{cp/topics/expressions eq-operator__gccjit rvalue gccjit rvalue}@anchor{2df} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator== (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2de}@anchor{cp/topics/expressions _CPPv3eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2df}@anchor{cp/topics/expressions _CPPv2eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e0}@anchor{cp/topics/expressions eq-operator__gccjit rvalue gccjit rvalue}@anchor{2e1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator== (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (a == ctxt.zero (t_int)); @@ -14166,8 +14206,8 @@ gccjit::rvalue cond = (a == ctxt.zero (t_int)); @end deffn @geindex operator!= (C++ function) -@anchor{cp/topics/expressions _CPPv4neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e0}@anchor{cp/topics/expressions _CPPv3neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e1}@anchor{cp/topics/expressions _CPPv2neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e2}@anchor{cp/topics/expressions neq-operator__gccjit rvalue gccjit rvalue}@anchor{2e3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator!= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e2}@anchor{cp/topics/expressions _CPPv3neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e3}@anchor{cp/topics/expressions _CPPv2neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e4}@anchor{cp/topics/expressions neq-operator__gccjit rvalue gccjit rvalue}@anchor{2e5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator!= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (i != j); @@ -14175,8 +14215,8 @@ gccjit::rvalue cond = (i != j); @end deffn @geindex operator< (C++ function) -@anchor{cp/topics/expressions _CPPv4ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e4}@anchor{cp/topics/expressions _CPPv3ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e5}@anchor{cp/topics/expressions _CPPv2ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e6}@anchor{cp/topics/expressions lt-operator__gccjit rvalue gccjit rvalue}@anchor{2e7} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator< (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e6}@anchor{cp/topics/expressions _CPPv3ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e7}@anchor{cp/topics/expressions _CPPv2ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e8}@anchor{cp/topics/expressions lt-operator__gccjit rvalue gccjit rvalue}@anchor{2e9} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator< (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = i < n; @@ -14184,8 +14224,8 @@ gccjit::rvalue cond = i < n; @end deffn @geindex operator<= (C++ function) -@anchor{cp/topics/expressions _CPPv4leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e8}@anchor{cp/topics/expressions _CPPv3leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e9}@anchor{cp/topics/expressions _CPPv2leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ea}@anchor{cp/topics/expressions lte-operator__gccjit rvalue gccjit rvalue}@anchor{2eb} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator<= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ea}@anchor{cp/topics/expressions _CPPv3leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2eb}@anchor{cp/topics/expressions _CPPv2leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ec}@anchor{cp/topics/expressions lte-operator__gccjit rvalue gccjit rvalue}@anchor{2ed} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator<= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = i <= n; @@ -14193,8 +14233,8 @@ gccjit::rvalue cond = i <= n; @end deffn @geindex operator> (C++ function) -@anchor{cp/topics/expressions _CPPv4gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ec}@anchor{cp/topics/expressions _CPPv3gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ed}@anchor{cp/topics/expressions _CPPv2gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ee}@anchor{cp/topics/expressions gt-operator__gccjit rvalue gccjit rvalue}@anchor{2ef} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator> (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ee}@anchor{cp/topics/expressions _CPPv3gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ef}@anchor{cp/topics/expressions _CPPv2gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f0}@anchor{cp/topics/expressions gt-operator__gccjit rvalue gccjit rvalue}@anchor{2f1} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator> (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (ch > limit); @@ -14202,8 +14242,8 @@ gccjit::rvalue cond = (ch > limit); @end deffn @geindex operator>= (C++ function) -@anchor{cp/topics/expressions _CPPv4geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f0}@anchor{cp/topics/expressions _CPPv3geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f1}@anchor{cp/topics/expressions _CPPv2geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f2}@anchor{cp/topics/expressions gte-operator__gccjit rvalue gccjit rvalue}@anchor{2f3} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} operator>= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f2}@anchor{cp/topics/expressions _CPPv3geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f3}@anchor{cp/topics/expressions _CPPv2geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2f4}@anchor{cp/topics/expressions gte-operator__gccjit rvalue gccjit rvalue}@anchor{2f5} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} operator>= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (score >= ctxt.new_rvalue (t_int, 100)); @@ -14213,12 +14253,12 @@ gccjit::rvalue cond = (score >= ctxt.new_rvalue (t_int, 100)); @c TODO: beyond this point @node Function calls<2>,Function pointers<3>,Comparisons<2>,Rvalues<2> -@anchor{cp/topics/expressions function-calls}@anchor{2f4} +@anchor{cp/topics/expressions function-calls}@anchor{2f6} @subsubsection Function calls @geindex gcc_jit_context_new_call (C++ function) -@anchor{cp/topics/expressions _CPPv424gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f5}@anchor{cp/topics/expressions _CPPv324gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f6}@anchor{cp/topics/expressions _CPPv224gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f7}@anchor{cp/topics/expressions gcc_jit_context_new_call__gcc_jit_contextP gcc_jit_locationP gcc_jit_functionP i gcc_jit_rvaluePP}@anchor{2f8} +@anchor{cp/topics/expressions _CPPv424gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f7}@anchor{cp/topics/expressions _CPPv324gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f8}@anchor{cp/topics/expressions _CPPv224gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f9}@anchor{cp/topics/expressions gcc_jit_context_new_call__gcc_jit_contextP gcc_jit_locationP gcc_jit_functionP i gcc_jit_rvaluePP}@anchor{2fa} @deffn {C++ Function} gcc_jit_rvalue *gcc_jit_context_new_call (gcc_jit_context *ctxt, gcc_jit_location *loc, gcc_jit_function *func, int numargs, gcc_jit_rvalue **args) Given a function and the given table of argument rvalues, construct a @@ -14227,14 +14267,14 @@ call to the function, with the result as an rvalue. @cartouche @quotation Note @code{gccjit::context::new_call()} merely builds a -@ref{175,,gccjit;;rvalue} i.e. an expression that can be evaluated, +@ref{177,,gccjit;;rvalue} i.e. an expression that can be evaluated, perhaps as part of a more complicated expression. The call @emph{won’t} happen unless you add a statement to a function that evaluates the expression. For example, if you want to call a function and discard the result (or to call a function with @code{void} return type), use -@ref{2f9,,gccjit;;block;;add_eval()}: +@ref{2fb,,gccjit;;block;;add_eval()}: @example /* Add "(void)printf (arg0, arg1);". */ @@ -14245,26 +14285,26 @@ block.add_eval (ctxt.new_call (printf_func, arg0, arg1)); @end deffn @node Function pointers<3>,Type-coercion<2>,Function calls<2>,Rvalues<2> -@anchor{cp/topics/expressions function-pointers}@anchor{2fa} +@anchor{cp/topics/expressions function-pointers}@anchor{2fc} @subsubsection Function pointers @geindex gccjit;;function;;get_address (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fb}@anchor{cp/topics/expressions _CPPv3N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fc}@anchor{cp/topics/expressions _CPPv2N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fd}@anchor{cp/topics/expressions gccjit function get_address__gccjit location}@anchor{2fe} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{183,,function}::get_address (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fd}@anchor{cp/topics/expressions _CPPv3N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fe}@anchor{cp/topics/expressions _CPPv2N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2ff}@anchor{cp/topics/expressions gccjit function get_address__gccjit location}@anchor{300} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{185,,function}::get_address (gccjit::location loc) Get the address of a function as an rvalue, of function pointer type. @end deffn @node Type-coercion<2>,,Function pointers<3>,Rvalues<2> -@anchor{cp/topics/expressions type-coercion}@anchor{2ff} +@anchor{cp/topics/expressions type-coercion}@anchor{301} @subsubsection Type-coercion @geindex gccjit;;context;;new_cast (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{300}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{301}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{302}@anchor{cp/topics/expressions gccjit context new_cast__gccjit rvalue gccjit type gccjit location}@anchor{303} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{16c,,context}::new_cast (gccjit::rvalue rvalue, gccjit::type type, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{302}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{303}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{304}@anchor{cp/topics/expressions gccjit context new_cast__gccjit rvalue gccjit type gccjit location}@anchor{305} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{16e,,context}::new_cast (gccjit::rvalue rvalue, gccjit::type type, gccjit::location loc) Given an rvalue of T, construct another rvalue of another type. @@ -14288,25 +14328,25 @@ P* <-> Q*, for pointer types P and Q @end deffn @node Lvalues<2>,Working with pointers structs and unions<2>,Rvalues<2>,Expressions<2> -@anchor{cp/topics/expressions lvalues}@anchor{304} +@anchor{cp/topics/expressions lvalues}@anchor{306} @subsubsection Lvalues @geindex gccjit;;lvalue (C++ class) -@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalueE}@anchor{17e}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalueE}@anchor{305}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalueE}@anchor{306}@anchor{cp/topics/expressions gccjit lvalue}@anchor{307} +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalueE}@anchor{180}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalueE}@anchor{307}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalueE}@anchor{308}@anchor{cp/topics/expressions gccjit lvalue}@anchor{309} @deffn {C++ Class} gccjit::lvalue @end deffn An lvalue is something that can of the @emph{left}-hand side of an assignment: a storage area (such as a variable). It is a subclass of -@ref{175,,gccjit;;rvalue}, where the rvalue is computed by reading from the +@ref{177,,gccjit;;rvalue}, where the rvalue is computed by reading from the storage area. It iss a thin wrapper around @ref{24,,gcc_jit_lvalue *} from the C API. @geindex gccjit;;lvalue;;get_address (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{308}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{309}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{30a}@anchor{cp/topics/expressions gccjit lvalue get_address__gccjit location}@anchor{30b} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{17e,,lvalue}::get_address (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{30a}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{30b}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{30c}@anchor{cp/topics/expressions gccjit lvalue get_address__gccjit location}@anchor{30d} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{180,,lvalue}::get_address (gccjit::location loc) Take the address of an lvalue; analogous to: @@ -14325,28 +14365,28 @@ Parameter “loc” is optional. @end menu @node Global variables<2>,,,Lvalues<2> -@anchor{cp/topics/expressions global-variables}@anchor{30c} +@anchor{cp/topics/expressions global-variables}@anchor{30e} @subsubsection Global variables @geindex gccjit;;context;;new_global (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30f}@anchor{cp/topics/expressions gccjit context new_global__gcc_jit_global_kind gccjit type cCP gccjit location}@anchor{310} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{16c,,context}::new_global (enum gcc_jit_global_kind, gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30f}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{310}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{311}@anchor{cp/topics/expressions gccjit context new_global__gcc_jit_global_kind gccjit type cCP gccjit location}@anchor{312} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{16e,,context}::new_global (enum gcc_jit_global_kind, gccjit::type type, const char *name, gccjit::location loc) Add a new global variable of the given type and name to the context. -This is a thin wrapper around @ref{ef,,gcc_jit_context_new_global()} from +This is a thin wrapper around @ref{f0,,gcc_jit_context_new_global()} from the C API; the “kind” parameter has the same meaning as there. @end deffn @node Working with pointers structs and unions<2>,,Lvalues<2>,Expressions<2> -@anchor{cp/topics/expressions working-with-pointers-structs-and-unions}@anchor{311} +@anchor{cp/topics/expressions working-with-pointers-structs-and-unions}@anchor{313} @subsubsection Working with pointers, structs and unions @geindex gccjit;;rvalue;;dereference (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{312}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{313}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{314}@anchor{cp/topics/expressions gccjit rvalue dereference__gccjit location}@anchor{315} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{175,,rvalue}::dereference (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{314}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{315}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{316}@anchor{cp/topics/expressions gccjit rvalue dereference__gccjit location}@anchor{317} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{177,,rvalue}::dereference (gccjit::location loc) Given an rvalue of pointer type @code{T *}, dereferencing the pointer, getting an lvalue of type @code{T}. Analogous to: @@ -14364,8 +14404,8 @@ If you don’t need to specify the location, this can also be expressed using an overloaded operator: @geindex gccjit;;rvalue;;operator* (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvaluemlEv}@anchor{316}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvaluemlEv}@anchor{317}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvaluemlEv}@anchor{318}@anchor{cp/topics/expressions gccjit rvalue mul-operator}@anchor{319} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{175,,rvalue}::operator* () +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvaluemlEv}@anchor{318}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvaluemlEv}@anchor{319}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvaluemlEv}@anchor{31a}@anchor{cp/topics/expressions gccjit rvalue mul-operator}@anchor{31b} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{177,,rvalue}::operator* () @example gccjit::lvalue content = *ptr; @@ -14375,8 +14415,8 @@ gccjit::lvalue content = *ptr; Field access is provided separately for both lvalues and rvalues: @geindex gccjit;;lvalue;;access_field (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31a}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31b}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31c}@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{31d} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{17e,,lvalue}::access_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31c}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31d}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31e}@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{31f} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{180,,lvalue}::access_field (gccjit::field field, gccjit::location loc) Given an lvalue of struct or union type, access the given field, getting an lvalue of the field’s type. Analogous to: @@ -14389,8 +14429,8 @@ in C. @end deffn @geindex gccjit;;rvalue;;access_field (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31e}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31f}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{320}@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{321} -@deffn {C++ Function} gccjit::@ref{175,,rvalue} gccjit::@ref{175,,rvalue}::access_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{320}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{321}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{322}@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{323} +@deffn {C++ Function} gccjit::@ref{177,,rvalue} gccjit::@ref{177,,rvalue}::access_field (gccjit::field field, gccjit::location loc) Given an rvalue of struct or union type, access the given field as an rvalue. Analogous to: @@ -14403,8 +14443,8 @@ in C. @end deffn @geindex gccjit;;rvalue;;dereference_field (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{322}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{323}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{324}@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{325} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{175,,rvalue}::dereference_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{324}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{325}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{326}@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{327} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{177,,rvalue}::dereference_field (gccjit::field field, gccjit::location loc) Given an rvalue of pointer type @code{T *} where T is of struct or union type, access the given field as an lvalue. Analogous to: @@ -14417,8 +14457,8 @@ in C, itself equivalent to @code{(*EXPR).FIELD}. @end deffn @geindex gccjit;;context;;new_array_access (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{326}@anchor{cp/topics/expressions _CPPv3N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{327}@anchor{cp/topics/expressions _CPPv2N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{328}@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{329} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{16c,,context}::new_array_access (gccjit::rvalue ptr, gccjit::rvalue index, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{328}@anchor{cp/topics/expressions _CPPv3N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{329}@anchor{cp/topics/expressions _CPPv2N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{32a}@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{32b} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{16e,,context}::new_array_access (gccjit::rvalue ptr, gccjit::rvalue index, gccjit::location loc) Given an rvalue of pointer type @code{T *}, get at the element @cite{T} at the given index, using standard C array indexing rules i.e. each @@ -14434,7 +14474,7 @@ in C (or, indeed, to @code{PTR + INDEX}). Parameter “loc” is optional. @end deffn -For array accesses where you don’t need to specify a @ref{192,,gccjit;;location}, +For array accesses where you don’t need to specify a @ref{194,,gccjit;;location}, two overloaded operators are available: @quotation @@ -14470,7 +14510,7 @@ gccjit::lvalue element = array[0]; @c <https://www.gnu.org/licenses/>. @node Creating and using functions<2>,Source Locations<2>,Expressions<2>,Topic Reference<2> -@anchor{cp/topics/functions doc}@anchor{32a}@anchor{cp/topics/functions creating-and-using-functions}@anchor{32b} +@anchor{cp/topics/functions doc}@anchor{32c}@anchor{cp/topics/functions creating-and-using-functions}@anchor{32d} @subsection Creating and using functions @@ -14483,36 +14523,36 @@ gccjit::lvalue element = array[0]; @end menu @node Params<2>,Functions<2>,,Creating and using functions<2> -@anchor{cp/topics/functions params}@anchor{32c} +@anchor{cp/topics/functions params}@anchor{32e} @subsubsection Params @geindex gccjit;;param (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit5paramE}@anchor{17f}@anchor{cp/topics/functions _CPPv3N6gccjit5paramE}@anchor{32d}@anchor{cp/topics/functions _CPPv2N6gccjit5paramE}@anchor{32e}@anchor{cp/topics/functions gccjit param}@anchor{32f} +@anchor{cp/topics/functions _CPPv4N6gccjit5paramE}@anchor{181}@anchor{cp/topics/functions _CPPv3N6gccjit5paramE}@anchor{32f}@anchor{cp/topics/functions _CPPv2N6gccjit5paramE}@anchor{330}@anchor{cp/topics/functions gccjit param}@anchor{331} @deffn {C++ Class} gccjit::param A @cite{gccjit::param} represents a parameter to a function. @end deffn @geindex gccjit;;context;;new_param (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{173}@anchor{cp/topics/functions _CPPv3N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{330}@anchor{cp/topics/functions _CPPv2N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{331}@anchor{cp/topics/functions gccjit context new_param__gccjit type cCP gccjit location}@anchor{332} -@deffn {C++ Function} gccjit::@ref{17f,,param} gccjit::@ref{16c,,context}::new_param (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{175}@anchor{cp/topics/functions _CPPv3N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{332}@anchor{cp/topics/functions _CPPv2N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{333}@anchor{cp/topics/functions gccjit context new_param__gccjit type cCP gccjit location}@anchor{334} +@deffn {C++ Function} gccjit::@ref{181,,param} gccjit::@ref{16e,,context}::new_param (gccjit::type type, const char *name, gccjit::location loc) In preparation for creating a function, create a new parameter of the given type and name. @end deffn -@ref{17f,,gccjit;;param} is a subclass of @ref{17e,,gccjit;;lvalue} (and thus -of @ref{175,,gccjit;;rvalue} and @ref{171,,gccjit;;object}). It is a thin +@ref{181,,gccjit;;param} is a subclass of @ref{180,,gccjit;;lvalue} (and thus +of @ref{177,,gccjit;;rvalue} and @ref{173,,gccjit;;object}). It is a thin wrapper around the C API’s @ref{25,,gcc_jit_param *}. @node Functions<2>,Blocks<2>,Params<2>,Creating and using functions<2> -@anchor{cp/topics/functions functions}@anchor{333} +@anchor{cp/topics/functions functions}@anchor{335} @subsubsection Functions @geindex gccjit;;function (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit8functionE}@anchor{183}@anchor{cp/topics/functions _CPPv3N6gccjit8functionE}@anchor{334}@anchor{cp/topics/functions _CPPv2N6gccjit8functionE}@anchor{335}@anchor{cp/topics/functions gccjit function}@anchor{336} +@anchor{cp/topics/functions _CPPv4N6gccjit8functionE}@anchor{185}@anchor{cp/topics/functions _CPPv3N6gccjit8functionE}@anchor{336}@anchor{cp/topics/functions _CPPv2N6gccjit8functionE}@anchor{337}@anchor{cp/topics/functions gccjit function}@anchor{338} @deffn {C++ Class} gccjit::function A @cite{gccjit::function} represents a function - either one that we’re @@ -14520,8 +14560,8 @@ creating ourselves, or one that we’re referencing. @end deffn @geindex gccjit;;context;;new_function (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{337}@anchor{cp/topics/functions _CPPv3N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{338}@anchor{cp/topics/functions _CPPv2N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{339}@anchor{cp/topics/functions gccjit context new_function__gcc_jit_function_kind gccjit type cCP std vector param R i gccjit location}@anchor{33a} -@deffn {C++ Function} gccjit::@ref{183,,function} gccjit::@ref{16c,,context}::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector<param> ¶ms, int is_variadic, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{339}@anchor{cp/topics/functions _CPPv3N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{33a}@anchor{cp/topics/functions _CPPv2N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{33b}@anchor{cp/topics/functions gccjit context new_function__gcc_jit_function_kind gccjit type cCP std vector param R i gccjit location}@anchor{33c} +@deffn {C++ Function} gccjit::@ref{185,,function} gccjit::@ref{16e,,context}::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector<param> ¶ms, int is_variadic, gccjit::location loc) Create a gcc_jit_function with the given name and parameters. @@ -14531,49 +14571,49 @@ This is a wrapper around the C API’s @ref{11,,gcc_jit_context_new_function()}. @end deffn @geindex gccjit;;context;;get_builtin_function (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit7context20get_builtin_functionEPKc}@anchor{33b}@anchor{cp/topics/functions _CPPv3N6gccjit7context20get_builtin_functionEPKc}@anchor{33c}@anchor{cp/topics/functions _CPPv2N6gccjit7context20get_builtin_functionEPKc}@anchor{33d}@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{33e} -@deffn {C++ Function} gccjit::@ref{183,,function} gccjit::@ref{16c,,context}::get_builtin_function (const char *name) +@anchor{cp/topics/functions _CPPv4N6gccjit7context20get_builtin_functionEPKc}@anchor{33d}@anchor{cp/topics/functions _CPPv3N6gccjit7context20get_builtin_functionEPKc}@anchor{33e}@anchor{cp/topics/functions _CPPv2N6gccjit7context20get_builtin_functionEPKc}@anchor{33f}@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{340} +@deffn {C++ Function} gccjit::@ref{185,,function} gccjit::@ref{16e,,context}::get_builtin_function (const char *name) This is a wrapper around the C API’s -@ref{108,,gcc_jit_context_get_builtin_function()}. +@ref{109,,gcc_jit_context_get_builtin_function()}. @end deffn @geindex gccjit;;function;;get_param (C++ function) -@anchor{cp/topics/functions _CPPv4NK6gccjit8function9get_paramEi}@anchor{33f}@anchor{cp/topics/functions _CPPv3NK6gccjit8function9get_paramEi}@anchor{340}@anchor{cp/topics/functions _CPPv2NK6gccjit8function9get_paramEi}@anchor{341}@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{342} -@deffn {C++ Function} gccjit::@ref{17f,,param} gccjit::@ref{183,,function}::get_param (int index) const +@anchor{cp/topics/functions _CPPv4NK6gccjit8function9get_paramEi}@anchor{341}@anchor{cp/topics/functions _CPPv3NK6gccjit8function9get_paramEi}@anchor{342}@anchor{cp/topics/functions _CPPv2NK6gccjit8function9get_paramEi}@anchor{343}@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{344} +@deffn {C++ Function} gccjit::@ref{181,,param} gccjit::@ref{185,,function}::get_param (int index) const Get the param of the given index (0-based). @end deffn @geindex gccjit;;function;;dump_to_dot (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit8function11dump_to_dotEPKc}@anchor{18b}@anchor{cp/topics/functions _CPPv3N6gccjit8function11dump_to_dotEPKc}@anchor{343}@anchor{cp/topics/functions _CPPv2N6gccjit8function11dump_to_dotEPKc}@anchor{344}@anchor{cp/topics/functions gccjit function dump_to_dot__cCP}@anchor{345} -@deffn {C++ Function} void gccjit::@ref{183,,function}::dump_to_dot (const char *path) +@anchor{cp/topics/functions _CPPv4N6gccjit8function11dump_to_dotEPKc}@anchor{18d}@anchor{cp/topics/functions _CPPv3N6gccjit8function11dump_to_dotEPKc}@anchor{345}@anchor{cp/topics/functions _CPPv2N6gccjit8function11dump_to_dotEPKc}@anchor{346}@anchor{cp/topics/functions gccjit function dump_to_dot__cCP}@anchor{347} +@deffn {C++ Function} void gccjit::@ref{185,,function}::dump_to_dot (const char *path) Emit the function in graphviz format to the given path. @end deffn @geindex gccjit;;function;;new_local (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{180}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{346}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{347}@anchor{cp/topics/functions gccjit function new_local__gccjit type cCP gccjit location}@anchor{348} -@deffn {C++ Function} gccjit::@ref{17e,,lvalue} gccjit::@ref{183,,function}::new_local (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{182}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{348}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{349}@anchor{cp/topics/functions gccjit function new_local__gccjit type cCP gccjit location}@anchor{34a} +@deffn {C++ Function} gccjit::@ref{180,,lvalue} gccjit::@ref{185,,function}::new_local (gccjit::type type, const char *name, gccjit::location loc) Create a new local variable within the function, of the given type and name. @end deffn @node Blocks<2>,Statements<2>,Functions<2>,Creating and using functions<2> -@anchor{cp/topics/functions blocks}@anchor{349} +@anchor{cp/topics/functions blocks}@anchor{34b} @subsubsection Blocks @geindex gccjit;;block (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit5blockE}@anchor{182}@anchor{cp/topics/functions _CPPv3N6gccjit5blockE}@anchor{34a}@anchor{cp/topics/functions _CPPv2N6gccjit5blockE}@anchor{34b}@anchor{cp/topics/functions gccjit block}@anchor{34c} +@anchor{cp/topics/functions _CPPv4N6gccjit5blockE}@anchor{184}@anchor{cp/topics/functions _CPPv3N6gccjit5blockE}@anchor{34c}@anchor{cp/topics/functions _CPPv2N6gccjit5blockE}@anchor{34d}@anchor{cp/topics/functions gccjit block}@anchor{34e} @deffn {C++ Class} gccjit::block A @cite{gccjit::block} represents a basic block within a function i.e. a sequence of statements with a single entry point and a single exit point. -@ref{182,,gccjit;;block} is a subclass of @ref{171,,gccjit;;object}. +@ref{184,,gccjit;;block} is a subclass of @ref{173,,gccjit;;object}. The first basic block that you create within a function will be the entrypoint. @@ -14587,8 +14627,8 @@ one function. @end deffn @geindex gccjit;;function;;new_block (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_blockEPKc}@anchor{34d}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_blockEPKc}@anchor{34e}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_blockEPKc}@anchor{34f}@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{350} -@deffn {C++ Function} gccjit::@ref{182,,block} gccjit::@ref{183,,function}::new_block (const char *name) +@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_blockEPKc}@anchor{34f}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_blockEPKc}@anchor{350}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_blockEPKc}@anchor{351}@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{352} +@deffn {C++ Function} gccjit::@ref{184,,block} gccjit::@ref{185,,function}::new_block (const char *name) Create a basic block of the given name. The name may be NULL, but providing meaningful names is often helpful when debugging: it may @@ -14597,13 +14637,13 @@ messages. @end deffn @node Statements<2>,,Blocks<2>,Creating and using functions<2> -@anchor{cp/topics/functions statements}@anchor{351} +@anchor{cp/topics/functions statements}@anchor{353} @subsubsection Statements @geindex gccjit;;block;;add_eval (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2f9}@anchor{cp/topics/functions _CPPv3N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{352}@anchor{cp/topics/functions _CPPv2N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{353}@anchor{cp/topics/functions gccjit block add_eval__gccjit rvalue gccjit location}@anchor{354} -@deffn {C++ Function} void gccjit::@ref{182,,block}::add_eval (gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2fb}@anchor{cp/topics/functions _CPPv3N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{354}@anchor{cp/topics/functions _CPPv2N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{355}@anchor{cp/topics/functions gccjit block add_eval__gccjit rvalue gccjit location}@anchor{356} +@deffn {C++ Function} void gccjit::@ref{184,,block}::add_eval (gccjit::rvalue rvalue, gccjit::location loc) Add evaluation of an rvalue, discarding the result (e.g. a function call that “returns” void). @@ -14616,8 +14656,8 @@ This is equivalent to this C code: @end deffn @geindex gccjit;;block;;add_assignment (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{184}@anchor{cp/topics/functions _CPPv3N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{355}@anchor{cp/topics/functions _CPPv2N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{356}@anchor{cp/topics/functions gccjit block add_assignment__gccjit lvalue gccjit rvalue gccjit location}@anchor{357} -@deffn {C++ Function} void gccjit::@ref{182,,block}::add_assignment (gccjit::lvalue lvalue, gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{186}@anchor{cp/topics/functions _CPPv3N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{357}@anchor{cp/topics/functions _CPPv2N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{358}@anchor{cp/topics/functions gccjit block add_assignment__gccjit lvalue gccjit rvalue gccjit location}@anchor{359} +@deffn {C++ Function} void gccjit::@ref{184,,block}::add_assignment (gccjit::lvalue lvalue, gccjit::rvalue rvalue, gccjit::location loc) Add evaluation of an rvalue, assigning the result to the given lvalue. @@ -14630,8 +14670,8 @@ lvalue = rvalue; @end deffn @geindex gccjit;;block;;add_assignment_op (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{188}@anchor{cp/topics/functions _CPPv3N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{358}@anchor{cp/topics/functions _CPPv2N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{359}@anchor{cp/topics/functions gccjit block add_assignment_op__gccjit lvalue gcc_jit_binary_op gccjit rvalue gccjit location}@anchor{35a} -@deffn {C++ Function} void gccjit::@ref{182,,block}::add_assignment_op (gccjit::lvalue lvalue, enum gcc_jit_binary_op, gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{18a}@anchor{cp/topics/functions _CPPv3N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{35a}@anchor{cp/topics/functions _CPPv2N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{35b}@anchor{cp/topics/functions gccjit block add_assignment_op__gccjit lvalue gcc_jit_binary_op gccjit rvalue gccjit location}@anchor{35c} +@deffn {C++ Function} void gccjit::@ref{184,,block}::add_assignment_op (gccjit::lvalue lvalue, enum gcc_jit_binary_op, gccjit::rvalue rvalue, gccjit::location loc) Add evaluation of an rvalue, using the result to modify an lvalue. @@ -14656,8 +14696,8 @@ loop_body.add_assignment_op ( @end deffn @geindex gccjit;;block;;add_comment (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{194}@anchor{cp/topics/functions _CPPv3N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{35b}@anchor{cp/topics/functions _CPPv2N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{35c}@anchor{cp/topics/functions gccjit block add_comment__cCP gccjit location}@anchor{35d} -@deffn {C++ Function} void gccjit::@ref{182,,block}::add_comment (const char *text, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{196}@anchor{cp/topics/functions _CPPv3N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{35d}@anchor{cp/topics/functions _CPPv2N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{35e}@anchor{cp/topics/functions gccjit block add_comment__cCP gccjit location}@anchor{35f} +@deffn {C++ Function} void gccjit::@ref{184,,block}::add_comment (const char *text, gccjit::location loc) Add a no-op textual comment to the internal representation of the code. It will be optimized away, but will be visible in the dumps @@ -14670,8 +14710,8 @@ Parameter “loc” is optional. @end deffn @geindex gccjit;;block;;end_with_conditional (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{187}@anchor{cp/topics/functions _CPPv3N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{35e}@anchor{cp/topics/functions _CPPv2N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{35f}@anchor{cp/topics/functions gccjit block end_with_conditional__gccjit rvalue gccjit block gccjit block gccjit location}@anchor{360} -@deffn {C++ Function} void gccjit::@ref{182,,block}::end_with_conditional (gccjit::rvalue boolval, gccjit::block on_true, gccjit::block on_false, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{189}@anchor{cp/topics/functions _CPPv3N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{360}@anchor{cp/topics/functions _CPPv2N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{361}@anchor{cp/topics/functions gccjit block end_with_conditional__gccjit rvalue gccjit block gccjit block gccjit location}@anchor{362} +@deffn {C++ Function} void gccjit::@ref{184,,block}::end_with_conditional (gccjit::rvalue boolval, gccjit::block on_true, gccjit::block on_false, gccjit::location loc) Terminate a block by adding evaluation of an rvalue, branching on the result to the appropriate successor block. @@ -14689,8 +14729,8 @@ block, boolval, on_true, and on_false must be non-NULL. @end deffn @geindex gccjit;;block;;end_with_jump (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{361}@anchor{cp/topics/functions _CPPv3N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{362}@anchor{cp/topics/functions _CPPv2N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{363}@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{364} -@deffn {C++ Function} void gccjit::@ref{182,,block}::end_with_jump (gccjit::block target, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{363}@anchor{cp/topics/functions _CPPv3N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{364}@anchor{cp/topics/functions _CPPv2N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{365}@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{366} +@deffn {C++ Function} void gccjit::@ref{184,,block}::end_with_jump (gccjit::block target, gccjit::location loc) Terminate a block by adding a jump to the given target block. @@ -14702,8 +14742,8 @@ goto target; @end deffn @geindex gccjit;;block;;end_with_return (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{365}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{366}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{367}@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{368} -@deffn {C++ Function} void gccjit::@ref{182,,block}::end_with_return (gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{367}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{368}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{369}@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{36a} +@deffn {C++ Function} void gccjit::@ref{184,,block}::end_with_return (gccjit::rvalue rvalue, gccjit::location loc) Terminate a block. @@ -14732,8 +14772,8 @@ return; @end deffn @geindex gccjit;;block;;end_with_switch (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{369}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{36a}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{36b}@anchor{cp/topics/functions gccjit block end_with_switch__gccjit rvalue gccjit block std vector gccjit case_ gccjit location}@anchor{36c} -@deffn {C++ Function} void gccjit::@ref{182,,block}::end_with_switch (gccjit::rvalue expr, gccjit::block default_block, std::vector<gccjit::case_> cases, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{36b}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{36c}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{36d}@anchor{cp/topics/functions gccjit block end_with_switch__gccjit rvalue gccjit block std vector gccjit case_ gccjit location}@anchor{36e} +@deffn {C++ Function} void gccjit::@ref{184,,block}::end_with_switch (gccjit::rvalue expr, gccjit::block default_block, std::vector<gccjit::case_> cases, gccjit::location loc) Terminate a block by adding evalation of an rvalue, then performing a multiway branch. @@ -14773,14 +14813,14 @@ The API entrypoints relating to switch statements and cases: @itemize * @item -@ref{369,,gccjit;;block;;end_with_switch()} +@ref{36b,,gccjit;;block;;end_with_switch()} @item @code{gccjit::context::new_case()} @end itemize @end quotation -were added in @ref{119,,LIBGCCJIT_ABI_3}; you can test for their presence +were added in @ref{11a,,LIBGCCJIT_ABI_3}; you can test for their presence using @example @@ -14788,9 +14828,9 @@ using @end example A @cite{gccjit::case_} represents a case within a switch statement, and -is created within a particular @ref{16c,,gccjit;;context} using +is created within a particular @ref{16e,,gccjit;;context} using @code{gccjit::context::new_case()}. It is a subclass of -@ref{171,,gccjit;;object}. +@ref{173,,gccjit;;object}. Each case expresses a multivalued range of integer values. You can express single-valued cases by passing in the same value for @@ -14893,12 +14933,12 @@ create_code (gcc_jit_context *c_ctxt, void *user_data) @c <https://www.gnu.org/licenses/>. @node Source Locations<2>,Compiling a context<2>,Creating and using functions<2>,Topic Reference<2> -@anchor{cp/topics/locations doc}@anchor{36d}@anchor{cp/topics/locations source-locations}@anchor{36e} +@anchor{cp/topics/locations doc}@anchor{36f}@anchor{cp/topics/locations source-locations}@anchor{370} @subsection Source Locations @geindex gccjit;;location (C++ class) -@anchor{cp/topics/locations _CPPv4N6gccjit8locationE}@anchor{192}@anchor{cp/topics/locations _CPPv3N6gccjit8locationE}@anchor{36f}@anchor{cp/topics/locations _CPPv2N6gccjit8locationE}@anchor{370}@anchor{cp/topics/locations gccjit location}@anchor{371} +@anchor{cp/topics/locations _CPPv4N6gccjit8locationE}@anchor{194}@anchor{cp/topics/locations _CPPv3N6gccjit8locationE}@anchor{371}@anchor{cp/topics/locations _CPPv2N6gccjit8locationE}@anchor{372}@anchor{cp/topics/locations gccjit location}@anchor{373} @deffn {C++ Class} gccjit::location A @cite{gccjit::location} encapsulates a source code location, so that @@ -14909,10 +14949,10 @@ single-step through your language. @cite{gccjit::location} instances are optional: you can always omit them from any C++ API entrypoint accepting one. -You can construct them using @ref{198,,gccjit;;context;;new_location()}. +You can construct them using @ref{19a,,gccjit;;context;;new_location()}. You need to enable @ref{42,,GCC_JIT_BOOL_OPTION_DEBUGINFO} on the -@ref{16c,,gccjit;;context} for these locations to actually be usable by +@ref{16e,,gccjit;;context} for these locations to actually be usable by the debugger: @example @@ -14921,8 +14961,8 @@ ctxt.set_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO, 1); @end deffn @geindex gccjit;;context;;new_location (C++ function) -@anchor{cp/topics/locations _CPPv4N6gccjit7context12new_locationEPKcii}@anchor{198}@anchor{cp/topics/locations _CPPv3N6gccjit7context12new_locationEPKcii}@anchor{372}@anchor{cp/topics/locations _CPPv2N6gccjit7context12new_locationEPKcii}@anchor{373}@anchor{cp/topics/locations gccjit context new_location__cCP i i}@anchor{374} -@deffn {C++ Function} gccjit::@ref{192,,location} gccjit::@ref{16c,,context}::new_location (const char *filename, int line, int column) +@anchor{cp/topics/locations _CPPv4N6gccjit7context12new_locationEPKcii}@anchor{19a}@anchor{cp/topics/locations _CPPv3N6gccjit7context12new_locationEPKcii}@anchor{374}@anchor{cp/topics/locations _CPPv2N6gccjit7context12new_locationEPKcii}@anchor{375}@anchor{cp/topics/locations gccjit context new_location__cCP i i}@anchor{376} +@deffn {C++ Function} gccjit::@ref{194,,location} gccjit::@ref{16e,,context}::new_location (const char *filename, int line, int column) Create a @cite{gccjit::location} instance representing the given source location. @@ -14934,13 +14974,13 @@ location. @end menu @node Faking it<2>,,,Source Locations<2> -@anchor{cp/topics/locations faking-it}@anchor{375} +@anchor{cp/topics/locations faking-it}@anchor{377} @subsubsection Faking it If you don’t have source code for your internal representation, but need to debug, you can generate a C-like representation of the functions in -your context using @ref{1b7,,gccjit;;context;;dump_to_file()}: +your context using @ref{1b9,,gccjit;;context;;dump_to_file()}: @example ctxt.dump_to_file ("/tmp/something.c", @@ -14970,13 +15010,13 @@ file, giving you @emph{something} you can step through in the debugger. @c <https://www.gnu.org/licenses/>. @node Compiling a context<2>,Using Assembly Language with libgccjit++,Source Locations<2>,Topic Reference<2> -@anchor{cp/topics/compilation doc}@anchor{376}@anchor{cp/topics/compilation compiling-a-context}@anchor{377} +@anchor{cp/topics/compilation doc}@anchor{378}@anchor{cp/topics/compilation compiling-a-context}@anchor{379} @subsection Compiling a context -Once populated, a @ref{16c,,gccjit;;context} can be compiled to -machine code, either in-memory via @ref{176,,gccjit;;context;;compile()} or -to disk via @ref{378,,gccjit;;context;;compile_to_file()}. +Once populated, a @ref{16e,,gccjit;;context} can be compiled to +machine code, either in-memory via @ref{178,,gccjit;;context;;compile()} or +to disk via @ref{37a,,gccjit;;context;;compile_to_file()}. You can compile a context multiple times (using either form of compilation), although any errors that occur on the context will @@ -14989,13 +15029,13 @@ prevent any future compilation of that context. @end menu @node In-memory compilation<2>,Ahead-of-time compilation<2>,,Compiling a context<2> -@anchor{cp/topics/compilation in-memory-compilation}@anchor{379} +@anchor{cp/topics/compilation in-memory-compilation}@anchor{37b} @subsubsection In-memory compilation @geindex gccjit;;context;;compile (C++ function) -@anchor{cp/topics/compilation _CPPv4N6gccjit7context7compileEv}@anchor{176}@anchor{cp/topics/compilation _CPPv3N6gccjit7context7compileEv}@anchor{37a}@anchor{cp/topics/compilation _CPPv2N6gccjit7context7compileEv}@anchor{37b}@anchor{cp/topics/compilation gccjit context compile}@anchor{37c} -@deffn {C++ Function} gcc_jit_result *gccjit::@ref{16c,,context}::compile () +@anchor{cp/topics/compilation _CPPv4N6gccjit7context7compileEv}@anchor{178}@anchor{cp/topics/compilation _CPPv3N6gccjit7context7compileEv}@anchor{37c}@anchor{cp/topics/compilation _CPPv2N6gccjit7context7compileEv}@anchor{37d}@anchor{cp/topics/compilation gccjit context compile}@anchor{37e} +@deffn {C++ Function} gcc_jit_result *gccjit::@ref{16e,,context}::compile () This calls into GCC and builds the code, returning a @cite{gcc_jit_result *}. @@ -15005,19 +15045,19 @@ This is a thin wrapper around the @end deffn @node Ahead-of-time compilation<2>,,In-memory compilation<2>,Compiling a context<2> -@anchor{cp/topics/compilation ahead-of-time-compilation}@anchor{37d} +@anchor{cp/topics/compilation ahead-of-time-compilation}@anchor{37f} @subsubsection Ahead-of-time compilation Although libgccjit is primarily aimed at just-in-time compilation, it can also be used for implementing more traditional ahead-of-time -compilers, via the @ref{378,,gccjit;;context;;compile_to_file()} method. +compilers, via the @ref{37a,,gccjit;;context;;compile_to_file()} method. @geindex gccjit;;context;;compile_to_file (C++ function) -@anchor{cp/topics/compilation _CPPv4N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{378}@anchor{cp/topics/compilation _CPPv3N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{37e}@anchor{cp/topics/compilation _CPPv2N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{37f}@anchor{cp/topics/compilation gccjit context compile_to_file__gcc_jit_output_kind cCP}@anchor{380} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::compile_to_file (enum gcc_jit_output_kind, const char *output_path) +@anchor{cp/topics/compilation _CPPv4N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{37a}@anchor{cp/topics/compilation _CPPv3N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{380}@anchor{cp/topics/compilation _CPPv2N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{381}@anchor{cp/topics/compilation gccjit context compile_to_file__gcc_jit_output_kind cCP}@anchor{382} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::compile_to_file (enum gcc_jit_output_kind, const char *output_path) -Compile the @ref{16c,,gccjit;;context} to a file of the given +Compile the @ref{16e,,gccjit;;context} to a file of the given kind. This is a thin wrapper around the @@ -15042,7 +15082,7 @@ This is a thin wrapper around the @c <https://www.gnu.org/licenses/>. @node Using Assembly Language with libgccjit++,,Compiling a context<2>,Topic Reference<2> -@anchor{cp/topics/asm doc}@anchor{381}@anchor{cp/topics/asm using-assembly-language-with-libgccjit}@anchor{382} +@anchor{cp/topics/asm doc}@anchor{383}@anchor{cp/topics/asm using-assembly-language-with-libgccjit}@anchor{384} @subsection Using Assembly Language with libgccjit++ @@ -15052,7 +15092,7 @@ following assumes a familiarity with that functionality. See How to Use Inline Assembly Language in C Code@footnote{https://gcc.gnu.org/onlinedocs/gcc/Using-Assembly-Language-with-C.html} in GCC’s documentation, the “Extended Asm” section in particular. -These entrypoints were added in @ref{14b,,LIBGCCJIT_ABI_15}; you can test +These entrypoints were added in @ref{14c,,LIBGCCJIT_ABI_15}; you can test for their presence using @quotation @@ -15069,38 +15109,38 @@ for their presence using @end menu @node Adding assembler instructions within a function<2>,Adding top-level assembler statements<2>,,Using Assembly Language with libgccjit++ -@anchor{cp/topics/asm adding-assembler-instructions-within-a-function}@anchor{383} +@anchor{cp/topics/asm adding-assembler-instructions-within-a-function}@anchor{385} @subsubsection Adding assembler instructions within a function @geindex gccjit;;extended_asm (C++ class) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asmE}@anchor{384}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asmE}@anchor{385}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asmE}@anchor{386}@anchor{cp/topics/asm gccjit extended_asm}@anchor{387} +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asmE}@anchor{386}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asmE}@anchor{387}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asmE}@anchor{388}@anchor{cp/topics/asm gccjit extended_asm}@anchor{389} @deffn {C++ Class} gccjit::extended_asm A @cite{gccjit::extended_asm} represents an extended @code{asm} statement: a series of low-level instructions inside a function that convert inputs to outputs. -@ref{384,,gccjit;;extended_asm} is a subclass of @ref{171,,gccjit;;object}. -It is a thin wrapper around the C API’s @ref{11a,,gcc_jit_extended_asm *}. +@ref{386,,gccjit;;extended_asm} is a subclass of @ref{173,,gccjit;;object}. +It is a thin wrapper around the C API’s @ref{11b,,gcc_jit_extended_asm *}. To avoid having an API entrypoint with a very large number of parameters, an extended @code{asm} statement is made in stages: -an initial call to create the @ref{384,,gccjit;;extended_asm}, +an initial call to create the @ref{386,,gccjit;;extended_asm}, followed by calls to add operands and set other properties of the statement. -There are two API entrypoints for creating a @ref{384,,gccjit;;extended_asm}: +There are two API entrypoints for creating a @ref{386,,gccjit;;extended_asm}: @itemize * @item -@ref{388,,gccjit;;block;;add_extended_asm()} for an @code{asm} statement with +@ref{38a,,gccjit;;block;;add_extended_asm()} for an @code{asm} statement with no control flow, and @item -@ref{389,,gccjit;;block;;end_with_extended_asm_goto()} for an @code{asm goto}. +@ref{38b,,gccjit;;block;;end_with_extended_asm_goto()} for an @code{asm goto}. @end itemize For example, to create the equivalent of: @@ -15128,8 +15168,8 @@ extended @code{asm} statement (e.g. the @code{%0} and @code{%1} above), the equivalent to the C syntax is followed i.e. all output operands, then all input operands, regardless of what order the calls to -@ref{38a,,gccjit;;extended_asm;;add_output_operand()} and -@ref{38b,,gccjit;;extended_asm;;add_input_operand()} were made in. +@ref{38c,,gccjit;;extended_asm;;add_output_operand()} and +@ref{38d,,gccjit;;extended_asm;;add_input_operand()} were made in. @end quotation @end cartouche @@ -15154,10 +15194,10 @@ the following API calls could be used: @end deffn @geindex gccjit;;block;;add_extended_asm (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{388}@anchor{cp/topics/asm _CPPv3N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38c}@anchor{cp/topics/asm _CPPv2N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38d}@anchor{cp/topics/asm gccjit block add_extended_asm__ssCR gccjit location}@anchor{38e} -@deffn {C++ Function} @ref{384,,extended_asm} gccjit::@ref{182,,block}::add_extended_asm (const std::string &asm_template, gccjit::location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38a}@anchor{cp/topics/asm _CPPv3N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38e}@anchor{cp/topics/asm _CPPv2N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38f}@anchor{cp/topics/asm gccjit block add_extended_asm__ssCR gccjit location}@anchor{390} +@deffn {C++ Function} @ref{386,,extended_asm} gccjit::@ref{184,,block}::add_extended_asm (const std::string &asm_template, gccjit::location loc = location()) -Create a @ref{384,,gccjit;;extended_asm} for an extended @code{asm} statement +Create a @ref{386,,gccjit;;extended_asm} for an extended @code{asm} statement with no control flow (i.e. without the @code{goto} qualifier). The parameter @code{asm_template} corresponds to the @cite{AssemblerTemplate} @@ -15167,10 +15207,10 @@ an on-stack buffer. @end deffn @geindex gccjit;;block;;end_with_extended_asm_goto (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{389}@anchor{cp/topics/asm _CPPv3N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{38f}@anchor{cp/topics/asm _CPPv2N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{390}@anchor{cp/topics/asm gccjit block end_with_extended_asm_goto__ssCR std vector block blockP location}@anchor{391} -@deffn {C++ Function} @ref{384,,extended_asm} gccjit::@ref{182,,block}::end_with_extended_asm_goto (const std::string &asm_template, std::vector<block> goto_blocks, block *fallthrough_block, location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{38b}@anchor{cp/topics/asm _CPPv3N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{391}@anchor{cp/topics/asm _CPPv2N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{392}@anchor{cp/topics/asm gccjit block end_with_extended_asm_goto__ssCR std vector block blockP location}@anchor{393} +@deffn {C++ Function} @ref{386,,extended_asm} gccjit::@ref{184,,block}::end_with_extended_asm_goto (const std::string &asm_template, std::vector<block> goto_blocks, block *fallthrough_block, location loc = location()) -Create a @ref{384,,gccjit;;extended_asm} for an extended @code{asm} statement +Create a @ref{386,,gccjit;;extended_asm} for an extended @code{asm} statement that may perform jumps, and use it to terminate the given block. This is equivalent to the @code{goto} qualifier in C’s extended @code{asm} syntax. @@ -15219,7 +15259,7 @@ to fall through to after the statement. @cartouche @quotation Note -This is needed since each @ref{182,,gccjit;;block} must have a +This is needed since each @ref{184,,gccjit;;block} must have a single exit point, as a basic block: you can’t jump from the middle of a block. A “goto” is implicitly added after the asm to handle the fallthrough case, which is equivalent to what @@ -15229,10 +15269,10 @@ would have happened in the C case. @end deffn @geindex gccjit;;extended_asm;;set_volatile_flag (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17set_volatile_flagEb}@anchor{392}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17set_volatile_flagEb}@anchor{393}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17set_volatile_flagEb}@anchor{394}@anchor{cp/topics/asm gccjit extended_asm set_volatile_flag__b}@anchor{395} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::set_volatile_flag (bool flag) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17set_volatile_flagEb}@anchor{394}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17set_volatile_flagEb}@anchor{395}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17set_volatile_flagEb}@anchor{396}@anchor{cp/topics/asm gccjit extended_asm set_volatile_flag__b}@anchor{397} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::set_volatile_flag (bool flag) -Set whether the @ref{384,,gccjit;;extended_asm} has side-effects, equivalent to the +Set whether the @ref{386,,gccjit;;extended_asm} has side-effects, equivalent to the volatile@footnote{https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Volatile} qualifier in C’s extended asm syntax. @@ -15260,12 +15300,12 @@ the following API calls could be used: .add_clobber ("rdx"); @end example -where the @ref{384,,gccjit;;extended_asm} is flagged as volatile. +where the @ref{386,,gccjit;;extended_asm} is flagged as volatile. @end deffn @geindex gccjit;;extended_asm;;set_inline_flag (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm15set_inline_flagEb}@anchor{396}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm15set_inline_flagEb}@anchor{397}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm15set_inline_flagEb}@anchor{398}@anchor{cp/topics/asm gccjit extended_asm set_inline_flag__b}@anchor{399} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::set_inline_flag (bool flag) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm15set_inline_flagEb}@anchor{398}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm15set_inline_flagEb}@anchor{399}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm15set_inline_flagEb}@anchor{39a}@anchor{cp/topics/asm gccjit extended_asm set_inline_flag__b}@anchor{39b} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::set_inline_flag (bool flag) Set the equivalent of the inline@footnote{https://gcc.gnu.org/onlinedocs/gcc/Size-of-an-asm.html#Size-of-an-asm} @@ -15273,8 +15313,8 @@ qualifier in C’s extended @code{asm} syntax. @end deffn @geindex gccjit;;extended_asm;;add_output_operand (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{38a}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{39a}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{39b}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR ssCR gccjit lvalue}@anchor{39c} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::add_output_operand (const std::string &asm_symbolic_name, const std::string &constraint, gccjit::lvalue dest) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{38c}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{39c}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{39d}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR ssCR gccjit lvalue}@anchor{39e} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::add_output_operand (const std::string &asm_symbolic_name, const std::string &constraint, gccjit::lvalue dest) Add an output operand to the extended @code{asm} statement. See the Output Operands@footnote{https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#OutputOperands} @@ -15304,8 +15344,8 @@ section of GCC’s “Extended Asm” documentation. @end deffn @geindex gccjit;;extended_asm;;add_output_operand (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39d}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39e}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39f}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR gccjit lvalue}@anchor{3a0} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::add_output_operand (const std::string &constraint, gccjit::lvalue dest) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39f}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{3a0}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{3a1}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR gccjit lvalue}@anchor{3a2} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::add_output_operand (const std::string &constraint, gccjit::lvalue dest) As above, but don’t supply a symbolic name for the operand. @@ -15317,8 +15357,8 @@ ext_asm.add_output_operand ("=r", dst); @end deffn @geindex gccjit;;extended_asm;;add_input_operand (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{38b}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{3a1}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{3a2}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR ssCR gccjit rvalue}@anchor{3a3} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::add_input_operand (const std::string &asm_symbolic_name, const std::string &constraint, gccjit::rvalue src) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{38d}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{3a3}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{3a4}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR ssCR gccjit rvalue}@anchor{3a5} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::add_input_operand (const std::string &asm_symbolic_name, const std::string &constraint, gccjit::rvalue src) Add an input operand to the extended @code{asm} statement. See the Input Operands@footnote{https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#InputOperands} @@ -15342,8 +15382,8 @@ ext_asm.add_input_operand ("aMask", "r", mask); @end deffn @geindex gccjit;;extended_asm;;add_input_operand (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a4}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a5}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a6}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR gccjit rvalue}@anchor{3a7} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::add_input_operand (const std::string &constraint, gccjit::rvalue src) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a6}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a7}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a8}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR gccjit rvalue}@anchor{3a9} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::add_input_operand (const std::string &constraint, gccjit::rvalue src) As above, but don’t supply a symbolic name for the operand. @@ -15355,8 +15395,8 @@ ext_asm.add_input_operand ("r", src); @end deffn @geindex gccjit;;extended_asm;;add_clobber (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a8}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a9}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3aa}@anchor{cp/topics/asm gccjit extended_asm add_clobber__ssCR}@anchor{3ab} -@deffn {C++ Function} gccjit::@ref{384,,extended_asm} &gccjit::@ref{384,,extended_asm}::add_clobber (const std::string &victim) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3aa}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3ab}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3ac}@anchor{cp/topics/asm gccjit extended_asm add_clobber__ssCR}@anchor{3ad} +@deffn {C++ Function} gccjit::@ref{386,,extended_asm} &gccjit::@ref{386,,extended_asm}::add_clobber (const std::string &victim) Add @cite{victim} to the list of registers clobbered by the extended @code{asm} statement. See the @@ -15374,7 +15414,7 @@ ext_asm.add_clobber ("r0").add_clobber ("cc").add_clobber ("memory"); @end deffn @node Adding top-level assembler statements<2>,,Adding assembler instructions within a function<2>,Using Assembly Language with libgccjit++ -@anchor{cp/topics/asm adding-top-level-assembler-statements}@anchor{3ac} +@anchor{cp/topics/asm adding-top-level-assembler-statements}@anchor{3ae} @subsubsection Adding top-level assembler statements @@ -15383,8 +15423,8 @@ there is support for creating “top-level” assembler statements, outside of any function. @geindex gccjit;;context;;add_top_level_asm (C++ function) -@anchor{cp/topics/asm _CPPv4N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3ad}@anchor{cp/topics/asm _CPPv3N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3ae}@anchor{cp/topics/asm _CPPv2N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3af}@anchor{cp/topics/asm gccjit context add_top_level_asm__cCP gccjit location}@anchor{3b0} -@deffn {C++ Function} void gccjit::@ref{16c,,context}::add_top_level_asm (const char *asm_stmts, gccjit::location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3af}@anchor{cp/topics/asm _CPPv3N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3b0}@anchor{cp/topics/asm _CPPv2N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3b1}@anchor{cp/topics/asm gccjit context add_top_level_asm__cCP gccjit location}@anchor{3b2} +@deffn {C++ Function} void gccjit::@ref{16e,,context}::add_top_level_asm (const char *asm_stmts, gccjit::location loc = location()) Create a set of top-level asm statements, analogous to those created by GCC’s “basic” @code{asm} syntax in C at file scope. @@ -15435,7 +15475,7 @@ the following API calls could be used: @c <https://www.gnu.org/licenses/>. @node Internals,Indices and tables,C++ bindings for libgccjit,Top -@anchor{internals/index doc}@anchor{3b1}@anchor{internals/index internals}@anchor{3b2} +@anchor{internals/index doc}@anchor{3b3}@anchor{internals/index internals}@anchor{3b4} @chapter Internals @@ -15451,7 +15491,7 @@ the following API calls could be used: @end menu @node Working on the JIT library,Running the test suite,,Internals -@anchor{internals/index working-on-the-jit-library}@anchor{3b3} +@anchor{internals/index working-on-the-jit-library}@anchor{3b5} @section Working on the JIT library @@ -15484,7 +15524,7 @@ gcc/libgccjit.so.0.0.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), Here’s what those configuration options mean: @geindex command line option; --enable-host-shared -@anchor{internals/index cmdoption-enable-host-shared}@anchor{3b4} +@anchor{internals/index cmdoption-enable-host-shared}@anchor{3b6} @deffn {Option} @w{-}@w{-}enable@w{-}host@w{-}shared Configuring with this option means that the compiler is built as @@ -15493,7 +15533,7 @@ but it necessary for a shared library. @end deffn @geindex command line option; --enable-languages=jit@comma{}c++ -@anchor{internals/index cmdoption-enable-languages}@anchor{3b5} +@anchor{internals/index cmdoption-enable-languages}@anchor{3b7} @deffn {Option} @w{-}@w{-}enable@w{-}languages=jit,c++ This specifies which frontends to build. The JIT library looks like @@ -15510,7 +15550,7 @@ c++: error trying to exec 'cc1plus': execvp: No such file or directory @end deffn @geindex command line option; --disable-bootstrap -@anchor{internals/index cmdoption-disable-bootstrap}@anchor{3b6} +@anchor{internals/index cmdoption-disable-bootstrap}@anchor{3b8} @deffn {Option} @w{-}@w{-}disable@w{-}bootstrap For hacking on the “jit” subdirectory, performing a full @@ -15520,7 +15560,7 @@ the compiler can still bootstrap itself. @end deffn @geindex command line option; --enable-checking=release -@anchor{internals/index cmdoption-enable-checking}@anchor{3b7} +@anchor{internals/index cmdoption-enable-checking}@anchor{3b9} @deffn {Option} @w{-}@w{-}enable@w{-}checking=release The compile can perform extensive self-checking as it runs, useful when @@ -15531,7 +15571,7 @@ disable this self-checking. @end deffn @node Running the test suite,Environment variables,Working on the JIT library,Internals -@anchor{internals/index running-the-test-suite}@anchor{3b8} +@anchor{internals/index running-the-test-suite}@anchor{3ba} @section Running the test suite @@ -15589,7 +15629,7 @@ and once a test has been compiled, you can debug it directly: @end menu @node Running under valgrind,,,Running the test suite -@anchor{internals/index running-under-valgrind}@anchor{3b9} +@anchor{internals/index running-under-valgrind}@anchor{3bb} @subsection Running under valgrind @@ -15638,7 +15678,7 @@ When running under valgrind, it’s best to have configured gcc with various known false positives. @node Environment variables,Packaging notes,Running the test suite,Internals -@anchor{internals/index environment-variables}@anchor{3ba} +@anchor{internals/index environment-variables}@anchor{3bc} @section Environment variables @@ -15646,7 +15686,7 @@ When running client code against a locally-built libgccjit, three environment variables need to be set up: @geindex environment variable; LD_LIBRARY_PATH -@anchor{internals/index envvar-LD_LIBRARY_PATH}@anchor{3bb} +@anchor{internals/index envvar-LD_LIBRARY_PATH}@anchor{3bd} @deffn {Environment Variable} LD_LIBRARY_PATH @quotation @@ -15666,7 +15706,7 @@ libgccjit.so.0.0.1: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), @end deffn @geindex environment variable; PATH -@anchor{internals/index envvar-PATH}@anchor{3bc} +@anchor{internals/index envvar-PATH}@anchor{3be} @deffn {Environment Variable} PATH The library uses a driver executable for converting from .s assembler @@ -15685,7 +15725,7 @@ of development. @end deffn @geindex environment variable; LIBRARY_PATH -@anchor{internals/index envvar-LIBRARY_PATH}@anchor{3bd} +@anchor{internals/index envvar-LIBRARY_PATH}@anchor{3bf} @deffn {Environment Variable} LIBRARY_PATH The driver executable invokes the linker, and the latter needs to locate @@ -15717,11 +15757,11 @@ hello world @end example @node Packaging notes,Overview of code structure,Environment variables,Internals -@anchor{internals/index packaging-notes}@anchor{3be} +@anchor{internals/index packaging-notes}@anchor{3c0} @section Packaging notes -The configure-time option @ref{3b4,,--enable-host-shared} is needed when +The configure-time option @ref{3b6,,--enable-host-shared} is needed when building the jit in order to get position-independent code. This will slow down the regular compiler by a few percent. Hence when packaging gcc with libgccjit, please configure and build twice: @@ -15732,10 +15772,10 @@ with libgccjit, please configure and build twice: @itemize * @item -once without @ref{3b4,,--enable-host-shared} for most languages, and +once without @ref{3b6,,--enable-host-shared} for most languages, and @item -once with @ref{3b4,,--enable-host-shared} for the jit +once with @ref{3b6,,--enable-host-shared} for the jit @end itemize @end quotation @@ -15777,7 +15817,7 @@ popd @end example @node Overview of code structure,Design notes,Packaging notes,Internals -@anchor{internals/index overview-of-code-structure}@anchor{3bf} +@anchor{internals/index overview-of-code-structure}@anchor{3c1} @section Overview of code structure @@ -16246,7 +16286,7 @@ JIT: gcc::jit::logger::~logger() @end example @node Design notes,Submitting patches,Overview of code structure,Internals -@anchor{internals/index design-notes}@anchor{3c0} +@anchor{internals/index design-notes}@anchor{3c2} @section Design notes @@ -16259,7 +16299,7 @@ close as possible to the error; failing that, a good place is within @code{recording::context::validate ()} in jit-recording.cc. @node Submitting patches,,Design notes,Internals -@anchor{internals/index submitting-patches}@anchor{3c1} +@anchor{internals/index submitting-patches}@anchor{3c3} @section Submitting patches @@ -16393,7 +16433,7 @@ large and inconsequential (e.g. anchor renumbering), rather like generated committing to svn. @node Indices and tables,Index,Internals,Top -@anchor{index indices-and-tables}@anchor{3c2} +@anchor{index indices-and-tables}@anchor{3c4} @unnumbered Indices and tables diff --git a/gcc/jit/docs/topics/compatibility.rst b/gcc/jit/docs/topics/compatibility.rst index cfd3133..7f2b2dc 100644 --- a/gcc/jit/docs/topics/compatibility.rst +++ b/gcc/jit/docs/topics/compatibility.rst @@ -343,3 +343,12 @@ of a global with an rvalue and to use constructors: value from one type to another: * :func:`gcc_jit_context_new_bitcast` + +.. _LIBGCCJIT_ABI_22: + +``LIBGCCJIT_ABI_22`` +-------------------- +``LIBGCCJIT_ABI_22`` covers the addition of an API entrypoint to set the +register name of a variable: + + * :func:`gcc_jit_lvalue_set_register_name` diff --git a/gcc/jit/docs/topics/expressions.rst b/gcc/jit/docs/topics/expressions.rst index e9e8de5..5d81fde 100644 --- a/gcc/jit/docs/topics/expressions.rst +++ b/gcc/jit/docs/topics/expressions.rst @@ -761,6 +761,26 @@ where the rvalue is computed by reading from the storage area. #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_link_section +.. function:: void\ + gcc_jit_lvalue_set_register_name (gcc_jit_lvalue *lvalue,\ + const char *reg_name); + + Set the register name of a variable. + The parameter ``reg_name`` must be non-NULL. Analogous to: + + .. code-block:: c + + register int variable asm ("r12"); + + in C. + + This entrypoint was added in :ref:`LIBGCCJIT_ABI_22`; you can test for + its presence using + + .. code-block:: c + + #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_register_name + Global variables **************** diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h index 5b107be..ff15615 100644 --- a/gcc/jit/jit-playback.h +++ b/gcc/jit/jit-playback.h @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include <utility> // for std::pair #include "timevar.h" +#include "varasm.h" #include "jit-recording.h" @@ -706,6 +707,14 @@ public: set_decl_section_name (as_tree (), name); } + void + set_register_name (const char* reg_name) + { + set_user_assembler_name (as_tree (), reg_name); + DECL_REGISTER (as_tree ()) = 1; + DECL_HARD_REGISTER (as_tree ()) = 1; + } + private: bool mark_addressable (location *loc); }; diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 4f12b20..dd0bdef 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -3965,6 +3965,11 @@ void recording::lvalue::set_link_section (const char *name) m_link_section = new_string (name); } +void recording::lvalue::set_register_name (const char *reg_name) +{ + m_reg_name = new_string (reg_name); +} + /* The implementation of class gcc::jit::recording::param. */ /* Implementation of pure virtual hook recording::memento::replay_into @@ -4831,6 +4836,9 @@ recording::global::replay_into (replayer *r) if (m_link_section != NULL) global->set_link_section (m_link_section->c_str ()); + if (m_reg_name != NULL) + global->set_register_name (m_reg_name->c_str ()); + set_playback_obj (global); } @@ -6551,11 +6559,15 @@ recording::function_pointer::write_reproducer (reproducer &r) void recording::local::replay_into (replayer *r) { - set_playback_obj ( - m_func->playback_function () + playback::lvalue *obj = m_func->playback_function () ->new_local (playback_location (r, m_loc), m_type->playback_type (), - playback_string (m_name))); + playback_string (m_name)); + + if (m_reg_name != NULL) + obj->set_register_name (m_reg_name->c_str ()); + + set_playback_obj (obj); } /* Override the default implementation of diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h index 20d161d..80f824e 100644 --- a/gcc/jit/jit-recording.h +++ b/gcc/jit/jit-recording.h @@ -1170,8 +1170,9 @@ public: location *loc, type *type_) : rvalue (ctxt, loc, type_), - m_tls_model (GCC_JIT_TLS_MODEL_NONE), - m_link_section (NULL) + m_link_section (NULL), + m_reg_name (NULL), + m_tls_model (GCC_JIT_TLS_MODEL_NONE) {} playback::lvalue * @@ -1195,10 +1196,12 @@ public: virtual bool is_global () const { return false; } void set_tls_model (enum gcc_jit_tls_model model); void set_link_section (const char *name); + void set_register_name (const char *reg_name); protected: - enum gcc_jit_tls_model m_tls_model; string *m_link_section; + string *m_reg_name; + enum gcc_jit_tls_model m_tls_model; }; class param : public lvalue diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc index 142f60b..522593b 100644 --- a/gcc/jit/libgccjit.cc +++ b/gcc/jit/libgccjit.cc @@ -2702,6 +2702,20 @@ gcc_jit_lvalue_set_link_section (gcc_jit_lvalue *lvalue, /* Public entrypoint. See description in libgccjit.h. After error-checking, the real work is done by the + gcc::jit::recording::lvalue::set_register_name method in jit-recording.cc. */ + +void +gcc_jit_lvalue_set_register_name (gcc_jit_lvalue *lvalue, + const char *reg_name) +{ + RETURN_IF_FAIL (lvalue, NULL, NULL, "NULL lvalue"); + RETURN_IF_FAIL (reg_name, NULL, NULL, "NULL reg_name"); + lvalue->set_register_name (reg_name); +} + +/* Public entrypoint. See description in libgccjit.h. + + After error-checking, the real work is done by the gcc::jit::recording::function::new_local method in jit-recording.cc. */ gcc_jit_lvalue * diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 0628f17..d3fc935 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -1320,6 +1320,18 @@ extern void gcc_jit_lvalue_set_link_section (gcc_jit_lvalue *lvalue, const char *section_name); +#define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_register_name + +/* Make this variable a register variable and set its register name. + + This API entrypoint was added in LIBGCCJIT_ABI_22; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_register_name +*/ +void +gcc_jit_lvalue_set_register_name (gcc_jit_lvalue *lvalue, + const char *reg_name); + extern gcc_jit_lvalue * gcc_jit_function_new_local (gcc_jit_function *func, gcc_jit_location *loc, diff --git a/gcc/jit/libgccjit.map b/gcc/jit/libgccjit.map index 7f988ba..4b3de8b 100644 --- a/gcc/jit/libgccjit.map +++ b/gcc/jit/libgccjit.map @@ -255,3 +255,8 @@ LIBGCCJIT_ABI_21 { global: gcc_jit_context_new_bitcast; } LIBGCCJIT_ABI_20; + +LIBGCCJIT_ABI_22 { + global: + gcc_jit_lvalue_set_register_name; +} LIBGCCJIT_ABI_21; |