From: Antoni Boucher Date: Tue, 12 Apr 2022 21:16:45 +0000 (-0400) Subject: libgccjit: Add support for sized integer types, including 128-bit integers [PR95325] X-Git-Tag: upstream/12.2.0~581 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af80ea97b61847d91da0d303e85faed437059092;p=platform%2Fupstream%2Fgcc.git libgccjit: Add support for sized integer types, including 128-bit integers [PR95325] gcc/jit/ PR target/95325 * docs/_build/texinfo/libgccjit.texi: Regenerate * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag. * docs/topics/types.rst: Add documentation for the new types GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T, GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T, GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and new functions (gcc_jit_compatible_types, gcc_jit_type_get_size). * jit-builtins.cc: Add support for BT_UINT128. * jit-common.h: Update the value of NUM_GCC_JIT_TYPES. * jit-playback.cc: Add support for the sized integer types. * jit-recording.cc: Add support for the sized integer types. * jit-recording.h: Add support for comparing integer types and new function (is_signed). * libgccjit.cc (gcc_jit_compatible_types): New. (gcc_jit_type_get_size) New. * libgccjit.h: New enum variants for gcc_jit_types (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T, GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T, GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions (gcc_jit_compatible_types, gcc_jit_type_get_size). * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag. gcc/testsuite/ PR target/95325 * jit.dg/test-types.c: Add tests for sized integer types. --- diff --git a/gcc/jit/docs/_build/texinfo/libgccjit.texi b/gcc/jit/docs/_build/texinfo/libgccjit.texi index c1ca5aa..60ad3cb 100644 --- a/gcc/jit/docs/_build/texinfo/libgccjit.texi +++ b/gcc/jit/docs/_build/texinfo/libgccjit.texi @@ -21,7 +21,7 @@ @copying @quotation -libgccjit 12.0.1 (experimental 20220331), Mar 31, 2022 +libgccjit 12.0.1 (experimental 20220411), Apr 11, 2022 David Malcolm @@ -260,6 +260,7 @@ ABI symbol tags * LIBGCCJIT_ABI_17:: * LIBGCCJIT_ABI_18:: * LIBGCCJIT_ABI_19:: +* LIBGCCJIT_ABI_20:: Performance @@ -5454,6 +5455,86 @@ C99’s @code{unsigned long long} @item +@code{GCC_JIT_TYPE_UINT8_T} + +@tab + +C99’s @code{uint8_t} + +@item + +@code{GCC_JIT_TYPE_UINT16_T} + +@tab + +C99’s @code{uint16_t} + +@item + +@code{GCC_JIT_TYPE_UINT32_T} + +@tab + +C99’s @code{uint32_t} + +@item + +@code{GCC_JIT_TYPE_UINT64_T} + +@tab + +C99’s @code{uint64_t} + +@item + +@code{GCC_JIT_TYPE_UINT128_T} + +@tab + +C99’s @code{__uint128_t} + +@item + +@code{GCC_JIT_TYPE_INT8_T} + +@tab + +C99’s @code{int8_t} + +@item + +@code{GCC_JIT_TYPE_INT16_T} + +@tab + +C99’s @code{int16_t} + +@item + +@code{GCC_JIT_TYPE_INT32_T} + +@tab + +C99’s @code{int32_t} + +@item + +@code{GCC_JIT_TYPE_INT64_T} + +@tab + +C99’s @code{int64_t} + +@item + +@code{GCC_JIT_TYPE_INT128_T} + +@tab + +C99’s @code{__int128_t} + +@item + @code{GCC_JIT_TYPE_FLOAT} @tab @@ -6060,6 +6141,46 @@ using @end deffn @end deffn +@geindex gcc_jit_compatible_types (C function) +@anchor{topics/types c gcc_jit_compatible_types}@anchor{a8} +@deffn {C Function} int gcc_jit_compatible_types (gcc_jit_type@w{ }*ltype, gcc_jit_type@w{ }*rtype) + +@quotation + +Return non-zero if the two types are compatible. For instance, +if @code{GCC_JIT_TYPE_UINT64_T} and @code{GCC_JIT_TYPE_UNSIGNED_LONG} +are the same size on the target, this will return non-zero. +The parameters @code{ltype} and @code{rtype} must be non-NULL. +Return 0 on errors. +@end quotation + +This entrypoint was added in @ref{a9,,LIBGCCJIT_ABI_20}; you can test for +its presence using + +@example +#ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS +@end example +@end deffn + +@geindex gcc_jit_type_get_size (C function) +@anchor{topics/types c gcc_jit_type_get_size}@anchor{aa} +@deffn {C Function} ssize_t gcc_jit_type_get_size (gcc_jit_type@w{ }*type) + +@quotation + +Return the size of a type, in bytes. It only works on integer types for now. +The parameter @code{type} must be non-NULL. +Return -1 on errors. +@end quotation + +This entrypoint was added in @ref{a9,,LIBGCCJIT_ABI_20}; you can test for +its presence using + +@example +#ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS +@end example +@end deffn + @c Copyright (C) 2014-2022 Free Software Foundation, Inc. @c Originally contributed by David Malcolm @c @@ -6078,7 +6199,7 @@ using @c . @node Expressions,Creating and using functions,Types,Topic Reference -@anchor{topics/expressions doc}@anchor{a8}@anchor{topics/expressions expressions}@anchor{a9} +@anchor{topics/expressions doc}@anchor{ab}@anchor{topics/expressions expressions}@anchor{ac} @section Expressions @@ -6090,7 +6211,7 @@ using @end menu @node Rvalues,Lvalues,,Expressions -@anchor{topics/expressions rvalues}@anchor{aa} +@anchor{topics/expressions rvalues}@anchor{ad} @subsection Rvalues @@ -6144,7 +6265,7 @@ 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 gcc_jit_rvalue_get_type (C function) -@anchor{topics/expressions c gcc_jit_rvalue_get_type}@anchor{ab} +@anchor{topics/expressions c gcc_jit_rvalue_get_type}@anchor{ae} @deffn {C Function} gcc_jit_type *gcc_jit_rvalue_get_type (gcc_jit_rvalue@w{ }*rvalue) Get the type of this rvalue. @@ -6171,7 +6292,7 @@ Upcast the given rvalue to be an object. @end menu @node Simple expressions,Constructor expressions,,Rvalues -@anchor{topics/expressions simple-expressions}@anchor{ac} +@anchor{topics/expressions simple-expressions}@anchor{af} @subsubsection Simple expressions @@ -6184,7 +6305,7 @@ the given constant @code{int} value. @end deffn @geindex gcc_jit_context_new_rvalue_from_long (C function) -@anchor{topics/expressions c gcc_jit_context_new_rvalue_from_long}@anchor{ad} +@anchor{topics/expressions c gcc_jit_context_new_rvalue_from_long}@anchor{b0} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_rvalue_from_long (gcc_jit_context@w{ }*ctxt, gcc_jit_type@w{ }*numeric_type, long@w{ }value) Given a numeric type (integer or floating point), build an rvalue for @@ -6224,14 +6345,14 @@ the given constant @code{double} value. @end deffn @geindex gcc_jit_context_new_rvalue_from_ptr (C function) -@anchor{topics/expressions c gcc_jit_context_new_rvalue_from_ptr}@anchor{ae} +@anchor{topics/expressions c gcc_jit_context_new_rvalue_from_ptr}@anchor{b1} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_rvalue_from_ptr (gcc_jit_context@w{ }*ctxt, gcc_jit_type@w{ }*pointer_type, void@w{ }*value) Given a pointer type, build an rvalue for the given address. @end deffn @geindex gcc_jit_context_null (C function) -@anchor{topics/expressions c gcc_jit_context_null}@anchor{af} +@anchor{topics/expressions c gcc_jit_context_null}@anchor{b2} @deffn {C Function} gcc_jit_rvalue *gcc_jit_context_null (gcc_jit_context@w{ }*ctxt, gcc_jit_type@w{ }*pointer_type) Given a pointer type, build an rvalue for @code{NULL}. Essentially this @@ -6243,7 +6364,7 @@ gcc_jit_context_new_rvalue_from_ptr (ctxt, pointer_type, NULL) @end deffn @geindex gcc_jit_context_new_string_literal (C function) -@anchor{topics/expressions c gcc_jit_context_new_string_literal}@anchor{b0} +@anchor{topics/expressions c gcc_jit_context_new_string_literal}@anchor{b3} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_string_literal (gcc_jit_context@w{ }*ctxt, const char@w{ }*value) Generate an rvalue for the given NIL-terminated string, of type @@ -6255,7 +6376,7 @@ buffer. @end deffn @node Constructor expressions,Vector expressions,Simple expressions,Rvalues -@anchor{topics/expressions constructor-expressions}@anchor{b1} +@anchor{topics/expressions constructor-expressions}@anchor{b4} @subsubsection Constructor expressions @@ -6266,7 +6387,7 @@ types. The constructor rvalue can be used for assignment to locals. It can be used to initialize global variables with -@ref{b2,,gcc_jit_global_set_initializer_rvalue()}. It can also be used as a +@ref{b5,,gcc_jit_global_set_initializer_rvalue()}. It can also be used as a temporary value for function calls and return values, but its address can’t be taken. @@ -6280,7 +6401,7 @@ The constructor can contain nested constructors. Note that a string literal rvalue can’t be used to construct a char array; the latter needs one rvalue for each char. -These entrypoints were added in @ref{b3,,LIBGCCJIT_ABI_19}; you can test for +These entrypoints were added in @ref{b6,,LIBGCCJIT_ABI_19}; you can test for their presence using: @example @@ -6289,7 +6410,7 @@ their presence using: @end quotation @geindex gcc_jit_context_new_array_constructor (C function) -@anchor{topics/expressions c gcc_jit_context_new_array_constructor}@anchor{b4} +@anchor{topics/expressions c gcc_jit_context_new_array_constructor}@anchor{b7} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_array_constructor (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_type@w{ }*type, size_t@w{ }num_values, gcc_jit_rvalue@w{ }**values) Create a constructor for an array as an rvalue. @@ -6313,7 +6434,7 @@ array type’s element type. If @code{num_values} is 0, the @code{values} parameter will be ignored and zero initialization will be used. -This entrypoint was added in @ref{b3,,LIBGCCJIT_ABI_19}; you can test for its +This entrypoint was added in @ref{b6,,LIBGCCJIT_ABI_19}; you can test for its presence using: @example @@ -6322,7 +6443,7 @@ presence using: @end deffn @geindex gcc_jit_context_new_struct_constructor (C function) -@anchor{topics/expressions c gcc_jit_context_new_struct_constructor}@anchor{b5} +@anchor{topics/expressions c gcc_jit_context_new_struct_constructor}@anchor{b8} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_struct_constructor (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_type@w{ }*type, size_t@w{ }num_values, gcc_jit_field@w{ }**fields, gcc_jit_rvalue@w{ }**values) Create a constructor for a struct as an rvalue. @@ -6359,7 +6480,7 @@ of the corresponding field. If @code{num_values} is 0, the array parameters will be ignored and zero initialization will be used. -This entrypoint was added in @ref{b3,,LIBGCCJIT_ABI_19}; you can test for its +This entrypoint was added in @ref{b6,,LIBGCCJIT_ABI_19}; you can test for its presence using: @example @@ -6368,7 +6489,7 @@ presence using: @end deffn @geindex gcc_jit_context_new_union_constructor (C function) -@anchor{topics/expressions c gcc_jit_context_new_union_constructor}@anchor{b6} +@anchor{topics/expressions c gcc_jit_context_new_union_constructor}@anchor{b9} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_union_constructor (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_type@w{ }*type, gcc_jit_field@w{ }*field, gcc_jit_rvalue@w{ }*value) Create a constructor for a union as an rvalue. @@ -6388,7 +6509,7 @@ If @code{value} is NULL, zero initialization will be used. Each value has to have have the same unqualified type as the field it is applied to. -This entrypoint was added in @ref{b3,,LIBGCCJIT_ABI_19}; you can test for its +This entrypoint was added in @ref{b6,,LIBGCCJIT_ABI_19}; you can test for its presence using: @example @@ -6397,7 +6518,7 @@ presence using: @end deffn @node Vector expressions,Unary Operations,Constructor expressions,Rvalues -@anchor{topics/expressions vector-expressions}@anchor{b7} +@anchor{topics/expressions vector-expressions}@anchor{ba} @subsubsection Vector expressions @@ -6412,7 +6533,7 @@ Build a vector rvalue from an array of elements. “num_elements” should match that of the vector type. -This entrypoint was added in @ref{b8,,LIBGCCJIT_ABI_10}; you can test for +This entrypoint was added in @ref{bb,,LIBGCCJIT_ABI_10}; you can test for its presence using @example @@ -6421,12 +6542,12 @@ its presence using @end deffn @node Unary Operations,Binary Operations,Vector expressions,Rvalues -@anchor{topics/expressions unary-operations}@anchor{b9} +@anchor{topics/expressions unary-operations}@anchor{bc} @subsubsection Unary Operations @geindex gcc_jit_context_new_unary_op (C function) -@anchor{topics/expressions c gcc_jit_context_new_unary_op}@anchor{ba} +@anchor{topics/expressions c gcc_jit_context_new_unary_op}@anchor{bd} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_unary_op (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, enum gcc_jit_unary_op@w{ }op, gcc_jit_type@w{ }*result_type, gcc_jit_rvalue@w{ }*rvalue) Build a unary operation out of an input rvalue. @@ -6435,7 +6556,7 @@ The parameter @code{result_type} must be a numeric type. @end deffn @geindex gcc_jit_unary_op (C type) -@anchor{topics/expressions c gcc_jit_unary_op}@anchor{bb} +@anchor{topics/expressions c gcc_jit_unary_op}@anchor{be} @deffn {C Type} enum gcc_jit_unary_op @end deffn @@ -6453,7 +6574,7 @@ C equivalent @item -@ref{bc,,GCC_JIT_UNARY_OP_MINUS} +@ref{bf,,GCC_JIT_UNARY_OP_MINUS} @tab @@ -6461,7 +6582,7 @@ C equivalent @item -@ref{bd,,GCC_JIT_UNARY_OP_BITWISE_NEGATE} +@ref{c0,,GCC_JIT_UNARY_OP_BITWISE_NEGATE} @tab @@ -6469,7 +6590,7 @@ C equivalent @item -@ref{be,,GCC_JIT_UNARY_OP_LOGICAL_NEGATE} +@ref{c1,,GCC_JIT_UNARY_OP_LOGICAL_NEGATE} @tab @@ -6477,7 +6598,7 @@ C equivalent @item -@ref{bf,,GCC_JIT_UNARY_OP_ABS} +@ref{c2,,GCC_JIT_UNARY_OP_ABS} @tab @@ -6487,7 +6608,7 @@ C equivalent @geindex GCC_JIT_UNARY_OP_MINUS (C macro) -@anchor{topics/expressions c GCC_JIT_UNARY_OP_MINUS}@anchor{bc} +@anchor{topics/expressions c GCC_JIT_UNARY_OP_MINUS}@anchor{bf} @deffn {C Macro} GCC_JIT_UNARY_OP_MINUS Negate an arithmetic value; analogous to: @@ -6500,7 +6621,7 @@ in C. @end deffn @geindex GCC_JIT_UNARY_OP_BITWISE_NEGATE (C macro) -@anchor{topics/expressions c GCC_JIT_UNARY_OP_BITWISE_NEGATE}@anchor{bd} +@anchor{topics/expressions c GCC_JIT_UNARY_OP_BITWISE_NEGATE}@anchor{c0} @deffn {C Macro} GCC_JIT_UNARY_OP_BITWISE_NEGATE Bitwise negation of an integer value (one’s complement); analogous @@ -6514,7 +6635,7 @@ in C. @end deffn @geindex GCC_JIT_UNARY_OP_LOGICAL_NEGATE (C macro) -@anchor{topics/expressions c GCC_JIT_UNARY_OP_LOGICAL_NEGATE}@anchor{be} +@anchor{topics/expressions c GCC_JIT_UNARY_OP_LOGICAL_NEGATE}@anchor{c1} @deffn {C Macro} GCC_JIT_UNARY_OP_LOGICAL_NEGATE Logical negation of an arithmetic or pointer value; analogous to: @@ -6527,7 +6648,7 @@ in C. @end deffn @geindex GCC_JIT_UNARY_OP_ABS (C macro) -@anchor{topics/expressions c GCC_JIT_UNARY_OP_ABS}@anchor{bf} +@anchor{topics/expressions c GCC_JIT_UNARY_OP_ABS}@anchor{c2} @deffn {C Macro} GCC_JIT_UNARY_OP_ABS Absolute value of an arithmetic expression; analogous to: @@ -6540,7 +6661,7 @@ in C. @end deffn @node Binary Operations,Comparisons,Unary Operations,Rvalues -@anchor{topics/expressions binary-operations}@anchor{c0} +@anchor{topics/expressions binary-operations}@anchor{c3} @subsubsection Binary Operations @@ -6554,7 +6675,7 @@ The parameter @code{result_type} must be a numeric type. @end deffn @geindex gcc_jit_binary_op (C type) -@anchor{topics/expressions c gcc_jit_binary_op}@anchor{c1} +@anchor{topics/expressions c gcc_jit_binary_op}@anchor{c4} @deffn {C Type} enum gcc_jit_binary_op @end deffn @@ -6572,7 +6693,7 @@ C equivalent @item -@ref{c2,,GCC_JIT_BINARY_OP_PLUS} +@ref{c5,,GCC_JIT_BINARY_OP_PLUS} @tab @@ -6580,7 +6701,7 @@ C equivalent @item -@ref{c3,,GCC_JIT_BINARY_OP_MINUS} +@ref{c6,,GCC_JIT_BINARY_OP_MINUS} @tab @@ -6588,7 +6709,7 @@ C equivalent @item -@ref{c4,,GCC_JIT_BINARY_OP_MULT} +@ref{c7,,GCC_JIT_BINARY_OP_MULT} @tab @@ -6596,7 +6717,7 @@ C equivalent @item -@ref{c5,,GCC_JIT_BINARY_OP_DIVIDE} +@ref{c8,,GCC_JIT_BINARY_OP_DIVIDE} @tab @@ -6604,7 +6725,7 @@ C equivalent @item -@ref{c6,,GCC_JIT_BINARY_OP_MODULO} +@ref{c9,,GCC_JIT_BINARY_OP_MODULO} @tab @@ -6612,7 +6733,7 @@ C equivalent @item -@ref{c7,,GCC_JIT_BINARY_OP_BITWISE_AND} +@ref{ca,,GCC_JIT_BINARY_OP_BITWISE_AND} @tab @@ -6620,7 +6741,7 @@ C equivalent @item -@ref{c8,,GCC_JIT_BINARY_OP_BITWISE_XOR} +@ref{cb,,GCC_JIT_BINARY_OP_BITWISE_XOR} @tab @@ -6628,7 +6749,7 @@ C equivalent @item -@ref{c9,,GCC_JIT_BINARY_OP_BITWISE_OR} +@ref{cc,,GCC_JIT_BINARY_OP_BITWISE_OR} @tab @@ -6636,7 +6757,7 @@ C equivalent @item -@ref{ca,,GCC_JIT_BINARY_OP_LOGICAL_AND} +@ref{cd,,GCC_JIT_BINARY_OP_LOGICAL_AND} @tab @@ -6644,7 +6765,7 @@ C equivalent @item -@ref{cb,,GCC_JIT_BINARY_OP_LOGICAL_OR} +@ref{ce,,GCC_JIT_BINARY_OP_LOGICAL_OR} @tab @@ -6652,7 +6773,7 @@ C equivalent @item -@ref{cc,,GCC_JIT_BINARY_OP_LSHIFT} +@ref{cf,,GCC_JIT_BINARY_OP_LSHIFT} @tab @@ -6660,7 +6781,7 @@ C equivalent @item -@ref{cd,,GCC_JIT_BINARY_OP_RSHIFT} +@ref{d0,,GCC_JIT_BINARY_OP_RSHIFT} @tab @@ -6670,7 +6791,7 @@ C equivalent @geindex GCC_JIT_BINARY_OP_PLUS (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_PLUS}@anchor{c2} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_PLUS}@anchor{c5} @deffn {C Macro} GCC_JIT_BINARY_OP_PLUS Addition of arithmetic values; analogous to: @@ -6681,11 +6802,11 @@ Addition of arithmetic values; analogous to: in C. -For pointer addition, use @ref{ce,,gcc_jit_context_new_array_access()}. +For pointer addition, use @ref{d1,,gcc_jit_context_new_array_access()}. @end deffn @geindex GCC_JIT_BINARY_OP_MINUS (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_MINUS}@anchor{c3} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_MINUS}@anchor{c6} @deffn {C Macro} GCC_JIT_BINARY_OP_MINUS Subtraction of arithmetic values; analogous to: @@ -6698,7 +6819,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_MULT (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_MULT}@anchor{c4} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_MULT}@anchor{c7} @deffn {C Macro} GCC_JIT_BINARY_OP_MULT Multiplication of a pair of arithmetic values; analogous to: @@ -6711,7 +6832,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_DIVIDE (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_DIVIDE}@anchor{c5} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_DIVIDE}@anchor{c8} @deffn {C Macro} GCC_JIT_BINARY_OP_DIVIDE Quotient of division of arithmetic values; analogous to: @@ -6728,7 +6849,7 @@ a floating-point result type indicates floating-point division. @end deffn @geindex GCC_JIT_BINARY_OP_MODULO (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_MODULO}@anchor{c6} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_MODULO}@anchor{c9} @deffn {C Macro} GCC_JIT_BINARY_OP_MODULO Remainder of division of arithmetic values; analogous to: @@ -6741,7 +6862,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_BITWISE_AND (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_AND}@anchor{c7} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_AND}@anchor{ca} @deffn {C Macro} GCC_JIT_BINARY_OP_BITWISE_AND Bitwise AND; analogous to: @@ -6754,7 +6875,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_BITWISE_XOR (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_XOR}@anchor{c8} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_XOR}@anchor{cb} @deffn {C Macro} GCC_JIT_BINARY_OP_BITWISE_XOR Bitwise exclusive OR; analogous to: @@ -6767,7 +6888,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_BITWISE_OR (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_OR}@anchor{c9} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_BITWISE_OR}@anchor{cc} @deffn {C Macro} GCC_JIT_BINARY_OP_BITWISE_OR Bitwise inclusive OR; analogous to: @@ -6780,7 +6901,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_LOGICAL_AND (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_LOGICAL_AND}@anchor{ca} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_LOGICAL_AND}@anchor{cd} @deffn {C Macro} GCC_JIT_BINARY_OP_LOGICAL_AND Logical AND; analogous to: @@ -6793,7 +6914,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_LOGICAL_OR (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_LOGICAL_OR}@anchor{cb} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_LOGICAL_OR}@anchor{ce} @deffn {C Macro} GCC_JIT_BINARY_OP_LOGICAL_OR Logical OR; analogous to: @@ -6806,7 +6927,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_LSHIFT (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_LSHIFT}@anchor{cc} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_LSHIFT}@anchor{cf} @deffn {C Macro} GCC_JIT_BINARY_OP_LSHIFT Left shift; analogous to: @@ -6819,7 +6940,7 @@ in C. @end deffn @geindex GCC_JIT_BINARY_OP_RSHIFT (C macro) -@anchor{topics/expressions c GCC_JIT_BINARY_OP_RSHIFT}@anchor{cd} +@anchor{topics/expressions c GCC_JIT_BINARY_OP_RSHIFT}@anchor{d0} @deffn {C Macro} GCC_JIT_BINARY_OP_RSHIFT Right shift; analogous to: @@ -6832,7 +6953,7 @@ in C. @end deffn @node Comparisons,Function calls,Binary Operations,Rvalues -@anchor{topics/expressions comparisons}@anchor{cf} +@anchor{topics/expressions comparisons}@anchor{d2} @subsubsection Comparisons @@ -6844,7 +6965,7 @@ Build a boolean rvalue out of the comparison of two other rvalues. @end deffn @geindex gcc_jit_comparison (C type) -@anchor{topics/expressions c gcc_jit_comparison}@anchor{d0} +@anchor{topics/expressions c gcc_jit_comparison}@anchor{d3} @deffn {C Type} enum gcc_jit_comparison @end deffn @@ -6910,12 +7031,12 @@ C equivalent @node Function calls,Function pointers,Comparisons,Rvalues -@anchor{topics/expressions function-calls}@anchor{d1} +@anchor{topics/expressions function-calls}@anchor{d4} @subsubsection Function calls @geindex gcc_jit_context_new_call (C function) -@anchor{topics/expressions c gcc_jit_context_new_call}@anchor{d2} +@anchor{topics/expressions c gcc_jit_context_new_call}@anchor{d5} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_call (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_function@w{ }*func, int@w{ }numargs, gcc_jit_rvalue@w{ }**args) Given a function and the given table of argument rvalues, construct a @@ -6923,7 +7044,7 @@ call to the function, with the result as an rvalue. @cartouche @quotation Note -@ref{d2,,gcc_jit_context_new_call()} merely builds a +@ref{d5,,gcc_jit_context_new_call()} merely builds a @ref{13,,gcc_jit_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 @@ -6931,7 +7052,7 @@ 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{d3,,gcc_jit_block_add_eval()}: +@ref{d6,,gcc_jit_block_add_eval()}: @example /* Add "(void)printf (arg0, arg1);". */ @@ -6948,7 +7069,7 @@ gcc_jit_block_add_eval ( @end deffn @geindex gcc_jit_context_new_call_through_ptr (C function) -@anchor{topics/expressions c gcc_jit_context_new_call_through_ptr}@anchor{d4} +@anchor{topics/expressions c gcc_jit_context_new_call_through_ptr}@anchor{d7} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_call_through_ptr (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*fn_ptr, int@w{ }numargs, gcc_jit_rvalue@w{ }**args) Given an rvalue of function pointer type (e.g. from @@ -6958,18 +7079,18 @@ result as an rvalue. @cartouche @quotation Note -The same caveat as for @ref{d2,,gcc_jit_context_new_call()} applies. +The same caveat as for @ref{d5,,gcc_jit_context_new_call()} applies. @end quotation @end cartouche @end deffn @geindex gcc_jit_rvalue_set_bool_require_tail_call (C function) -@anchor{topics/expressions c gcc_jit_rvalue_set_bool_require_tail_call}@anchor{d5} +@anchor{topics/expressions c gcc_jit_rvalue_set_bool_require_tail_call}@anchor{d8} @deffn {C Function} void gcc_jit_rvalue_set_bool_require_tail_call (gcc_jit_rvalue@w{ }*call, int@w{ }require_tail_call) Given an @ref{13,,gcc_jit_rvalue} for a call created through -@ref{d2,,gcc_jit_context_new_call()} or -@ref{d4,,gcc_jit_context_new_call_through_ptr()}, mark/clear the +@ref{d5,,gcc_jit_context_new_call()} or +@ref{d7,,gcc_jit_context_new_call_through_ptr()}, mark/clear the call as needing tail-call optimization. The optimizer will attempt to optimize the call into a jump instruction; if it is unable to do do, an error will be emitted. @@ -6981,7 +7102,7 @@ languages), in which every function “returns” by calling a guaranteed to be implemented as a jump, otherwise the program could consume an arbitrary amount of stack space as it executed. -This entrypoint was added in @ref{d6,,LIBGCCJIT_ABI_6}; you can test for +This entrypoint was added in @ref{d9,,LIBGCCJIT_ABI_6}; you can test for its presence using @example @@ -6990,7 +7111,7 @@ its presence using @end deffn @node Function pointers,Type-coercion,Function calls,Rvalues -@anchor{topics/expressions function-pointers}@anchor{d7} +@anchor{topics/expressions function-pointers}@anchor{da} @subsubsection Function pointers @@ -7003,23 +7124,23 @@ Function pointers can be obtained: @item from a @ref{29,,gcc_jit_function} using -@ref{d8,,gcc_jit_function_get_address()}, or +@ref{db,,gcc_jit_function_get_address()}, or @item from an existing function using -@ref{ae,,gcc_jit_context_new_rvalue_from_ptr()}, +@ref{b1,,gcc_jit_context_new_rvalue_from_ptr()}, using a function pointer type obtained using @ref{95,,gcc_jit_context_new_function_ptr_type()}. @end itemize @end quotation @node Type-coercion,,Function pointers,Rvalues -@anchor{topics/expressions type-coercion}@anchor{d9} +@anchor{topics/expressions type-coercion}@anchor{dc} @subsubsection Type-coercion @geindex gcc_jit_context_new_cast (C function) -@anchor{topics/expressions c gcc_jit_context_new_cast}@anchor{da} +@anchor{topics/expressions c gcc_jit_context_new_cast}@anchor{dd} @deffn {C Function} gcc_jit_rvalue * gcc_jit_context_new_cast (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*rvalue, gcc_jit_type@w{ }*type) Given an rvalue of T, construct another rvalue of another type. @@ -7044,7 +7165,7 @@ P* <-> Q*, for pointer types P and Q @end deffn @node Lvalues,Working with pointers structs and unions,Rvalues,Expressions -@anchor{topics/expressions lvalues}@anchor{db} +@anchor{topics/expressions lvalues}@anchor{de} @subsection Lvalues @@ -7058,21 +7179,21 @@ a storage area (such as a variable). It is also usable as an rvalue, where the rvalue is computed by reading from the storage area. @geindex gcc_jit_lvalue_as_object (C function) -@anchor{topics/expressions c gcc_jit_lvalue_as_object}@anchor{dc} +@anchor{topics/expressions c gcc_jit_lvalue_as_object}@anchor{df} @deffn {C Function} gcc_jit_object * gcc_jit_lvalue_as_object (gcc_jit_lvalue@w{ }*lvalue) Upcast an lvalue to be an object. @end deffn @geindex gcc_jit_lvalue_as_rvalue (C function) -@anchor{topics/expressions c gcc_jit_lvalue_as_rvalue}@anchor{dd} +@anchor{topics/expressions c gcc_jit_lvalue_as_rvalue}@anchor{e0} @deffn {C Function} gcc_jit_rvalue * gcc_jit_lvalue_as_rvalue (gcc_jit_lvalue@w{ }*lvalue) Upcast an lvalue to be an rvalue. @end deffn @geindex gcc_jit_lvalue_get_address (C function) -@anchor{topics/expressions c gcc_jit_lvalue_get_address}@anchor{de} +@anchor{topics/expressions c gcc_jit_lvalue_get_address}@anchor{e1} @deffn {C Function} gcc_jit_rvalue * gcc_jit_lvalue_get_address (gcc_jit_lvalue@w{ }*lvalue, gcc_jit_location@w{ }*loc) Take the address of an lvalue; analogous to: @@ -7085,7 +7206,7 @@ in C. @end deffn @geindex gcc_jit_lvalue_set_tls_model (C function) -@anchor{topics/expressions c gcc_jit_lvalue_set_tls_model}@anchor{df} +@anchor{topics/expressions c gcc_jit_lvalue_set_tls_model}@anchor{e2} @deffn {C Function} void gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue@w{ }*lvalue, enum gcc_jit_tls_model@w{ }model) Make a variable a thread-local variable. @@ -7093,34 +7214,34 @@ Make a variable a thread-local variable. The “model” parameter determines the thread-local storage model of the “lvalue”: @geindex gcc_jit_tls_model (C type) -@anchor{topics/expressions c gcc_jit_tls_model}@anchor{e0} +@anchor{topics/expressions c gcc_jit_tls_model}@anchor{e3} @deffn {C Type} enum gcc_jit_tls_model @end deffn @geindex GCC_JIT_TLS_MODEL_NONE (C macro) -@anchor{topics/expressions c GCC_JIT_TLS_MODEL_NONE}@anchor{e1} +@anchor{topics/expressions c GCC_JIT_TLS_MODEL_NONE}@anchor{e4} @deffn {C Macro} GCC_JIT_TLS_MODEL_NONE Don’t set the TLS model. @end deffn @geindex GCC_JIT_TLS_MODEL_GLOBAL_DYNAMIC (C macro) -@anchor{topics/expressions c GCC_JIT_TLS_MODEL_GLOBAL_DYNAMIC}@anchor{e2} +@anchor{topics/expressions c GCC_JIT_TLS_MODEL_GLOBAL_DYNAMIC}@anchor{e5} @deffn {C Macro} GCC_JIT_TLS_MODEL_GLOBAL_DYNAMIC @end deffn @geindex GCC_JIT_TLS_MODEL_LOCAL_DYNAMIC (C macro) -@anchor{topics/expressions c GCC_JIT_TLS_MODEL_LOCAL_DYNAMIC}@anchor{e3} +@anchor{topics/expressions c GCC_JIT_TLS_MODEL_LOCAL_DYNAMIC}@anchor{e6} @deffn {C Macro} GCC_JIT_TLS_MODEL_LOCAL_DYNAMIC @end deffn @geindex GCC_JIT_TLS_MODEL_INITIAL_EXEC (C macro) -@anchor{topics/expressions c GCC_JIT_TLS_MODEL_INITIAL_EXEC}@anchor{e4} +@anchor{topics/expressions c GCC_JIT_TLS_MODEL_INITIAL_EXEC}@anchor{e7} @deffn {C Macro} GCC_JIT_TLS_MODEL_INITIAL_EXEC @end deffn @geindex GCC_JIT_TLS_MODEL_LOCAL_EXEC (C macro) -@anchor{topics/expressions c GCC_JIT_TLS_MODEL_LOCAL_EXEC}@anchor{e5} +@anchor{topics/expressions c GCC_JIT_TLS_MODEL_LOCAL_EXEC}@anchor{e8} @deffn {C Macro} GCC_JIT_TLS_MODEL_LOCAL_EXEC @end deffn @@ -7132,7 +7253,7 @@ _Thread_local int foo __attribute__ ((tls_model("MODEL"))); in C. -This entrypoint was added in @ref{e6,,LIBGCCJIT_ABI_17}; you can test for +This entrypoint was added in @ref{e9,,LIBGCCJIT_ABI_17}; you can test for its presence using @example @@ -7141,7 +7262,7 @@ its presence using @end deffn @geindex gcc_jit_lvalue_set_link_section (C function) -@anchor{topics/expressions c gcc_jit_lvalue_set_link_section}@anchor{e7} +@anchor{topics/expressions c gcc_jit_lvalue_set_link_section}@anchor{ea} @deffn {C Function} void gcc_jit_lvalue_set_link_section (gcc_jit_lvalue@w{ }*lvalue, const char@w{ }*section_name) Set the link section of a variable. @@ -7154,7 +7275,7 @@ int variable __attribute__((section(".section"))); in C. -This entrypoint was added in @ref{e8,,LIBGCCJIT_ABI_18}; you can test for +This entrypoint was added in @ref{eb,,LIBGCCJIT_ABI_18}; you can test for its presence using @example @@ -7168,12 +7289,12 @@ its presence using @end menu @node Global variables,,,Lvalues -@anchor{topics/expressions global-variables}@anchor{e9} +@anchor{topics/expressions global-variables}@anchor{ec} @subsubsection Global variables @geindex gcc_jit_context_new_global (C function) -@anchor{topics/expressions c gcc_jit_context_new_global}@anchor{ea} +@anchor{topics/expressions c gcc_jit_context_new_global}@anchor{ed} @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. @@ -7188,22 +7309,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{eb} +@anchor{topics/expressions c gcc_jit_global_kind}@anchor{ee} @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{ec} +@anchor{topics/expressions c GCC_JIT_GLOBAL_EXPORTED}@anchor{ef} @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{ed,,gcc_jit_result_get_global()} (and this value is required for +@ref{f0,,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{ee} +@anchor{topics/expressions c GCC_JIT_GLOBAL_INTERNAL}@anchor{f1} @deffn {C Macro} GCC_JIT_GLOBAL_INTERNAL Global is defined by the client code, but is invisible @@ -7213,7 +7334,7 @@ context and within child contexts. @end deffn @geindex GCC_JIT_GLOBAL_IMPORTED (C macro) -@anchor{topics/expressions c GCC_JIT_GLOBAL_IMPORTED}@anchor{ef} +@anchor{topics/expressions c GCC_JIT_GLOBAL_IMPORTED}@anchor{f2} @deffn {C Macro} GCC_JIT_GLOBAL_IMPORTED Global is not defined by the client code; we’re merely @@ -7223,7 +7344,7 @@ header file. @end deffn @geindex gcc_jit_global_set_initializer (C function) -@anchor{topics/expressions c gcc_jit_global_set_initializer}@anchor{f0} +@anchor{topics/expressions c gcc_jit_global_set_initializer}@anchor{f3} @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 @@ -7235,7 +7356,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{f1,,LIBGCCJIT_ABI_14}; you can test for +This entrypoint was added in @ref{f4,,LIBGCCJIT_ABI_14}; you can test for its presence using @example @@ -7244,14 +7365,14 @@ its presence using @end deffn @geindex gcc_jit_global_set_initializer_rvalue (C function) -@anchor{topics/expressions c gcc_jit_global_set_initializer_rvalue}@anchor{b2} +@anchor{topics/expressions c gcc_jit_global_set_initializer_rvalue}@anchor{b5} @deffn {C Function} gcc_jit_lvalue * gcc_jit_global_set_initializer_rvalue (gcc_jit_lvalue@w{ }*global, gcc_jit_rvalue@w{ }*init_value) 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{ef,,GCC_JIT_GLOBAL_IMPORTED}. +The global can’t have the @code{kind} @ref{f2,,GCC_JIT_GLOBAL_IMPORTED}. As a non-comprehensive example it is OK to do the equivalent of: @@ -7263,13 +7384,13 @@ const int baz = 3; /* rvalue from gcc_jit_context_rvalue_from_int. */ int boz = baz; /* rvalue from gcc_jit_lvalue_as_rvalue. */ @end example -Use together with @ref{b5,,gcc_jit_context_new_struct_constructor()}, -@ref{b6,,gcc_jit_context_new_union_constructor()}, @ref{b4,,gcc_jit_context_new_array_constructor()} +Use together with @ref{b8,,gcc_jit_context_new_struct_constructor()}, +@ref{b9,,gcc_jit_context_new_union_constructor()}, @ref{b7,,gcc_jit_context_new_array_constructor()} to initialize structs, unions and arrays. On success, returns the @code{global} parameter unchanged. Otherwise, @code{NULL}. -This entrypoint was added in @ref{b3,,LIBGCCJIT_ABI_19}; you can test for its +This entrypoint was added in @ref{b6,,LIBGCCJIT_ABI_19}; you can test for its presence using: @example @@ -7278,12 +7399,12 @@ presence using: @end deffn @node Working with pointers structs and unions,,Lvalues,Expressions -@anchor{topics/expressions working-with-pointers-structs-and-unions}@anchor{f2} +@anchor{topics/expressions working-with-pointers-structs-and-unions}@anchor{f5} @subsection Working with pointers, structs and unions @geindex gcc_jit_rvalue_dereference (C function) -@anchor{topics/expressions c gcc_jit_rvalue_dereference}@anchor{f3} +@anchor{topics/expressions c gcc_jit_rvalue_dereference}@anchor{f6} @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, @@ -7299,7 +7420,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{f4} +@anchor{topics/expressions c gcc_jit_lvalue_access_field}@anchor{f7} @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, @@ -7313,7 +7434,7 @@ in C. @end deffn @geindex gcc_jit_rvalue_access_field (C function) -@anchor{topics/expressions c gcc_jit_rvalue_access_field}@anchor{f5} +@anchor{topics/expressions c gcc_jit_rvalue_access_field}@anchor{f8} @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 @@ -7327,7 +7448,7 @@ in C. @end deffn @geindex gcc_jit_rvalue_dereference_field (C function) -@anchor{topics/expressions c gcc_jit_rvalue_dereference_field}@anchor{f6} +@anchor{topics/expressions c gcc_jit_rvalue_dereference_field}@anchor{f9} @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 @@ -7341,7 +7462,7 @@ in C, itself equivalent to @code{(*EXPR).FIELD}. @end deffn @geindex gcc_jit_context_new_array_access (C function) -@anchor{topics/expressions c gcc_jit_context_new_array_access}@anchor{ce} +@anchor{topics/expressions c gcc_jit_context_new_array_access}@anchor{d1} @deffn {C Function} gcc_jit_lvalue * gcc_jit_context_new_array_access (gcc_jit_context@w{ }*ctxt, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*ptr, gcc_jit_rvalue@w{ }*index) Given an rvalue of pointer type @code{T *}, get at the element @cite{T} at @@ -7374,7 +7495,7 @@ in C (or, indeed, to @code{PTR + INDEX}). @c . @node Creating and using functions,Function pointers<2>,Expressions,Topic Reference -@anchor{topics/functions doc}@anchor{f7}@anchor{topics/functions creating-and-using-functions}@anchor{f8} +@anchor{topics/functions doc}@anchor{fa}@anchor{topics/functions creating-and-using-functions}@anchor{fb} @section Creating and using functions @@ -7387,7 +7508,7 @@ in C (or, indeed, to @code{PTR + INDEX}). @end menu @node Params,Functions,,Creating and using functions -@anchor{topics/functions params}@anchor{f9} +@anchor{topics/functions params}@anchor{fc} @subsection Params @@ -7416,28 +7537,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{fa} +@anchor{topics/functions c gcc_jit_param_as_lvalue}@anchor{fd} @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{fb} +@anchor{topics/functions c gcc_jit_param_as_rvalue}@anchor{fe} @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{fc} +@anchor{topics/functions c gcc_jit_param_as_object}@anchor{ff} @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{fd} +@anchor{topics/functions functions}@anchor{100} @subsection Functions @@ -7456,7 +7577,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{fe} +@anchor{topics/functions c gcc_jit_function_kind}@anchor{101} @deffn {C Type} enum gcc_jit_function_kind @end deffn @@ -7466,7 +7587,7 @@ values: @quotation @geindex GCC_JIT_FUNCTION_EXPORTED (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_EXPORTED}@anchor{ff} +@anchor{topics/functions c GCC_JIT_FUNCTION_EXPORTED}@anchor{102} @deffn {C Macro} GCC_JIT_FUNCTION_EXPORTED Function is defined by the client code and visible @@ -7478,7 +7599,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{100} +@anchor{topics/functions c GCC_JIT_FUNCTION_INTERNAL}@anchor{103} @deffn {C Macro} GCC_JIT_FUNCTION_INTERNAL Function is defined by the client code, but is invisible @@ -7486,7 +7607,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{101} +@anchor{topics/functions c GCC_JIT_FUNCTION_IMPORTED}@anchor{104} @deffn {C Macro} GCC_JIT_FUNCTION_IMPORTED Function is not defined by the client code; we’re merely @@ -7495,7 +7616,7 @@ header file. @end deffn @geindex GCC_JIT_FUNCTION_ALWAYS_INLINE (C macro) -@anchor{topics/functions c GCC_JIT_FUNCTION_ALWAYS_INLINE}@anchor{102} +@anchor{topics/functions c GCC_JIT_FUNCTION_ALWAYS_INLINE}@anchor{105} @deffn {C Macro} GCC_JIT_FUNCTION_ALWAYS_INLINE Function is only ever inlined into other functions, and is @@ -7516,7 +7637,7 @@ buffer. @end deffn @geindex gcc_jit_context_get_builtin_function (C function) -@anchor{topics/functions c gcc_jit_context_get_builtin_function}@anchor{103} +@anchor{topics/functions c gcc_jit_context_get_builtin_function}@anchor{106} @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 @@ -7540,14 +7661,14 @@ the context. @end deffn @geindex gcc_jit_function_as_object (C function) -@anchor{topics/functions c gcc_jit_function_as_object}@anchor{104} +@anchor{topics/functions c gcc_jit_function_as_object}@anchor{107} @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{105} +@anchor{topics/functions c gcc_jit_function_get_param}@anchor{108} @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). @@ -7575,14 +7696,14 @@ buffer. @end deffn @geindex gcc_jit_function_get_param_count (C function) -@anchor{topics/functions c gcc_jit_function_get_param_count}@anchor{106} +@anchor{topics/functions c gcc_jit_function_get_param_count}@anchor{109} @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{107} +@anchor{topics/functions c gcc_jit_function_get_return_type}@anchor{10a} @deffn {C Function} gcc_jit_type * gcc_jit_function_get_return_type (gcc_jit_function@w{ }*func) Get the return type of the function. @@ -7596,10 +7717,10 @@ types: @itemize * @item -@ref{107,,gcc_jit_function_get_return_type()} +@ref{10a,,gcc_jit_function_get_return_type()} @item -@ref{106,,gcc_jit_function_get_param_count()} +@ref{109,,gcc_jit_function_get_param_count()} @end itemize @end quotation @@ -7611,13 +7732,13 @@ using @end example @geindex gcc_jit_case (C type) -@anchor{topics/functions c gcc_jit_case}@anchor{108} +@anchor{topics/functions c gcc_jit_case}@anchor{10b} @deffn {C Type} gcc_jit_case @end deffn @end deffn @node Blocks,Statements,Functions,Creating and using functions -@anchor{topics/functions blocks}@anchor{109} +@anchor{topics/functions blocks}@anchor{10c} @subsection Blocks @@ -7641,7 +7762,7 @@ one function. @end deffn @geindex gcc_jit_function_new_block (C function) -@anchor{topics/functions c gcc_jit_function_new_block}@anchor{10a} +@anchor{topics/functions c gcc_jit_function_new_block}@anchor{10d} @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 @@ -7661,26 +7782,26 @@ 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{10b} +@anchor{topics/functions c gcc_jit_block_as_object}@anchor{10e} @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{10c} +@anchor{topics/functions c gcc_jit_block_get_function}@anchor{10f} @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{10d} +@anchor{topics/functions statements}@anchor{110} @subsection Statements @geindex gcc_jit_block_add_eval (C function) -@anchor{topics/functions c gcc_jit_block_add_eval}@anchor{d3} +@anchor{topics/functions c gcc_jit_block_add_eval}@anchor{d6} @deffn {C Function} void gcc_jit_block_add_eval (gcc_jit_block@w{ }*block, gcc_jit_location@w{ }*loc, gcc_jit_rvalue@w{ }*rvalue) Add evaluation of an rvalue, discarding the result @@ -7777,7 +7898,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{10e} +@anchor{topics/functions c gcc_jit_block_end_with_jump}@anchor{111} @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. @@ -7790,7 +7911,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{10f} +@anchor{topics/functions c gcc_jit_block_end_with_return}@anchor{112} @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. @@ -7803,7 +7924,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{110} +@anchor{topics/functions c gcc_jit_block_end_with_void_return}@anchor{113} @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 @@ -7817,7 +7938,7 @@ return; @end deffn @geindex gcc_jit_block_end_with_switch (C function) -@anchor{topics/functions c gcc_jit_block_end_with_switch}@anchor{111} +@anchor{topics/functions c gcc_jit_block_end_with_switch}@anchor{114} @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 @@ -7863,17 +7984,17 @@ The API entrypoints relating to switch statements and cases: @itemize * @item -@ref{111,,gcc_jit_block_end_with_switch()} +@ref{114,,gcc_jit_block_end_with_switch()} @item -@ref{112,,gcc_jit_case_as_object()} +@ref{115,,gcc_jit_case_as_object()} @item -@ref{113,,gcc_jit_context_new_case()} +@ref{116,,gcc_jit_context_new_case()} @end itemize @end quotation -were added in @ref{114,,LIBGCCJIT_ABI_3}; you can test for their presence +were added in @ref{117,,LIBGCCJIT_ABI_3}; you can test for their presence using @example @@ -7887,14 +8008,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{113,,gcc_jit_context_new_case()}. +@ref{116,,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{113} +@anchor{topics/functions c gcc_jit_context_new_case}@anchor{116} @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. @@ -7906,7 +8027,7 @@ statement. @end deffn @geindex gcc_jit_case_as_object (C function) -@anchor{topics/functions c gcc_jit_case_as_object}@anchor{112} +@anchor{topics/functions c gcc_jit_case_as_object}@anchor{115} @deffn {C Function} gcc_jit_object * gcc_jit_case_as_object (gcc_jit_case@w{ }*case_) Upcast from a case to an object. @@ -8020,7 +8141,7 @@ create_code (gcc_jit_context *ctxt, void *user_data) @end quotation @end deffn -See also @ref{115,,gcc_jit_extended_asm} for entrypoints for adding inline +See also @ref{118,,gcc_jit_extended_asm} for entrypoints for adding inline assembler statements to a function. @c Copyright (C) 2017-2022 Free Software Foundation, Inc. @@ -8041,26 +8162,26 @@ assembler statements to a function. @c . @node Function pointers<2>,Source Locations,Creating and using functions,Topic Reference -@anchor{topics/function-pointers doc}@anchor{116}@anchor{topics/function-pointers function-pointers}@anchor{117} +@anchor{topics/function-pointers doc}@anchor{119}@anchor{topics/function-pointers function-pointers}@anchor{11a} @section Function pointers You can generate calls that use a function pointer via -@ref{d4,,gcc_jit_context_new_call_through_ptr()}. +@ref{d7,,gcc_jit_context_new_call_through_ptr()}. To do requires a @ref{13,,gcc_jit_rvalue} of the correct function pointer type. Function pointers for a @ref{29,,gcc_jit_function} can be obtained -via @ref{d8,,gcc_jit_function_get_address()}. +via @ref{db,,gcc_jit_function_get_address()}. @geindex gcc_jit_function_get_address (C function) -@anchor{topics/function-pointers c gcc_jit_function_get_address}@anchor{d8} +@anchor{topics/function-pointers c gcc_jit_function_get_address}@anchor{db} @deffn {C Function} gcc_jit_rvalue * gcc_jit_function_get_address (gcc_jit_function@w{ }*fn, gcc_jit_location@w{ }*loc) Get the address of a function as an rvalue, of function pointer type. -This entrypoint was added in @ref{118,,LIBGCCJIT_ABI_9}; you can test +This entrypoint was added in @ref{11b,,LIBGCCJIT_ABI_9}; you can test for its presence using @example @@ -8070,7 +8191,7 @@ for its presence using Alternatively, given an existing function, you can obtain a pointer to it in @ref{13,,gcc_jit_rvalue} form using -@ref{ae,,gcc_jit_context_new_rvalue_from_ptr()}, using a function pointer +@ref{b1,,gcc_jit_context_new_rvalue_from_ptr()}, using a function pointer type obtained using @ref{95,,gcc_jit_context_new_function_ptr_type()}. Here’s an example of creating a function pointer type corresponding to C’s @@ -8122,7 +8243,7 @@ Each of @cite{param_types} must be non-@cite{void}; @cite{return_type} may be @c @c . @node Source Locations,Compiling a context,Function pointers<2>,Topic Reference -@anchor{topics/locations doc}@anchor{119}@anchor{topics/locations source-locations}@anchor{11a} +@anchor{topics/locations doc}@anchor{11c}@anchor{topics/locations source-locations}@anchor{11d} @section Source Locations @@ -8170,7 +8291,7 @@ on-stack buffer. @end menu @node Faking it,,,Source Locations -@anchor{topics/locations faking-it}@anchor{11b} +@anchor{topics/locations faking-it}@anchor{11e} @subsection Faking it @@ -8206,7 +8327,7 @@ file, giving you @emph{something} you can step through in the debugger. @c . @node Compiling a context,ABI and API compatibility,Source Locations,Topic Reference -@anchor{topics/compilation doc}@anchor{11c}@anchor{topics/compilation compiling-a-context}@anchor{11d} +@anchor{topics/compilation doc}@anchor{11f}@anchor{topics/compilation compiling-a-context}@anchor{120} @section Compiling a context @@ -8225,7 +8346,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{11e} +@anchor{topics/compilation in-memory-compilation}@anchor{121} @subsection In-memory compilation @@ -8260,7 +8381,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{ff,,GCC_JIT_FUNCTION_EXPORTED}: +@ref{102,,GCC_JIT_FUNCTION_EXPORTED}: @example gcc_jit_context_new_function (ctxt, @@ -8288,7 +8409,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{ed} +@anchor{topics/compilation c gcc_jit_result_get_global}@anchor{f0} @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. @@ -8296,8 +8417,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{ea,,gcc_jit_context_new_global()} with @cite{kind} -@ref{ec,,GCC_JIT_GLOBAL_EXPORTED}. +@ref{ed,,gcc_jit_context_new_global()} with @cite{kind} +@ref{ef,,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. @@ -8341,11 +8462,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{ed,,gcc_jit_result_get_global()} on it. +@ref{f0,,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{11f} +@anchor{topics/compilation ahead-of-time-compilation}@anchor{122} @subsection Ahead-of-time compilation @@ -8376,7 +8497,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{120} +@anchor{topics/compilation c gcc_jit_output_kind}@anchor{123} @deffn {C Type} enum gcc_jit_output_kind @end deffn @@ -8394,7 +8515,7 @@ Typical suffix @item -@ref{121,,GCC_JIT_OUTPUT_KIND_ASSEMBLER} +@ref{124,,GCC_JIT_OUTPUT_KIND_ASSEMBLER} @tab @@ -8402,7 +8523,7 @@ Typical suffix @item -@ref{122,,GCC_JIT_OUTPUT_KIND_OBJECT_FILE} +@ref{125,,GCC_JIT_OUTPUT_KIND_OBJECT_FILE} @tab @@ -8410,7 +8531,7 @@ Typical suffix @item -@ref{123,,GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY} +@ref{126,,GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY} @tab @@ -8418,7 +8539,7 @@ Typical suffix @item -@ref{124,,GCC_JIT_OUTPUT_KIND_EXECUTABLE} +@ref{127,,GCC_JIT_OUTPUT_KIND_EXECUTABLE} @tab @@ -8428,28 +8549,28 @@ None, or .exe @geindex GCC_JIT_OUTPUT_KIND_ASSEMBLER (C macro) -@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_ASSEMBLER}@anchor{121} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_ASSEMBLER}@anchor{124} @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{122} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_OBJECT_FILE}@anchor{125} @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{123} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY}@anchor{126} @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{124} +@anchor{topics/compilation c GCC_JIT_OUTPUT_KIND_EXECUTABLE}@anchor{127} @deffn {C Macro} GCC_JIT_OUTPUT_KIND_EXECUTABLE Compile the context to an executable. @@ -8473,7 +8594,7 @@ Compile the context to an executable. @c . @node ABI and API compatibility,Performance,Compiling a context,Topic Reference -@anchor{topics/compatibility doc}@anchor{125}@anchor{topics/compatibility abi-and-api-compatibility}@anchor{126} +@anchor{topics/compatibility doc}@anchor{128}@anchor{topics/compatibility abi-and-api-compatibility}@anchor{129} @section ABI and API compatibility @@ -8529,21 +8650,21 @@ Version definitions: @end menu @node Programmatically checking version,ABI symbol tags,,ABI and API compatibility -@anchor{topics/compatibility programmatically-checking-version}@anchor{127} +@anchor{topics/compatibility programmatically-checking-version}@anchor{12a} @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{128} +@anchor{topics/compatibility c gcc_jit_version_major}@anchor{12b} @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{129} +@anchor{topics/compatibility c gcc_jit_version_minor}@anchor{12c} @deffn {C Function} int gcc_jit_version_minor (void) Return libgccjit minor version. This is analogous to @@ -8551,7 +8672,7 @@ __GNUC_MINOR__ in C code. @end deffn @geindex gcc_jit_version_patchlevel (C function) -@anchor{topics/compatibility c gcc_jit_version_patchlevel}@anchor{12a} +@anchor{topics/compatibility c gcc_jit_version_patchlevel}@anchor{12d} @deffn {C Function} int gcc_jit_version_patchlevel (void) Return libgccjit patchlevel version. This is analogous to @@ -8566,7 +8687,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{12b} +@anchor{topics/compatibility abi-symbol-tags}@anchor{12e} @subsection ABI symbol tags @@ -8595,11 +8716,12 @@ Newer releases use the following tags. * LIBGCCJIT_ABI_17:: * LIBGCCJIT_ABI_18:: * LIBGCCJIT_ABI_19:: +* LIBGCCJIT_ABI_20:: @end menu @node LIBGCCJIT_ABI_0,LIBGCCJIT_ABI_1,,ABI symbol tags -@anchor{topics/compatibility id1}@anchor{12c}@anchor{topics/compatibility libgccjit-abi-0}@anchor{12d} +@anchor{topics/compatibility id1}@anchor{12f}@anchor{topics/compatibility libgccjit-abi-0}@anchor{130} @subsubsection @code{LIBGCCJIT_ABI_0} @@ -8611,7 +8733,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{12e}@anchor{topics/compatibility libgccjit-abi-1}@anchor{73} +@anchor{topics/compatibility id2}@anchor{131}@anchor{topics/compatibility libgccjit-abi-1}@anchor{73} @subsubsection @code{LIBGCCJIT_ABI_1} @@ -8619,7 +8741,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{12f}@anchor{topics/compatibility libgccjit-abi-2}@anchor{6c} +@anchor{topics/compatibility id3}@anchor{132}@anchor{topics/compatibility libgccjit-abi-2}@anchor{6c} @subsubsection @code{LIBGCCJIT_ABI_2} @@ -8627,7 +8749,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{130}@anchor{topics/compatibility libgccjit-abi-3}@anchor{114} +@anchor{topics/compatibility id4}@anchor{133}@anchor{topics/compatibility libgccjit-abi-3}@anchor{117} @subsubsection @code{LIBGCCJIT_ABI_3} @@ -8640,18 +8762,18 @@ entrypoints: @itemize * @item -@ref{111,,gcc_jit_block_end_with_switch()} +@ref{114,,gcc_jit_block_end_with_switch()} @item -@ref{112,,gcc_jit_case_as_object()} +@ref{115,,gcc_jit_case_as_object()} @item -@ref{113,,gcc_jit_context_new_case()} +@ref{116,,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{131}@anchor{topics/compatibility libgccjit-abi-4}@anchor{132} +@anchor{topics/compatibility id5}@anchor{134}@anchor{topics/compatibility libgccjit-abi-4}@anchor{135} @subsubsection @code{LIBGCCJIT_ABI_4} @@ -8664,30 +8786,30 @@ entrypoints: @itemize * @item -@ref{133,,gcc_jit_context_get_timer()} +@ref{136,,gcc_jit_context_get_timer()} @item -@ref{134,,gcc_jit_context_set_timer()} +@ref{137,,gcc_jit_context_set_timer()} @item -@ref{135,,gcc_jit_timer_new()} +@ref{138,,gcc_jit_timer_new()} @item -@ref{136,,gcc_jit_timer_release()} +@ref{139,,gcc_jit_timer_release()} @item -@ref{137,,gcc_jit_timer_push()} +@ref{13a,,gcc_jit_timer_push()} @item -@ref{138,,gcc_jit_timer_pop()} +@ref{13b,,gcc_jit_timer_pop()} @item -@ref{139,,gcc_jit_timer_print()} +@ref{13c,,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{13a}@anchor{topics/compatibility libgccjit-abi-5}@anchor{6e} +@anchor{topics/compatibility id6}@anchor{13d}@anchor{topics/compatibility libgccjit-abi-5}@anchor{6e} @subsubsection @code{LIBGCCJIT_ABI_5} @@ -8695,15 +8817,15 @@ 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{13b}@anchor{topics/compatibility libgccjit-abi-6}@anchor{d6} +@anchor{topics/compatibility id7}@anchor{13e}@anchor{topics/compatibility libgccjit-abi-6}@anchor{d9} @subsubsection @code{LIBGCCJIT_ABI_6} @code{LIBGCCJIT_ABI_6} covers the addition of -@ref{d5,,gcc_jit_rvalue_set_bool_require_tail_call()} +@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{13c}@anchor{topics/compatibility libgccjit-abi-7}@anchor{83} +@anchor{topics/compatibility id8}@anchor{13f}@anchor{topics/compatibility libgccjit-abi-7}@anchor{83} @subsubsection @code{LIBGCCJIT_ABI_7} @@ -8711,7 +8833,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{13d}@anchor{topics/compatibility libgccjit-abi-8}@anchor{86} +@anchor{topics/compatibility id9}@anchor{140}@anchor{topics/compatibility libgccjit-abi-8}@anchor{86} @subsubsection @code{LIBGCCJIT_ABI_8} @@ -8719,15 +8841,15 @@ 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{13e}@anchor{topics/compatibility libgccjit-abi-9}@anchor{118} +@anchor{topics/compatibility id10}@anchor{141}@anchor{topics/compatibility libgccjit-abi-9}@anchor{11b} @subsubsection @code{LIBGCCJIT_ABI_9} @code{LIBGCCJIT_ABI_9} covers the addition of -@ref{d8,,gcc_jit_function_get_address()} +@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{13f}@anchor{topics/compatibility libgccjit-abi-10}@anchor{b8} +@anchor{topics/compatibility id11}@anchor{142}@anchor{topics/compatibility libgccjit-abi-10}@anchor{bb} @subsubsection @code{LIBGCCJIT_ABI_10} @@ -8735,7 +8857,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{140}@anchor{topics/compatibility libgccjit-abi-11}@anchor{75} +@anchor{topics/compatibility id12}@anchor{143}@anchor{topics/compatibility libgccjit-abi-11}@anchor{75} @subsubsection @code{LIBGCCJIT_ABI_11} @@ -8743,7 +8865,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{141}@anchor{topics/compatibility libgccjit-abi-12}@anchor{8d} +@anchor{topics/compatibility id13}@anchor{144}@anchor{topics/compatibility libgccjit-abi-12}@anchor{8d} @subsubsection @code{LIBGCCJIT_ABI_12} @@ -8751,7 +8873,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{142}@anchor{topics/compatibility libgccjit-abi-13}@anchor{143} +@anchor{topics/compatibility id14}@anchor{145}@anchor{topics/compatibility libgccjit-abi-13}@anchor{146} @subsubsection @code{LIBGCCJIT_ABI_13} @@ -8764,26 +8886,26 @@ entrypoints: @itemize * @item -@ref{128,,gcc_jit_version_major()} +@ref{12b,,gcc_jit_version_major()} @item -@ref{129,,gcc_jit_version_minor()} +@ref{12c,,gcc_jit_version_minor()} @item -@ref{12a,,gcc_jit_version_patchlevel()} +@ref{12d,,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{144}@anchor{topics/compatibility libgccjit-abi-14}@anchor{f1} +@anchor{topics/compatibility id15}@anchor{147}@anchor{topics/compatibility libgccjit-abi-14}@anchor{f4} @subsubsection @code{LIBGCCJIT_ABI_14} @code{LIBGCCJIT_ABI_14} covers the addition of -@ref{f0,,gcc_jit_global_set_initializer()} +@ref{f3,,gcc_jit_global_set_initializer()} @node LIBGCCJIT_ABI_15,LIBGCCJIT_ABI_16,LIBGCCJIT_ABI_14,ABI symbol tags -@anchor{topics/compatibility id16}@anchor{145}@anchor{topics/compatibility libgccjit-abi-15}@anchor{146} +@anchor{topics/compatibility id16}@anchor{148}@anchor{topics/compatibility libgccjit-abi-15}@anchor{149} @subsubsection @code{LIBGCCJIT_ABI_15} @@ -8796,36 +8918,36 @@ embedding assembler instructions: @itemize * @item -@ref{147,,gcc_jit_block_add_extended_asm()} +@ref{14a,,gcc_jit_block_add_extended_asm()} @item -@ref{148,,gcc_jit_block_end_with_extended_asm_goto()} +@ref{14b,,gcc_jit_block_end_with_extended_asm_goto()} @item -@ref{149,,gcc_jit_extended_asm_as_object()} +@ref{14c,,gcc_jit_extended_asm_as_object()} @item -@ref{14a,,gcc_jit_extended_asm_set_volatile_flag()} +@ref{14d,,gcc_jit_extended_asm_set_volatile_flag()} @item -@ref{14b,,gcc_jit_extended_asm_set_inline_flag()} +@ref{14e,,gcc_jit_extended_asm_set_inline_flag()} @item -@ref{14c,,gcc_jit_extended_asm_add_output_operand()} +@ref{14f,,gcc_jit_extended_asm_add_output_operand()} @item -@ref{14d,,gcc_jit_extended_asm_add_input_operand()} +@ref{150,,gcc_jit_extended_asm_add_input_operand()} @item -@ref{14e,,gcc_jit_extended_asm_add_clobber()} +@ref{151,,gcc_jit_extended_asm_add_clobber()} @item -@ref{14f,,gcc_jit_context_add_top_level_asm()} +@ref{152,,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{150}@anchor{topics/compatibility libgccjit-abi-16}@anchor{a6} +@anchor{topics/compatibility id17}@anchor{153}@anchor{topics/compatibility libgccjit-abi-16}@anchor{a6} @subsubsection @code{LIBGCCJIT_ABI_16} @@ -8838,10 +8960,10 @@ entrypoints: @itemize * @item -@ref{107,,gcc_jit_function_get_return_type()} +@ref{10a,,gcc_jit_function_get_return_type()} @item -@ref{106,,gcc_jit_function_get_param_count()} +@ref{109,,gcc_jit_function_get_param_count()} @item @ref{97,,gcc_jit_type_dyncast_array()} @@ -8891,7 +9013,7 @@ entrypoints: @end quotation @node LIBGCCJIT_ABI_17,LIBGCCJIT_ABI_18,LIBGCCJIT_ABI_16,ABI symbol tags -@anchor{topics/compatibility id18}@anchor{151}@anchor{topics/compatibility libgccjit-abi-17}@anchor{e6} +@anchor{topics/compatibility id18}@anchor{154}@anchor{topics/compatibility libgccjit-abi-17}@anchor{e9} @subsubsection @code{LIBGCCJIT_ABI_17} @@ -8904,12 +9026,12 @@ thread-local storage model of a variable: @itemize * @item -@ref{df,,gcc_jit_lvalue_set_tls_model()} +@ref{e2,,gcc_jit_lvalue_set_tls_model()} @end itemize @end quotation @node LIBGCCJIT_ABI_18,LIBGCCJIT_ABI_19,LIBGCCJIT_ABI_17,ABI symbol tags -@anchor{topics/compatibility id19}@anchor{152}@anchor{topics/compatibility libgccjit-abi-18}@anchor{e8} +@anchor{topics/compatibility id19}@anchor{155}@anchor{topics/compatibility libgccjit-abi-18}@anchor{eb} @subsubsection @code{LIBGCCJIT_ABI_18} @@ -8922,12 +9044,12 @@ section of a variable: @itemize * @item -@ref{e7,,gcc_jit_lvalue_set_link_section()} +@ref{ea,,gcc_jit_lvalue_set_link_section()} @end itemize @end quotation -@node LIBGCCJIT_ABI_19,,LIBGCCJIT_ABI_18,ABI symbol tags -@anchor{topics/compatibility id20}@anchor{153}@anchor{topics/compatibility libgccjit-abi-19}@anchor{b3} +@node LIBGCCJIT_ABI_19,LIBGCCJIT_ABI_20,LIBGCCJIT_ABI_18,ABI symbol tags +@anchor{topics/compatibility id20}@anchor{156}@anchor{topics/compatibility libgccjit-abi-19}@anchor{b6} @subsubsection @code{LIBGCCJIT_ABI_19} @@ -8940,16 +9062,67 @@ of a global with an rvalue and to use constructors: @itemize * @item -@ref{b4,,gcc_jit_context_new_array_constructor()} +@ref{b7,,gcc_jit_context_new_array_constructor()} + +@item +@ref{b8,,gcc_jit_context_new_struct_constructor()} + +@item +@ref{b9,,gcc_jit_context_new_union_constructor()} + +@item +@ref{b5,,gcc_jit_global_set_initializer_rvalue()} +@end itemize +@end quotation + +@node LIBGCCJIT_ABI_20,,LIBGCCJIT_ABI_19,ABI symbol tags +@anchor{topics/compatibility id21}@anchor{157}@anchor{topics/compatibility libgccjit-abi-20}@anchor{a9} +@subsubsection @code{LIBGCCJIT_ABI_20} + + +@code{LIBGCCJIT_ABI_20} covers the addition of sized integer types, including +128-bit integers and helper functions for types: + +@quotation + + +@itemize * + +@item +@ref{a8,,gcc_jit_compatible_types()} + +@item +@ref{aa,,gcc_jit_type_get_size()} + +@item +@code{GCC_JIT_TYPE_UINT8_T} + +@item +@code{GCC_JIT_TYPE_UINT16_T} + +@item +@code{GCC_JIT_TYPE_UINT32_T} + +@item +@code{GCC_JIT_TYPE_UINT64_T} + +@item +@code{GCC_JIT_TYPE_UINT128_T} + +@item +@code{GCC_JIT_TYPE_INT8_T} + +@item +@code{GCC_JIT_TYPE_INT16_T} @item -@ref{b5,,gcc_jit_context_new_struct_constructor()} +@code{GCC_JIT_TYPE_INT32_T} @item -@ref{b6,,gcc_jit_context_new_union_constructor()} +@code{GCC_JIT_TYPE_INT64_T} @item -@ref{b2,,gcc_jit_global_set_initializer_rvalue()} +@code{GCC_JIT_TYPE_INT128_T} @end itemize @end quotation @@ -8971,7 +9144,7 @@ of a global with an rvalue and to use constructors: @c . @node Performance,Using Assembly Language with libgccjit,ABI and API compatibility,Topic Reference -@anchor{topics/performance doc}@anchor{154}@anchor{topics/performance performance}@anchor{155} +@anchor{topics/performance doc}@anchor{158}@anchor{topics/performance performance}@anchor{159} @section Performance @@ -8981,14 +9154,14 @@ of a global with an rvalue and to use constructors: @end menu @node The timing API,,,Performance -@anchor{topics/performance the-timing-api}@anchor{156} +@anchor{topics/performance the-timing-api}@anchor{15a} @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{157,,gcc_jit_timer} instance, which will +You can create a @ref{15b,,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 @@ -9086,7 +9259,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{158} +@anchor{topics/performance c LIBGCCJIT_HAVE_TIMING_API}@anchor{15c} @deffn {C Macro} LIBGCCJIT_HAVE_TIMING_API The timer API was added to libgccjit in GCC 6. @@ -9103,21 +9276,21 @@ gcc_jit_context_set_timer (ctxt, t); @end deffn @geindex gcc_jit_timer (C type) -@anchor{topics/performance c gcc_jit_timer}@anchor{157} +@anchor{topics/performance c gcc_jit_timer}@anchor{15b} @deffn {C Type} gcc_jit_timer @end deffn @geindex gcc_jit_timer_new (C function) -@anchor{topics/performance c gcc_jit_timer_new}@anchor{135} +@anchor{topics/performance c gcc_jit_timer_new}@anchor{138} @deffn {C Function} gcc_jit_timer * gcc_jit_timer_new (void) -Create a @ref{157,,gcc_jit_timer} instance, and start timing: +Create a @ref{15b,,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{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9126,10 +9299,10 @@ for its presence using @end deffn @geindex gcc_jit_timer_release (C function) -@anchor{topics/performance c gcc_jit_timer_release}@anchor{136} +@anchor{topics/performance c gcc_jit_timer_release}@anchor{139} @deffn {C Function} void gcc_jit_timer_release (gcc_jit_timer@w{ }*timer) -Release a @ref{157,,gcc_jit_timer} instance: +Release a @ref{15b,,gcc_jit_timer} instance: @example gcc_jit_timer_release (t); @@ -9137,7 +9310,7 @@ gcc_jit_timer_release (t); This should be called exactly once on a timer. -This API entrypoint was added in @ref{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9146,10 +9319,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{134} +@anchor{topics/performance c gcc_jit_context_set_timer}@anchor{137} @deffn {C Function} void gcc_jit_context_set_timer (gcc_jit_context@w{ }*ctxt, gcc_jit_timer@w{ }*timer) -Associate a @ref{157,,gcc_jit_timer} instance with a context: +Associate a @ref{15b,,gcc_jit_timer} instance with a context: @example gcc_jit_context_set_timer (ctxt, t); @@ -9162,7 +9335,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{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9171,12 +9344,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{133} +@anchor{topics/performance c gcc_jit_context_get_timer}@anchor{136} @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{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9185,7 +9358,7 @@ for its presence using @end deffn @geindex gcc_jit_timer_push (C function) -@anchor{topics/performance c gcc_jit_timer_push}@anchor{137} +@anchor{topics/performance c gcc_jit_timer_push}@anchor{13a} @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: @@ -9196,7 +9369,7 @@ run_the_code (ctxt, result); gcc_jit_timer_pop (t, "running code"); @end example -This API entrypoint was added in @ref{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9205,7 +9378,7 @@ for its presence using @end deffn @geindex gcc_jit_timer_pop (C function) -@anchor{topics/performance c gcc_jit_timer_pop}@anchor{138} +@anchor{topics/performance c gcc_jit_timer_pop}@anchor{13b} @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. @@ -9213,7 +9386,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{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9222,13 +9395,13 @@ for its presence using @end deffn @geindex gcc_jit_timer_print (C function) -@anchor{topics/performance c gcc_jit_timer_print}@anchor{139} +@anchor{topics/performance c gcc_jit_timer_print}@anchor{13c} @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{132,,LIBGCCJIT_ABI_4}; you can test +This API entrypoint was added in @ref{135,,LIBGCCJIT_ABI_4}; you can test for its presence using @example @@ -9254,7 +9427,7 @@ for its presence using @c . @node Using Assembly Language with libgccjit,,Performance,Topic Reference -@anchor{topics/asm doc}@anchor{159}@anchor{topics/asm using-assembly-language-with-libgccjit}@anchor{15a} +@anchor{topics/asm doc}@anchor{15d}@anchor{topics/asm using-assembly-language-with-libgccjit}@anchor{15e} @section Using Assembly Language with libgccjit @@ -9264,7 +9437,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{146,,LIBGCCJIT_ABI_15}; you can test +These entrypoints were added in @ref{149,,LIBGCCJIT_ABI_15}; you can test for their presence using @quotation @@ -9281,12 +9454,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{15b} +@anchor{topics/asm adding-assembler-instructions-within-a-function}@anchor{15f} @subsection Adding assembler instructions within a function @geindex gcc_jit_extended_asm (C type) -@anchor{topics/asm c gcc_jit_extended_asm}@anchor{115} +@anchor{topics/asm c gcc_jit_extended_asm}@anchor{118} @deffn {C Type} gcc_jit_extended_asm A @cite{gcc_jit_extended_asm} represents an extended @code{asm} statement: a @@ -9295,21 +9468,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{115,,gcc_jit_extended_asm}, +an initial call to create the @ref{118,,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{115,,gcc_jit_extended_asm}: +There are two API entrypoints for creating a @ref{118,,gcc_jit_extended_asm}: @itemize * @item -@ref{147,,gcc_jit_block_add_extended_asm()} for an @code{asm} statement with +@ref{14a,,gcc_jit_block_add_extended_asm()} for an @code{asm} statement with no control flow, and @item -@ref{148,,gcc_jit_block_end_with_extended_asm_goto()} for an @code{asm goto}. +@ref{14b,,gcc_jit_block_end_with_extended_asm_goto()} for an @code{asm goto}. @end itemize For example, to create the equivalent of: @@ -9340,8 +9513,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{14c,,gcc_jit_extended_asm_add_output_operand()} and -@ref{14d,,gcc_jit_extended_asm_add_input_operand()} were made in. +@ref{14f,,gcc_jit_extended_asm_add_output_operand()} and +@ref{150,,gcc_jit_extended_asm_add_input_operand()} were made in. @end quotation @end cartouche @@ -9369,10 +9542,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{147} +@anchor{topics/asm c gcc_jit_block_add_extended_asm}@anchor{14a} @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{115,,gcc_jit_extended_asm} for an extended @code{asm} statement +Create a @ref{118,,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} @@ -9382,10 +9555,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{148} +@anchor{topics/asm c gcc_jit_block_end_with_extended_asm_goto}@anchor{14b} @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{115,,gcc_jit_extended_asm} for an extended @code{asm} statement +Create a @ref{118,,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. @@ -9448,10 +9621,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{14a} +@anchor{topics/asm c gcc_jit_extended_asm_set_volatile_flag}@anchor{14d} @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{115,,gcc_jit_extended_asm} has side-effects, equivalent to the +Set whether the @ref{118,,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. @@ -9480,11 +9653,11 @@ the following API calls could be used: gcc_jit_extended_asm_add_clobber (ext_asm, "rdx"); @end example -where the @ref{115,,gcc_jit_extended_asm} is flagged as volatile. +where the @ref{118,,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{14b} +@anchor{topics/asm c gcc_jit_extended_asm_set_inline_flag}@anchor{14e} @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 @@ -9493,7 +9666,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{14c} +@anchor{topics/asm c gcc_jit_extended_asm_add_output_operand}@anchor{14f} @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 @@ -9527,7 +9700,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{14d} +@anchor{topics/asm c gcc_jit_extended_asm_add_input_operand}@anchor{150} @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 @@ -9558,7 +9731,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{14e} +@anchor{topics/asm c gcc_jit_extended_asm_add_clobber}@anchor{151} @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} @@ -9578,18 +9751,18 @@ gcc_jit_extended_asm_add_clobber (ext_asm, "memory"); @end example @end deffn -A @ref{115,,gcc_jit_extended_asm} is a @ref{e,,gcc_jit_object} “owned” by +A @ref{118,,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{149} +@anchor{topics/asm c gcc_jit_extended_asm_as_object}@anchor{14c} @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{15c} +@anchor{topics/asm adding-top-level-assembler-statements}@anchor{160} @subsection Adding top-level assembler statements @@ -9598,7 +9771,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{14f} +@anchor{topics/asm c gcc_jit_context_add_top_level_asm}@anchor{152} @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 @@ -9651,7 +9824,7 @@ the following API calls could be used: @c . @node C++ bindings for libgccjit,Internals,Topic Reference,Top -@anchor{cp/index doc}@anchor{15d}@anchor{cp/index c-bindings-for-libgccjit}@anchor{15e} +@anchor{cp/index doc}@anchor{161}@anchor{cp/index c-bindings-for-libgccjit}@anchor{162} @chapter C++ bindings for libgccjit @@ -9691,7 +9864,7 @@ Contents: @end menu @node Tutorial<2>,Topic Reference<2>,,C++ bindings for libgccjit -@anchor{cp/intro/index doc}@anchor{15f}@anchor{cp/intro/index tutorial}@anchor{160} +@anchor{cp/intro/index doc}@anchor{163}@anchor{cp/intro/index tutorial}@anchor{164} @section Tutorial @@ -9721,7 +9894,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{161}@anchor{cp/intro/tutorial01 tutorial-part-1-hello-world}@anchor{162} +@anchor{cp/intro/tutorial01 doc}@anchor{165}@anchor{cp/intro/tutorial01 tutorial-part-1-hello-world}@anchor{166} @subsection Tutorial part 1: “Hello world” @@ -9884,7 +10057,7 @@ hello world @c . @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{163}@anchor{cp/intro/tutorial02 tutorial-part-2-creating-a-trivial-machine-code-function}@anchor{164} +@anchor{cp/intro/tutorial02 doc}@anchor{167}@anchor{cp/intro/tutorial02 tutorial-part-2-creating-a-trivial-machine-code-function}@anchor{168} @subsection Tutorial part 2: Creating a trivial machine code function @@ -9906,10 +10079,10 @@ First we need to include the relevant header: @end example All state associated with compilation is associated with a -@ref{165,,gccjit;;context}, which is a thin C++ wrapper around the C API’s +@ref{169,,gccjit;;context}, which is a thin C++ wrapper around the C API’s @ref{8,,gcc_jit_context *}. -Create one using @ref{166,,gccjit;;context;;acquire()}: +Create one using @ref{16a,,gccjit;;context;;acquire()}: @example gccjit::context ctxt; @@ -9919,19 +10092,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{167,,gccjit;;type}, using -@ref{168,,gccjit;;context;;get_type()}: +the context, as a @ref{16b,,gccjit;;type}, using +@ref{16c,,gccjit;;context;;get_type()}: @example gccjit::type int_type = ctxt.get_type (GCC_JIT_TYPE_INT); @end example -@ref{167,,gccjit;;type} is an example of a “contextual” object: every -entity in the API is associated with a @ref{165,,gccjit;;context}. +@ref{16b,,gccjit;;type} is an example of a “contextual” object: every +entity in the API is associated with a @ref{169,,gccjit;;context}. Memory management is easy: all such “contextual” objects are automatically cleaned up for you when the context is released, using -@ref{169,,gccjit;;context;;release()}: +@ref{16d,,gccjit;;context;;release()}: @example ctxt.release (); @@ -9958,9 +10131,9 @@ The C++ class hierarchy within the @code{gccjit} namespace looks like this: +- param @end example -One thing you can do with a @ref{16a,,gccjit;;object} is +One thing you can do with a @ref{16e,,gccjit;;object} is to ask it for a human-readable description as a @code{std::string}, using -@ref{16b,,gccjit;;object;;get_debug_string()}: +@ref{16f,,gccjit;;object;;get_debug_string()}: @example printf ("obj: %s\n", obj.get_debug_string ().c_str ()); @@ -9976,7 +10149,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{16c,,gccjit;;context;;new_param()}: +using @ref{170,,gccjit;;context;;new_param()}: @example gccjit::param param_i = ctxt.new_param (int_type, "i"); @@ -10017,7 +10190,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{16d,,gccjit;;context;;new_binary_op()}: +We can build the expression using @ref{171,,gccjit;;context;;new_binary_op()}: @example gccjit::rvalue expr = @@ -10026,9 +10199,9 @@ gccjit::rvalue expr = param_i, param_i); @end example -A @ref{16e,,gccjit;;rvalue} is another example of a -@ref{16a,,gccjit;;object} subclass. As before, we can print it with -@ref{16b,,gccjit;;object;;get_debug_string()}. +A @ref{172,,gccjit;;rvalue} is another example of a +@ref{16e,,gccjit;;object} subclass. As before, we can print it with +@ref{16f,,gccjit;;object;;get_debug_string()}. @example printf ("expr: %s\n", expr.get_debug_string ().c_str ()); @@ -10040,7 +10213,7 @@ giving this output: expr: i * i @end example -Note that @ref{16e,,gccjit;;rvalue} provides numerous overloaded operators +Note that @ref{172,,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: @@ -10057,7 +10230,7 @@ block.end_with_return (expr); @end example OK, we’ve populated the context. We can now compile it using -@ref{16f,,gccjit;;context;;compile()}: +@ref{173,,gccjit;;context;;compile()}: @example gcc_jit_result *result; @@ -10099,12 +10272,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{170} +@anchor{cp/intro/tutorial02 options}@anchor{174} @subsubsection Options To get more information on what’s going on, you can set debugging flags -on the context using @ref{171,,gccjit;;context;;set_bool_option()}. +on the context using @ref{175,,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 @@ -10168,7 +10341,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{172,,gccjit;;context;;set_int_option()} with +@ref{176,,gccjit;;context;;set_int_option()} with @ref{1f,,GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL}: @example @@ -10198,7 +10371,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{173} +@anchor{cp/intro/tutorial02 full-example}@anchor{177} @subsubsection Full example @@ -10336,7 +10509,7 @@ result: 25 @c . @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{174}@anchor{cp/intro/tutorial03 tutorial-part-3-loops-and-variables}@anchor{175} +@anchor{cp/intro/tutorial03 doc}@anchor{178}@anchor{cp/intro/tutorial03 tutorial-part-3-loops-and-variables}@anchor{179} @subsection Tutorial part 3: Loops and variables @@ -10392,7 +10565,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{165,,gccjit;;context}. +@ref{169,,gccjit;;context}. @example #include @@ -10446,18 +10619,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{176} +@anchor{cp/intro/tutorial03 expressions-lvalues-and-rvalues}@anchor{17a} @subsubsection Expressions: lvalues and rvalues -The base class of expression is the @ref{16e,,gccjit;;rvalue}, +The base class of expression is the @ref{172,,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{167,,gccjit;;type}. +@ref{16b,,gccjit;;type}. -Anothe important class is @ref{177,,gccjit;;lvalue}. -A @ref{177,,gccjit;;lvalue}. is something that can of the @emph{left}-hand +Anothe important class is @ref{17b,,gccjit;;lvalue}. +A @ref{17b,,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: @@ -10466,8 +10639,8 @@ In other words, every assignment can be thought of as: LVALUE = RVALUE; @end example -Note that @ref{177,,gccjit;;lvalue} is a subclass of -@ref{16e,,gccjit;;rvalue}, where in an assignment of the form: +Note that @ref{17b,,gccjit;;lvalue} is a subclass of +@ref{172,,gccjit;;rvalue}, where in an assignment of the form: @example LVALUE_A = LVALUE_B; @@ -10497,7 +10670,7 @@ gccjit::rvalue expr = gccjit::rvalue expr = param_i * param_i; @end example -which is a @ref{16e,,gccjit;;rvalue}, and +which is a @ref{172,,gccjit;;rvalue}, and @end quotation @@ -10505,15 +10678,15 @@ which is a @ref{16e,,gccjit;;rvalue}, and @item the various function parameters: @cite{param_i} and @cite{param_n}, instances of -@ref{178,,gccjit;;param}, which is a subclass of @ref{177,,gccjit;;lvalue} -(and, in turn, of @ref{16e,,gccjit;;rvalue}): +@ref{17c,,gccjit;;param}, which is a subclass of @ref{17b,,gccjit;;lvalue} +(and, in turn, of @ref{172,,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{179,,gccjit;;function;;new_local()}, supplying a type and a name: +@ref{17d,,gccjit;;function;;new_local()}, supplying a type and a name: @example /* Build locals: */ @@ -10521,7 +10694,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{177,,gccjit;;lvalue} - they can be read from +These are instances of @ref{17b,,gccjit;;lvalue} - they can be read from and written to. Note that there is no precanned way to create @emph{and} initialize a variable @@ -10535,7 +10708,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{17a} +@anchor{cp/intro/tutorial03 control-flow}@anchor{17e} @subsubsection Control flow @@ -10558,8 +10731,8 @@ the body of the loop after the loop terminates (@cite{return sum}) @end enumerate -so we create these as @ref{17b,,gccjit;;block} instances within the -@ref{17c,,gccjit;;function}: +so we create these as @ref{17f,,gccjit;;block} instances within the +@ref{180,,gccjit;;function}: @example gccjit::block b_initial = func.new_block ("initial"); @@ -10572,8 +10745,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{17d,,gccjit;;block;;add_assignment()} to add -an assignment statement, and using @ref{17e,,gccjit;;context;;zero()} to get +@ref{181,,gccjit;;block;;add_assignment()} to add +an assignment statement, and using @ref{182,,gccjit;;context;;zero()} to get the constant value @cite{0} for the relevant type for the right-hand side of the assignment: @@ -10594,9 +10767,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{16e,,gccjit;;rvalue}, in this case the comparison of @cite{i} and @cite{n}. +@ref{172,,gccjit;;rvalue}, in this case the comparison of @cite{i} and @cite{n}. -We could build the comparison using @ref{17f,,gccjit;;context;;new_comparison()}: +We could build the comparison using @ref{183,,gccjit;;context;;new_comparison()}: @example gccjit::rvalue guard = @@ -10605,7 +10778,7 @@ gccjit::rvalue guard = @end example and can then use this to add @cite{b_loop_cond}’s sole statement, via -@ref{180,,gccjit;;block;;end_with_conditional()}: +@ref{184,,gccjit;;block;;end_with_conditional()}: @example b_loop_cond.end_with_conditional (guard, @@ -10613,7 +10786,7 @@ b_loop_cond.end_with_conditional (guard, b_loop_body); // on_false @end example -However @ref{16e,,gccjit;;rvalue} has overloaded operators for this, so we +However @ref{172,,gccjit;;rvalue} has overloaded operators for this, so we express the conditional as @example @@ -10633,7 +10806,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{181,,gccjit;;block;;add_assignment_op()} to handle these operations: +@ref{185,,gccjit;;block;;add_assignment_op()} to handle these operations: @example /* sum += i * i */ @@ -10657,7 +10830,7 @@ b_loop_body.add_assignment_op (i, @cartouche @quotation Note For numeric constants other than 0 or 1, we could use -@ref{182,,gccjit;;context;;new_rvalue()}, which has overloads +@ref{186,,gccjit;;context;;new_rvalue()}, which has overloads for both @code{int} and @code{double}. @end quotation @end cartouche @@ -10723,12 +10896,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{183} +@anchor{cp/intro/tutorial03 visualizing-the-control-flow-graph}@anchor{187} @subsubsection Visualizing the control flow graph You can see the control flow graph of a function using -@ref{184,,gccjit;;function;;dump_to_dot()}: +@ref{188,,gccjit;;function;;dump_to_dot()}: @example func.dump_to_dot ("/tmp/sum-of-squares.dot"); @@ -10758,7 +10931,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{185} +@anchor{cp/intro/tutorial03 full-example}@anchor{189} @subsubsection Full example @@ -10936,7 +11109,7 @@ loop_test returned: 285 @c . @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{186}@anchor{cp/intro/tutorial04 tutorial-part-4-adding-jit-compilation-to-a-toy-interpreter}@anchor{187} +@anchor{cp/intro/tutorial04 doc}@anchor{18a}@anchor{cp/intro/tutorial04 tutorial-part-4-adding-jit-compilation-to-a-toy-interpreter}@anchor{18b} @subsection Tutorial part 4: Adding JIT-compilation to a toy interpreter @@ -10958,7 +11131,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{188} +@anchor{cp/intro/tutorial04 our-toy-interpreter}@anchor{18c} @subsubsection Our toy interpreter @@ -11360,7 +11533,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{189} +@anchor{cp/intro/tutorial04 compiling-to-machine-code}@anchor{18d} @subsubsection Compiling to machine code @@ -11430,7 +11603,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{18a} +@anchor{cp/intro/tutorial04 setting-things-up}@anchor{18e} @subsubsection Setting things up @@ -11520,7 +11693,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{18b,,gccjit;;location} instances, one +debugger, so we need to create @ref{18f,,gccjit;;location} instances, one per operation in the source code. These will reference the lines of e.g. @code{factorial.toy}. @@ -11580,7 +11753,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{18c} +@anchor{cp/intro/tutorial04 populating-the-function}@anchor{190} @subsubsection Populating the function @@ -11693,7 +11866,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{18d,,gccjit;;block;;add_comment()} to add descriptive comments +@ref{191,,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}: @@ -11833,14 +12006,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{18e} +@anchor{cp/intro/tutorial04 verifying-the-control-flow-graph}@anchor{192} @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{184,,gccjit;;function;;dump_to_dot()}: +using @ref{188,,gccjit;;function;;dump_to_dot()}: @example fn.dump_to_dot ("/tmp/factorial.dot"); @@ -11862,7 +12035,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{18f} +@anchor{cp/intro/tutorial04 compiling-the-context}@anchor{193} @subsubsection Compiling the context @@ -11913,7 +12086,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{190} +@anchor{cp/intro/tutorial04 single-stepping-through-the-generated-code}@anchor{194} @subsubsection Single-stepping through the generated code @@ -11927,14 +12100,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{191,,gccjit;;context;;new_location()} and using the +calling @ref{195,,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{165,,gccjit;;context} via -@ref{171,,gccjit;;context;;set_bool_option()}: +@ref{169,,gccjit;;context} via +@ref{175,,gccjit;;context;;set_bool_option()}: @example ctxt.set_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO, 1); @@ -11998,14 +12171,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{192} +@anchor{cp/intro/tutorial04 examining-the-generated-code}@anchor{196} @subsubsection Examining the generated code How good is the optimized code? We can turn up optimizations, by calling -@ref{172,,gccjit;;context;;set_int_option()} with +@ref{176,,gccjit;;context;;set_int_option()} with @ref{1f,,GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL}: @example @@ -12173,7 +12346,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{193} +@anchor{cp/intro/tutorial04 putting-it-all-together}@anchor{197} @subsubsection Putting it all together @@ -12204,7 +12377,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{194} +@anchor{cp/intro/tutorial04 behind-the-curtain-how-does-our-code-get-optimized}@anchor{198} @subsubsection Behind the curtain: How does our code get optimized? @@ -12382,7 +12555,7 @@ instr9: @} @end example -Note in the above how all the @ref{17b,,gccjit;;block} instances we +Note in the above how all the @ref{17f,,gccjit;;block} instances we created have been consolidated into just 3 blocks in GCC’s internal representation: @code{initial}, @code{instr4} and @code{instr9}. @@ -12393,7 +12566,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{195} +@anchor{cp/intro/tutorial04 optimizing-away-stack-manipulation}@anchor{199} @subsubsection Optimizing away stack manipulation @@ -12657,7 +12830,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{196} +@anchor{cp/intro/tutorial04 elimination-of-tail-recursion}@anchor{19a} @subsubsection Elimination of tail recursion @@ -12740,7 +12913,7 @@ instr9: @c . @node Topic Reference<2>,,Tutorial<2>,C++ bindings for libgccjit -@anchor{cp/topics/index doc}@anchor{197}@anchor{cp/topics/index topic-reference}@anchor{198} +@anchor{cp/topics/index doc}@anchor{19b}@anchor{cp/topics/index topic-reference}@anchor{19c} @section Topic Reference @@ -12774,22 +12947,22 @@ instr9: @end menu @node Compilation contexts<2>,Objects<2>,,Topic Reference<2> -@anchor{cp/topics/contexts doc}@anchor{199}@anchor{cp/topics/contexts compilation-contexts}@anchor{19a} +@anchor{cp/topics/contexts doc}@anchor{19d}@anchor{cp/topics/contexts compilation-contexts}@anchor{19e} @subsection Compilation contexts @geindex gccjit;;context (C++ class) -@anchor{cp/topics/contexts _CPPv4N6gccjit7contextE}@anchor{165}@anchor{cp/topics/contexts _CPPv3N6gccjit7contextE}@anchor{19b}@anchor{cp/topics/contexts _CPPv2N6gccjit7contextE}@anchor{19c}@anchor{cp/topics/contexts gccjit context}@anchor{19d} +@anchor{cp/topics/contexts _CPPv4N6gccjit7contextE}@anchor{169}@anchor{cp/topics/contexts _CPPv3N6gccjit7contextE}@anchor{19f}@anchor{cp/topics/contexts _CPPv2N6gccjit7contextE}@anchor{1a0}@anchor{cp/topics/contexts gccjit context}@anchor{1a1} @deffn {C++ Class} gccjit::context @end deffn -The top-level of the C++ API is the @ref{165,,gccjit;;context} type. +The top-level of the C++ API is the @ref{169,,gccjit;;context} type. -A @ref{165,,gccjit;;context} instance encapsulates the state of a +A @ref{169,,gccjit;;context} instance encapsulates the state of a compilation. You can set up options on it, and add types, functions and code. -Invoking @ref{16f,,gccjit;;context;;compile()} on it gives you a +Invoking @ref{173,,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 *}. @@ -12804,7 +12977,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{19e} +@anchor{cp/topics/contexts lifetime-management}@anchor{1a2} @subsubsection Lifetime-management @@ -12813,17 +12986,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{166}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7acquireEv}@anchor{19f}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7acquireEv}@anchor{1a0}@anchor{cp/topics/contexts gccjit context acquire}@anchor{1a1} -@deffn {C++ Function} gccjit::@ref{165,,context} gccjit::@ref{165,,context}::acquire () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context7acquireEv}@anchor{16a}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7acquireEv}@anchor{1a3}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7acquireEv}@anchor{1a4}@anchor{cp/topics/contexts gccjit context acquire}@anchor{1a5} +@deffn {C++ Function} gccjit::@ref{169,,context} gccjit::@ref{169,,context}::acquire () -This function acquires a new @ref{165,,gccjit;;context} instance, +This function acquires a new @ref{169,,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{169}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7releaseEv}@anchor{1a2}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7releaseEv}@anchor{1a3}@anchor{cp/topics/contexts gccjit context release}@anchor{1a4} -@deffn {C++ Function} void gccjit::@ref{165,,context}::release () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context7releaseEv}@anchor{16d}@anchor{cp/topics/contexts _CPPv3N6gccjit7context7releaseEv}@anchor{1a6}@anchor{cp/topics/contexts _CPPv2N6gccjit7context7releaseEv}@anchor{1a7}@anchor{cp/topics/contexts gccjit context release}@anchor{1a8} +@deffn {C++ Function} void gccjit::@ref{169,,context}::release () This function releases all resources associated with the given context. Both the context itself and all of its @code{gccjit::object *} @@ -12839,8 +13012,8 @@ ctxt.release (); @end deffn @geindex gccjit;;context;;new_child_context (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context17new_child_contextEv}@anchor{1a5}@anchor{cp/topics/contexts _CPPv3N6gccjit7context17new_child_contextEv}@anchor{1a6}@anchor{cp/topics/contexts _CPPv2N6gccjit7context17new_child_contextEv}@anchor{1a7}@anchor{cp/topics/contexts gccjit context new_child_context}@anchor{1a8} -@deffn {C++ Function} gccjit::@ref{165,,context} gccjit::@ref{165,,context}::new_child_context () +@anchor{cp/topics/contexts _CPPv4N6gccjit7context17new_child_contextEv}@anchor{1a9}@anchor{cp/topics/contexts _CPPv3N6gccjit7context17new_child_contextEv}@anchor{1aa}@anchor{cp/topics/contexts _CPPv2N6gccjit7context17new_child_contextEv}@anchor{1ab}@anchor{cp/topics/contexts gccjit context new_child_context}@anchor{1ac} +@deffn {C++ Function} gccjit::@ref{169,,context} gccjit::@ref{169,,context}::new_child_context () Given an existing JIT context, create a child context. @@ -12871,16 +13044,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{1a9} +@anchor{cp/topics/contexts thread-safety}@anchor{1ad} @subsubsection Thread-safety -Instances of @ref{165,,gccjit;;context} created via -@ref{166,,gccjit;;context;;acquire()} are independent from each other: +Instances of @ref{169,,gccjit;;context} created via +@ref{16a,,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{1a5,,gccjit;;context;;new_child_context()} are +Contexts created via @ref{1a9,,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, @@ -12888,7 +13061,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{1aa} +@anchor{cp/topics/contexts error-handling}@anchor{1ae} @subsubsection Error-handling @@ -12901,11 +13074,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{1ab,,gccjit;;context;;get_first_error()}. +@ref{1af,,gccjit;;context;;get_first_error()}. @geindex gccjit;;context;;get_first_error (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1ab}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1ac}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1ad}@anchor{cp/topics/contexts gccjit context get_first_error__gccjit contextP}@anchor{1ae} -@deffn {C++ Function} const char *gccjit::@ref{165,,context}::get_first_error (gccjit::context *ctxt) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1af}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b0}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15get_first_errorEPN6gccjit7contextE}@anchor{1b1}@anchor{cp/topics/contexts gccjit context get_first_error__gccjit contextP}@anchor{1b2} +@deffn {C++ Function} const char *gccjit::@ref{169,,context}::get_first_error (gccjit::context *ctxt) Returns the first error message that occurred on the context. @@ -12916,18 +13089,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{1af} +@anchor{cp/topics/contexts debugging}@anchor{1b3} @subsubsection Debugging @geindex gccjit;;context;;dump_to_file (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b0}@anchor{cp/topics/contexts _CPPv3N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b1}@anchor{cp/topics/contexts _CPPv2N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b2}@anchor{cp/topics/contexts gccjit context dump_to_file__ssCR i}@anchor{1b3} -@deffn {C++ Function} void gccjit::@ref{165,,context}::dump_to_file (const std::string &path, int update_locations) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b4}@anchor{cp/topics/contexts _CPPv3N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b5}@anchor{cp/topics/contexts _CPPv2N6gccjit7context12dump_to_fileERKNSt6stringEi}@anchor{1b6}@anchor{cp/topics/contexts gccjit context dump_to_file__ssCR i}@anchor{1b7} +@deffn {C++ Function} void gccjit::@ref{169,,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{18b,,gccjit;;location} +If “update_locations” is true, then also set up @ref{18f,,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 @@ -12935,8 +13108,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{1b4}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1b5}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1b6}@anchor{cp/topics/contexts gccjit context dump_reproducer_to_file__gcc_jit_contextP cCP}@anchor{1b7} -@deffn {C++ Function} void gccjit::@ref{165,,context}::dump_reproducer_to_file (gcc_jit_context *ctxt, const char *path) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1b8}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1b9}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23dump_reproducer_to_fileEP15gcc_jit_contextPKc}@anchor{1ba}@anchor{cp/topics/contexts gccjit context dump_reproducer_to_file__gcc_jit_contextP cCP}@anchor{1bb} +@deffn {C++ Function} void gccjit::@ref{169,,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 @@ -12947,7 +13120,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{1b8} +@anchor{cp/topics/contexts options}@anchor{1bc} @subsubsection Options @@ -12960,13 +13133,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{1b9} +@anchor{cp/topics/contexts string-options}@anchor{1bd} @subsubsection String Options @geindex gccjit;;context;;set_str_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1ba}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1bb}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1bc}@anchor{cp/topics/contexts gccjit context set_str_option__gcc_jit_str_option cCP}@anchor{1bd} -@deffn {C++ Function} void gccjit::@ref{165,,context}::set_str_option (enum gcc_jit_str_option, const char *value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1be}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1bf}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_str_optionE18gcc_jit_str_optionPKc}@anchor{1c0}@anchor{cp/topics/contexts gccjit context set_str_option__gcc_jit_str_option cCP}@anchor{1c1} +@deffn {C++ Function} void gccjit::@ref{169,,context}::set_str_option (enum gcc_jit_str_option, const char *value) Set a string option of the context. @@ -12976,13 +13149,13 @@ meaning. @end deffn @node Boolean options<2>,Integer options<2>,String Options<2>,Options<4> -@anchor{cp/topics/contexts boolean-options}@anchor{1be} +@anchor{cp/topics/contexts boolean-options}@anchor{1c2} @subsubsection Boolean options @geindex gccjit;;context;;set_bool_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{171}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1bf}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c0}@anchor{cp/topics/contexts gccjit context set_bool_option__gcc_jit_bool_option i}@anchor{1c1} -@deffn {C++ Function} void gccjit::@ref{165,,context}::set_bool_option (enum gcc_jit_bool_option, int value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{175}@anchor{cp/topics/contexts _CPPv3N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c3}@anchor{cp/topics/contexts _CPPv2N6gccjit7context15set_bool_optionE19gcc_jit_bool_optioni}@anchor{1c4}@anchor{cp/topics/contexts gccjit context set_bool_option__gcc_jit_bool_option i}@anchor{1c5} +@deffn {C++ Function} void gccjit::@ref{169,,context}::set_bool_option (enum gcc_jit_bool_option, int value) Set a boolean option of the context. @@ -12992,8 +13165,8 @@ meaning. @end deffn @geindex gccjit;;context;;set_bool_allow_unreachable_blocks (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c2}@anchor{cp/topics/contexts _CPPv3N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c3}@anchor{cp/topics/contexts _CPPv2N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c4}@anchor{cp/topics/contexts gccjit context set_bool_allow_unreachable_blocks__i}@anchor{1c5} -@deffn {C++ Function} void gccjit::@ref{165,,context}::set_bool_allow_unreachable_blocks (int bool_value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c6}@anchor{cp/topics/contexts _CPPv3N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c7}@anchor{cp/topics/contexts _CPPv2N6gccjit7context33set_bool_allow_unreachable_blocksEi}@anchor{1c8}@anchor{cp/topics/contexts gccjit context set_bool_allow_unreachable_blocks__i}@anchor{1c9} +@deffn {C++ Function} void gccjit::@ref{169,,context}::set_bool_allow_unreachable_blocks (int bool_value) By default, libgccjit will issue an error about unreachable blocks within a function. @@ -13011,8 +13184,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{1c6}@anchor{cp/topics/contexts _CPPv3N6gccjit7context28set_bool_use_external_driverEi}@anchor{1c7}@anchor{cp/topics/contexts _CPPv2N6gccjit7context28set_bool_use_external_driverEi}@anchor{1c8}@anchor{cp/topics/contexts gccjit context set_bool_use_external_driver__i}@anchor{1c9} -@deffn {C++ Function} void gccjit::@ref{165,,context}::set_bool_use_external_driver (int bool_value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context28set_bool_use_external_driverEi}@anchor{1ca}@anchor{cp/topics/contexts _CPPv3N6gccjit7context28set_bool_use_external_driverEi}@anchor{1cb}@anchor{cp/topics/contexts _CPPv2N6gccjit7context28set_bool_use_external_driverEi}@anchor{1cc}@anchor{cp/topics/contexts gccjit context set_bool_use_external_driver__i}@anchor{1cd} +@deffn {C++ Function} void gccjit::@ref{169,,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). @@ -13033,13 +13206,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{1ca} +@anchor{cp/topics/contexts integer-options}@anchor{1ce} @subsubsection Integer options @geindex gccjit;;context;;set_int_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{172}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1cb}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1cc}@anchor{cp/topics/contexts gccjit context set_int_option__gcc_jit_int_option i}@anchor{1cd} -@deffn {C++ Function} void gccjit::@ref{165,,context}::set_int_option (enum gcc_jit_int_option, int value) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{176}@anchor{cp/topics/contexts _CPPv3N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1cf}@anchor{cp/topics/contexts _CPPv2N6gccjit7context14set_int_optionE18gcc_jit_int_optioni}@anchor{1d0}@anchor{cp/topics/contexts gccjit context set_int_option__gcc_jit_int_option i}@anchor{1d1} +@deffn {C++ Function} void gccjit::@ref{169,,context}::set_int_option (enum gcc_jit_int_option, int value) Set an integer option of the context. @@ -13049,13 +13222,13 @@ meaning. @end deffn @node Additional command-line options<2>,,Integer options<2>,Options<4> -@anchor{cp/topics/contexts additional-command-line-options}@anchor{1ce} +@anchor{cp/topics/contexts additional-command-line-options}@anchor{1d2} @subsubsection Additional command-line options @geindex gccjit;;context;;add_command_line_option (C++ function) -@anchor{cp/topics/contexts _CPPv4N6gccjit7context23add_command_line_optionEPKc}@anchor{1cf}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23add_command_line_optionEPKc}@anchor{1d0}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23add_command_line_optionEPKc}@anchor{1d1}@anchor{cp/topics/contexts gccjit context add_command_line_option__cCP}@anchor{1d2} -@deffn {C++ Function} void gccjit::@ref{165,,context}::add_command_line_option (const char *optname) +@anchor{cp/topics/contexts _CPPv4N6gccjit7context23add_command_line_optionEPKc}@anchor{1d3}@anchor{cp/topics/contexts _CPPv3N6gccjit7context23add_command_line_optionEPKc}@anchor{1d4}@anchor{cp/topics/contexts _CPPv2N6gccjit7context23add_command_line_optionEPKc}@anchor{1d5}@anchor{cp/topics/contexts gccjit context add_command_line_option__cCP}@anchor{1d6} +@deffn {C++ Function} void gccjit::@ref{169,,context}::add_command_line_option (const char *optname) Add an arbitrary gcc command-line option to the context for use when compiling. @@ -13089,18 +13262,18 @@ its presence using @c . @node Objects<2>,Types<2>,Compilation contexts<2>,Topic Reference<2> -@anchor{cp/topics/objects doc}@anchor{1d3}@anchor{cp/topics/objects objects}@anchor{1d4} +@anchor{cp/topics/objects doc}@anchor{1d7}@anchor{cp/topics/objects objects}@anchor{1d8} @subsection Objects @geindex gccjit;;object (C++ class) -@anchor{cp/topics/objects _CPPv4N6gccjit6objectE}@anchor{16a}@anchor{cp/topics/objects _CPPv3N6gccjit6objectE}@anchor{1d5}@anchor{cp/topics/objects _CPPv2N6gccjit6objectE}@anchor{1d6}@anchor{cp/topics/objects gccjit object}@anchor{1d7} +@anchor{cp/topics/objects _CPPv4N6gccjit6objectE}@anchor{16e}@anchor{cp/topics/objects _CPPv3N6gccjit6objectE}@anchor{1d9}@anchor{cp/topics/objects _CPPv2N6gccjit6objectE}@anchor{1da}@anchor{cp/topics/objects gccjit object}@anchor{1db} @deffn {C++ Class} gccjit::object @end deffn Almost every entity in the API (with the exception of -@ref{165,,gccjit;;context} and @ref{16,,gcc_jit_result *}) is a -“contextual” object, a @ref{16a,,gccjit;;object}. +@ref{169,,gccjit;;context} and @ref{16,,gcc_jit_result *}) is a +“contextual” object, a @ref{16e,,gccjit;;object}. A JIT object: @@ -13110,7 +13283,7 @@ A JIT object: @itemize * @item -is associated with a @ref{165,,gccjit;;context}. +is associated with a @ref{169,,gccjit;;context}. @item is automatically cleaned up for you when its context is released so @@ -13135,18 +13308,18 @@ The C++ class hierarchy within the @code{gccjit} namespace looks like this: +- case_ @end example -The @ref{16a,,gccjit;;object} base class has the following operations: +The @ref{16e,,gccjit;;object} base class has the following operations: @geindex gccjit;;object;;get_context (C++ function) -@anchor{cp/topics/objects _CPPv4NK6gccjit6object11get_contextEv}@anchor{1d8}@anchor{cp/topics/objects _CPPv3NK6gccjit6object11get_contextEv}@anchor{1d9}@anchor{cp/topics/objects _CPPv2NK6gccjit6object11get_contextEv}@anchor{1da}@anchor{cp/topics/objects gccjit object get_contextC}@anchor{1db} -@deffn {C++ Function} gccjit::@ref{165,,context} gccjit::@ref{16a,,object}::get_context () const +@anchor{cp/topics/objects _CPPv4NK6gccjit6object11get_contextEv}@anchor{1dc}@anchor{cp/topics/objects _CPPv3NK6gccjit6object11get_contextEv}@anchor{1dd}@anchor{cp/topics/objects _CPPv2NK6gccjit6object11get_contextEv}@anchor{1de}@anchor{cp/topics/objects gccjit object get_contextC}@anchor{1df} +@deffn {C++ Function} gccjit::@ref{169,,context} gccjit::@ref{16e,,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{16b}@anchor{cp/topics/objects _CPPv3NK6gccjit6object16get_debug_stringEv}@anchor{1dc}@anchor{cp/topics/objects _CPPv2NK6gccjit6object16get_debug_stringEv}@anchor{1dd}@anchor{cp/topics/objects gccjit object get_debug_stringC}@anchor{1de} -@deffn {C++ Function} std::string gccjit::@ref{16a,,object}::get_debug_string () const +@anchor{cp/topics/objects _CPPv4NK6gccjit6object16get_debug_stringEv}@anchor{16f}@anchor{cp/topics/objects _CPPv3NK6gccjit6object16get_debug_stringEv}@anchor{1e0}@anchor{cp/topics/objects _CPPv2NK6gccjit6object16get_debug_stringEv}@anchor{1e1}@anchor{cp/topics/objects gccjit object get_debug_stringC}@anchor{1e2} +@deffn {C++ Function} std::string gccjit::@ref{16e,,object}::get_debug_string () const Generate a human-readable description for the given object. @@ -13181,16 +13354,16 @@ obj: 4.0 * (float)i @c . @node Types<2>,Expressions<2>,Objects<2>,Topic Reference<2> -@anchor{cp/topics/types doc}@anchor{1df}@anchor{cp/topics/types types}@anchor{1e0} +@anchor{cp/topics/types doc}@anchor{1e3}@anchor{cp/topics/types types}@anchor{1e4} @subsection Types @geindex gccjit;;type (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit4typeE}@anchor{167}@anchor{cp/topics/types _CPPv3N6gccjit4typeE}@anchor{1e1}@anchor{cp/topics/types _CPPv2N6gccjit4typeE}@anchor{1e2}@anchor{cp/topics/types gccjit type}@anchor{1e3} +@anchor{cp/topics/types _CPPv4N6gccjit4typeE}@anchor{16b}@anchor{cp/topics/types _CPPv3N6gccjit4typeE}@anchor{1e5}@anchor{cp/topics/types _CPPv2N6gccjit4typeE}@anchor{1e6}@anchor{cp/topics/types gccjit type}@anchor{1e7} @deffn {C++ Class} gccjit::type gccjit::type represents a type within the library. It is a subclass -of @ref{16a,,gccjit;;object}. +of @ref{16e,,gccjit;;object}. @end deffn Types can be created in several ways: @@ -13200,7 +13373,7 @@ Types can be created in several ways: @item fundamental types can be accessed using -@ref{168,,gccjit;;context;;get_type()}: +@ref{16c,,gccjit;;context;;get_type()}: @example gccjit::type int_type = ctxt.get_type (GCC_JIT_TYPE_INT); @@ -13216,7 +13389,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{1e4,,gccjit;;type;;get_pointer()} and @ref{1e5,,gccjit;;type;;get_const()}: +@ref{1e8,,gccjit;;type;;get_pointer()} and @ref{1e9,,gccjit;;type;;get_const()}: @example gccjit::type const_int_star = int_type.get_const ().get_pointer (); @@ -13236,28 +13409,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{1e6} +@anchor{cp/topics/types standard-types}@anchor{1ea} @subsubsection Standard types @geindex gccjit;;context;;get_type (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit7context8get_typeE13gcc_jit_types}@anchor{168}@anchor{cp/topics/types _CPPv3N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1e7}@anchor{cp/topics/types _CPPv2N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1e8}@anchor{cp/topics/types gccjit context get_type__gcc_jit_types}@anchor{1e9} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{165,,context}::get_type (enum gcc_jit_types) +@anchor{cp/topics/types _CPPv4N6gccjit7context8get_typeE13gcc_jit_types}@anchor{16c}@anchor{cp/topics/types _CPPv3N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1eb}@anchor{cp/topics/types _CPPv2N6gccjit7context8get_typeE13gcc_jit_types}@anchor{1ec}@anchor{cp/topics/types gccjit context get_type__gcc_jit_types}@anchor{1ed} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{169,,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{1ea}@anchor{cp/topics/types _CPPv3N6gccjit7context12get_int_typeE6size_ti}@anchor{1eb}@anchor{cp/topics/types _CPPv2N6gccjit7context12get_int_typeE6size_ti}@anchor{1ec}@anchor{cp/topics/types gccjit context get_int_type__s i}@anchor{1ed} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{165,,context}::get_int_type (size_t num_bytes, int is_signed) +@anchor{cp/topics/types _CPPv4N6gccjit7context12get_int_typeE6size_ti}@anchor{1ee}@anchor{cp/topics/types _CPPv3N6gccjit7context12get_int_typeE6size_ti}@anchor{1ef}@anchor{cp/topics/types _CPPv2N6gccjit7context12get_int_typeE6size_ti}@anchor{1f0}@anchor{cp/topics/types gccjit context get_int_type__s i}@anchor{1f1} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{169,,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 (C++ function) -@anchor{cp/topics/types _CPPv4IEN6gccjit7context12get_int_typeI1TEEN6gccjit4typeEv}@anchor{1ee}@anchor{cp/topics/types _CPPv3IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1ef}@anchor{cp/topics/types _CPPv2IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f0} -@deffn {C++ Function} template<>gccjit::@ref{167,,type} gccjit::@ref{165,,context}::get_int_type () +@anchor{cp/topics/types _CPPv4IEN6gccjit7context12get_int_typeI1TEEN6gccjit4typeEv}@anchor{1f2}@anchor{cp/topics/types _CPPv3IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f3}@anchor{cp/topics/types _CPPv2IEN6gccjit7context12get_int_typeI1TEEv}@anchor{1f4} +@deffn {C++ Function} template<>gccjit::@ref{16b,,type} gccjit::@ref{169,,context}::get_int_type () Access the given integer type. For example, you could map the @code{unsigned short} type into a gccjit::type via: @@ -13268,34 +13441,34 @@ gccjit::type t = ctxt.get_int_type (); @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{1f1} +@anchor{cp/topics/types pointers-const-and-volatile}@anchor{1f5} @subsubsection Pointers, @cite{const}, and @cite{volatile} @geindex gccjit;;type;;get_pointer (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type11get_pointerEv}@anchor{1e4}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_pointerEv}@anchor{1f2}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_pointerEv}@anchor{1f3}@anchor{cp/topics/types gccjit type get_pointer}@anchor{1f4} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{167,,type}::get_pointer () +@anchor{cp/topics/types _CPPv4N6gccjit4type11get_pointerEv}@anchor{1e8}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_pointerEv}@anchor{1f6}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_pointerEv}@anchor{1f7}@anchor{cp/topics/types gccjit type get_pointer}@anchor{1f8} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{16b,,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{1e5}@anchor{cp/topics/types _CPPv3N6gccjit4type9get_constEv}@anchor{1f5}@anchor{cp/topics/types _CPPv2N6gccjit4type9get_constEv}@anchor{1f6}@anchor{cp/topics/types gccjit type get_const}@anchor{1f7} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{167,,type}::get_const () +@anchor{cp/topics/types _CPPv4N6gccjit4type9get_constEv}@anchor{1e9}@anchor{cp/topics/types _CPPv3N6gccjit4type9get_constEv}@anchor{1f9}@anchor{cp/topics/types _CPPv2N6gccjit4type9get_constEv}@anchor{1fa}@anchor{cp/topics/types gccjit type get_const}@anchor{1fb} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{16b,,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{1f8}@anchor{cp/topics/types _CPPv3N6gccjit4type12get_volatileEv}@anchor{1f9}@anchor{cp/topics/types _CPPv2N6gccjit4type12get_volatileEv}@anchor{1fa}@anchor{cp/topics/types gccjit type get_volatile}@anchor{1fb} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{167,,type}::get_volatile () +@anchor{cp/topics/types _CPPv4N6gccjit4type12get_volatileEv}@anchor{1fc}@anchor{cp/topics/types _CPPv3N6gccjit4type12get_volatileEv}@anchor{1fd}@anchor{cp/topics/types _CPPv2N6gccjit4type12get_volatileEv}@anchor{1fe}@anchor{cp/topics/types gccjit type get_volatile}@anchor{1ff} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{16b,,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{1fc}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_alignedE6size_t}@anchor{1fd}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_alignedE6size_t}@anchor{1fe}@anchor{cp/topics/types gccjit type get_aligned__s}@anchor{1ff} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{167,,type}::get_aligned (size_t alignment_in_bytes) +@anchor{cp/topics/types _CPPv4N6gccjit4type11get_alignedE6size_t}@anchor{200}@anchor{cp/topics/types _CPPv3N6gccjit4type11get_alignedE6size_t}@anchor{201}@anchor{cp/topics/types _CPPv2N6gccjit4type11get_alignedE6size_t}@anchor{202}@anchor{cp/topics/types gccjit type get_aligned__s}@anchor{203} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{16b,,type}::get_aligned (size_t alignment_in_bytes) Given type “T”, get type: @@ -13307,21 +13480,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{200}@anchor{cp/topics/types _CPPv3N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{201}@anchor{cp/topics/types _CPPv2N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{202}@anchor{cp/topics/types gccjit context new_array_type__gccjit type i gccjit location}@anchor{203} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{165,,context}::new_array_type (gccjit::type element_type, int num_elements, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{204}@anchor{cp/topics/types _CPPv3N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{205}@anchor{cp/topics/types _CPPv2N6gccjit7context14new_array_typeEN6gccjit4typeEiN6gccjit8locationE}@anchor{206}@anchor{cp/topics/types gccjit context new_array_type__gccjit type i gccjit location}@anchor{207} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{169,,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{204} +@anchor{cp/topics/types vector-types}@anchor{208} @subsubsection Vector types @geindex gccjit;;type;;get_vector (C++ function) -@anchor{cp/topics/types _CPPv4N6gccjit4type10get_vectorE6size_t}@anchor{205}@anchor{cp/topics/types _CPPv3N6gccjit4type10get_vectorE6size_t}@anchor{206}@anchor{cp/topics/types _CPPv2N6gccjit4type10get_vectorE6size_t}@anchor{207}@anchor{cp/topics/types gccjit type get_vector__s}@anchor{208} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{167,,type}::get_vector (size_t num_units) +@anchor{cp/topics/types _CPPv4N6gccjit4type10get_vectorE6size_t}@anchor{209}@anchor{cp/topics/types _CPPv3N6gccjit4type10get_vectorE6size_t}@anchor{20a}@anchor{cp/topics/types _CPPv2N6gccjit4type10get_vectorE6size_t}@anchor{20b}@anchor{cp/topics/types gccjit type get_vector__s}@anchor{20c} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{16b,,type}::get_vector (size_t num_units) Given type “T”, get type: @@ -13333,31 +13506,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{209} +@anchor{cp/topics/types structures-and-unions}@anchor{20d} @subsubsection Structures and unions @geindex gccjit;;struct_ (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit7struct_E}@anchor{20a}@anchor{cp/topics/types _CPPv3N6gccjit7struct_E}@anchor{20b}@anchor{cp/topics/types _CPPv2N6gccjit7struct_E}@anchor{20c}@anchor{cp/topics/types gccjit struct_}@anchor{20d} +@anchor{cp/topics/types _CPPv4N6gccjit7struct_E}@anchor{20e}@anchor{cp/topics/types _CPPv3N6gccjit7struct_E}@anchor{20f}@anchor{cp/topics/types _CPPv2N6gccjit7struct_E}@anchor{210}@anchor{cp/topics/types gccjit struct_}@anchor{211} @deffn {C++ Class} gccjit::struct_ @end deffn A compound type analagous to a C @cite{struct}. -@ref{20a,,gccjit;;struct_} is a subclass of @ref{167,,gccjit;;type} (and thus -of @ref{16a,,gccjit;;object} in turn). +@ref{20e,,gccjit;;struct_} is a subclass of @ref{16b,,gccjit;;type} (and thus +of @ref{16e,,gccjit;;object} in turn). @geindex gccjit;;field (C++ class) -@anchor{cp/topics/types _CPPv4N6gccjit5fieldE}@anchor{20e}@anchor{cp/topics/types _CPPv3N6gccjit5fieldE}@anchor{20f}@anchor{cp/topics/types _CPPv2N6gccjit5fieldE}@anchor{210}@anchor{cp/topics/types gccjit field}@anchor{211} +@anchor{cp/topics/types _CPPv4N6gccjit5fieldE}@anchor{212}@anchor{cp/topics/types _CPPv3N6gccjit5fieldE}@anchor{213}@anchor{cp/topics/types _CPPv2N6gccjit5fieldE}@anchor{214}@anchor{cp/topics/types gccjit field}@anchor{215} @deffn {C++ Class} gccjit::field @end deffn -A field within a @ref{20a,,gccjit;;struct_}. +A field within a @ref{20e,,gccjit;;struct_}. -@ref{20e,,gccjit;;field} is a subclass of @ref{16a,,gccjit;;object}. +@ref{212,,gccjit;;field} is a subclass of @ref{16e,,gccjit;;object}. -You can model C @cite{struct} types by creating @ref{20a,,gccjit;;struct_} and -@ref{20e,,gccjit;;field} instances, in either order: +You can model C @cite{struct} types by creating @ref{20e,,gccjit;;struct_} and +@ref{212,,gccjit;;field} instances, in either order: @itemize * @@ -13405,15 +13578,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{212}@anchor{cp/topics/types _CPPv3N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{213}@anchor{cp/topics/types _CPPv2N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{214}@anchor{cp/topics/types gccjit context new_field__gccjit type cCP gccjit location}@anchor{215} -@deffn {C++ Function} gccjit::@ref{20e,,field} gccjit::@ref{165,,context}::new_field (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{216}@anchor{cp/topics/types _CPPv3N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{217}@anchor{cp/topics/types _CPPv2N6gccjit7context9new_fieldEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{218}@anchor{cp/topics/types gccjit context new_field__gccjit type cCP gccjit location}@anchor{219} +@deffn {C++ Function} gccjit::@ref{212,,field} gccjit::@ref{169,,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{216}@anchor{cp/topics/types _CPPv3N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{217}@anchor{cp/topics/types _CPPv2N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{218}@anchor{cp/topics/types gccjit context new_struct_type__ssCR std vector field R gccjit location}@anchor{219} -@deffn {C++ Function} gccjit::@ref{20a,,struct_} gccjit::@ref{165,,context}::new_struct_type (const std::string &name, std::vector &fields, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21a}@anchor{cp/topics/types _CPPv3N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21b}@anchor{cp/topics/types _CPPv2N6gccjit7context15new_struct_typeERKNSt6stringERNSt6vectorI5fieldEEN6gccjit8locationE}@anchor{21c}@anchor{cp/topics/types gccjit context new_struct_type__ssCR std vector field R gccjit location}@anchor{21d} +@deffn {C++ Function} gccjit::@ref{20e,,struct_} gccjit::@ref{169,,context}::new_struct_type (const std::string &name, std::vector &fields, gccjit::location loc) @quotation @@ -13422,8 +13595,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{21a}@anchor{cp/topics/types _CPPv3N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{21b}@anchor{cp/topics/types _CPPv2N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{21c}@anchor{cp/topics/types gccjit context new_opaque_struct__ssCR gccjit location}@anchor{21d} -@deffn {C++ Function} gccjit::@ref{20a,,struct_} gccjit::@ref{165,,context}::new_opaque_struct (const std::string &name, gccjit::location loc) +@anchor{cp/topics/types _CPPv4N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{21e}@anchor{cp/topics/types _CPPv3N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{21f}@anchor{cp/topics/types _CPPv2N6gccjit7context17new_opaque_structERKNSt6stringEN6gccjit8locationE}@anchor{220}@anchor{cp/topics/types gccjit context new_opaque_struct__ssCR gccjit location}@anchor{221} +@deffn {C++ Function} gccjit::@ref{20e,,struct_} gccjit::@ref{169,,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 @@ -13449,7 +13622,7 @@ size of the struct is not known), or later specified using @c . @node Expressions<2>,Creating and using functions<2>,Types<2>,Topic Reference<2> -@anchor{cp/topics/expressions doc}@anchor{21e}@anchor{cp/topics/expressions expressions}@anchor{21f} +@anchor{cp/topics/expressions doc}@anchor{222}@anchor{cp/topics/expressions expressions}@anchor{223} @subsection Expressions @@ -13461,17 +13634,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{220} +@anchor{cp/topics/expressions rvalues}@anchor{224} @subsubsection Rvalues @geindex gccjit;;rvalue (C++ class) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalueE}@anchor{16e}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalueE}@anchor{221}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalueE}@anchor{222}@anchor{cp/topics/expressions gccjit rvalue}@anchor{223} +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalueE}@anchor{172}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalueE}@anchor{225}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalueE}@anchor{226}@anchor{cp/topics/expressions gccjit rvalue}@anchor{227} @deffn {C++ Class} gccjit::rvalue @end deffn -A @ref{16e,,gccjit;;rvalue} is an expression that can be computed. It is a -subclass of @ref{16a,,gccjit;;object}, and is a thin wrapper around +A @ref{172,,gccjit;;rvalue} is an expression that can be computed. It is a +subclass of @ref{16e,,gccjit;;object}, and is a thin wrapper around @ref{13,,gcc_jit_rvalue *} from the C API. It can be simple, e.g.: @@ -13517,8 +13690,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{224}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue8get_typeEv}@anchor{225}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue8get_typeEv}@anchor{226}@anchor{cp/topics/expressions gccjit rvalue get_type}@anchor{227} -@deffn {C++ Function} gccjit::@ref{167,,type} gccjit::@ref{16e,,rvalue}::get_type () +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue8get_typeEv}@anchor{228}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue8get_typeEv}@anchor{229}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue8get_typeEv}@anchor{22a}@anchor{cp/topics/expressions gccjit rvalue get_type}@anchor{22b} +@deffn {C++ Function} gccjit::@ref{16b,,type} gccjit::@ref{172,,rvalue}::get_type () Get the type of this rvalue. @end deffn @@ -13536,29 +13709,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{228} +@anchor{cp/topics/expressions simple-expressions}@anchor{22c} @subsubsection Simple expressions @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{182}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{229}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{22a}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type iC}@anchor{22b} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (gccjit::type numeric_type, int value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{186}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{22d}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEi}@anchor{22e}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type iC}@anchor{22f} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{22c}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{22d}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{22e}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type lC}@anchor{22f} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (gccjit::type numeric_type, long value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{230}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{231}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEl}@anchor{232}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type lC}@anchor{233} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{17e}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{230}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{231}@anchor{cp/topics/expressions gccjit context zero__gccjit typeC}@anchor{232} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::zero (gccjit::type numeric_type) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{182}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{234}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context4zeroEN6gccjit4typeE}@anchor{235}@anchor{cp/topics/expressions gccjit context zero__gccjit typeC}@anchor{236} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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: @@ -13569,8 +13742,8 @@ ctxt.new_rvalue (numeric_type, 0) @end deffn @geindex gccjit;;context;;one (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context3oneEN6gccjit4typeE}@anchor{233}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context3oneEN6gccjit4typeE}@anchor{234}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context3oneEN6gccjit4typeE}@anchor{235}@anchor{cp/topics/expressions gccjit context one__gccjit typeC}@anchor{236} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::one (gccjit::type numeric_type) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context3oneEN6gccjit4typeE}@anchor{237}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context3oneEN6gccjit4typeE}@anchor{238}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context3oneEN6gccjit4typeE}@anchor{239}@anchor{cp/topics/expressions gccjit context one__gccjit typeC}@anchor{23a} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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: @@ -13581,36 +13754,36 @@ ctxt.new_rvalue (numeric_type, 1) @end deffn @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{237}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{238}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{239}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type doubleC}@anchor{23a} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (gccjit::type numeric_type, double value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{23b}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{23c}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEd}@anchor{23d}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type doubleC}@anchor{23e} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{23b}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{23c}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{23d}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type voidPC}@anchor{23e} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (gccjit::type pointer_type, void *value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{23f}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{240}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeEPv}@anchor{241}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type voidPC}@anchor{242} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{23f}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{240}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{241}@anchor{cp/topics/expressions gccjit context new_rvalue__ssCRC}@anchor{242} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (const std::string &value) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{243}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{244}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueERKNSt6stringE}@anchor{245}@anchor{cp/topics/expressions gccjit context new_rvalue__ssCRC}@anchor{246} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{243} +@anchor{cp/topics/expressions vector-expressions}@anchor{247} @subsubsection Vector expressions @geindex gccjit;;context;;new_rvalue (C++ function) -@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{244}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{245}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{246}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type std vector gccjit rvalue C}@anchor{247} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_rvalue (gccjit::type vector_type, std::vector elements) const +@anchor{cp/topics/expressions _CPPv4NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{248}@anchor{cp/topics/expressions _CPPv3NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{249}@anchor{cp/topics/expressions _CPPv2NK6gccjit7context10new_rvalueEN6gccjit4typeENSt6vectorIN6gccjit6rvalueEEE}@anchor{24a}@anchor{cp/topics/expressions gccjit context new_rvalue__gccjit type std vector gccjit rvalue C}@anchor{24b} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,context}::new_rvalue (gccjit::type vector_type, std::vector elements) const Given a vector type, and a vector of scalar rvalue elements, generate a vector rvalue. @@ -13619,20 +13792,20 @@ 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{248} +@anchor{cp/topics/expressions unary-operations}@anchor{24c} @subsubsection Unary Operations @geindex gccjit;;context;;new_unary_op (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{249}@anchor{cp/topics/expressions _CPPv3N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24b}@anchor{cp/topics/expressions gccjit context new_unary_op__gcc_jit_unary_op gccjit type gccjit rvalue gccjit location}@anchor{24c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{24d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context12new_unary_opE16gcc_jit_unary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24f}@anchor{cp/topics/expressions gccjit context new_unary_op__gcc_jit_unary_op gccjit type gccjit rvalue gccjit location}@anchor{250} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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. Parameter @code{loc} is optional. This is a thin wrapper around the C API’s -@ref{ba,,gcc_jit_context_new_unary_op()} and the available unary +@ref{bd,,gcc_jit_context_new_unary_op()} and the available unary operations are documented there. @end deffn @@ -13640,8 +13813,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{24d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{24f}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit location}@anchor{250} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{251}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{252}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{253}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit location}@anchor{254} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) Negate an arithmetic value; for example: @@ -13657,8 +13830,8 @@ builds the equivalent of this C expression: @end deffn @geindex new_bitwise_negate (C++ function) -@anchor{cp/topics/expressions _CPPv418new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{251}@anchor{cp/topics/expressions _CPPv318new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{252}@anchor{cp/topics/expressions _CPPv218new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{253}@anchor{cp/topics/expressions new_bitwise_negate__gccjit type gccjit rvalue gccjit location}@anchor{254} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} new_bitwise_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv418new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{255}@anchor{cp/topics/expressions _CPPv318new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{256}@anchor{cp/topics/expressions _CPPv218new_bitwise_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{257}@anchor{cp/topics/expressions new_bitwise_negate__gccjit type gccjit rvalue gccjit location}@anchor{258} +@deffn {C++ Function} gccjit::@ref{172,,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: @@ -13674,8 +13847,8 @@ builds the equivalent of this C expression: @end deffn @geindex new_logical_negate (C++ function) -@anchor{cp/topics/expressions _CPPv418new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{255}@anchor{cp/topics/expressions _CPPv318new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{256}@anchor{cp/topics/expressions _CPPv218new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{257}@anchor{cp/topics/expressions new_logical_negate__gccjit type gccjit rvalue gccjit location}@anchor{258} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} new_logical_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv418new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{259}@anchor{cp/topics/expressions _CPPv318new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25a}@anchor{cp/topics/expressions _CPPv218new_logical_negateN6gccjit4typeEN6gccjit6rvalueEN6gccjit8locationE}@anchor{25b}@anchor{cp/topics/expressions new_logical_negate__gccjit type gccjit rvalue gccjit location}@anchor{25c} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} new_logical_negate (gccjit::type result_type, gccjit::rvalue a, gccjit::location loc) Logical negation of an arithmetic or pointer value; for example: @@ -13693,8 +13866,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{259}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueE}@anchor{25a}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueE}@anchor{25b}@anchor{cp/topics/expressions sub-operator__gccjit rvalue}@anchor{25c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator@w{-} (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueE}@anchor{25d}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueE}@anchor{25e}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueE}@anchor{25f}@anchor{cp/topics/expressions sub-operator__gccjit rvalue}@anchor{260} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator@w{-} (gccjit::rvalue a) @example gccjit::rvalue negpi = -pi; @@ -13702,8 +13875,8 @@ gccjit::rvalue negpi = -pi; @end deffn @geindex operator~ (C++ function) -@anchor{cp/topics/expressions _CPPv4coN6gccjit6rvalueE}@anchor{25d}@anchor{cp/topics/expressions _CPPv3coN6gccjit6rvalueE}@anchor{25e}@anchor{cp/topics/expressions _CPPv2coN6gccjit6rvalueE}@anchor{25f}@anchor{cp/topics/expressions inv-operator__gccjit rvalue}@anchor{260} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator~ (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4coN6gccjit6rvalueE}@anchor{261}@anchor{cp/topics/expressions _CPPv3coN6gccjit6rvalueE}@anchor{262}@anchor{cp/topics/expressions _CPPv2coN6gccjit6rvalueE}@anchor{263}@anchor{cp/topics/expressions inv-operator__gccjit rvalue}@anchor{264} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator~ (gccjit::rvalue a) @example gccjit::rvalue mask = ~a; @@ -13711,8 +13884,8 @@ gccjit::rvalue mask = ~a; @end deffn @geindex operator! (C++ function) -@anchor{cp/topics/expressions _CPPv4ntN6gccjit6rvalueE}@anchor{261}@anchor{cp/topics/expressions _CPPv3ntN6gccjit6rvalueE}@anchor{262}@anchor{cp/topics/expressions _CPPv2ntN6gccjit6rvalueE}@anchor{263}@anchor{cp/topics/expressions not-operator__gccjit rvalue}@anchor{264} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator! (gccjit::rvalue a) +@anchor{cp/topics/expressions _CPPv4ntN6gccjit6rvalueE}@anchor{265}@anchor{cp/topics/expressions _CPPv3ntN6gccjit6rvalueE}@anchor{266}@anchor{cp/topics/expressions _CPPv2ntN6gccjit6rvalueE}@anchor{267}@anchor{cp/topics/expressions not-operator__gccjit rvalue}@anchor{268} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator! (gccjit::rvalue a) @example gccjit::rvalue guard = !cond; @@ -13720,13 +13893,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{265} +@anchor{cp/topics/expressions binary-operations}@anchor{269} @subsubsection Binary Operations @geindex gccjit;;context;;new_binary_op (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{16d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{266}@anchor{cp/topics/expressions _CPPv2N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{267}@anchor{cp/topics/expressions gccjit context new_binary_op__gcc_jit_binary_op gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{268} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{171}@anchor{cp/topics/expressions _CPPv3N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context13new_binary_opE17gcc_jit_binary_opN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26b}@anchor{cp/topics/expressions gccjit context new_binary_op__gcc_jit_binary_op gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{26c} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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. @@ -13741,60 +13914,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{269}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26b}@anchor{cp/topics/expressions gccjit context new_plus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{26c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_plus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_plusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26f}@anchor{cp/topics/expressions gccjit context new_plus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{270} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{26d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{26f}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{270} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_minus (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{271}@anchor{cp/topics/expressions _CPPv3N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{272}@anchor{cp/topics/expressions _CPPv2N6gccjit7context9new_minusEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{273}@anchor{cp/topics/expressions gccjit context new_minus__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{274} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{271}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{272}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{273}@anchor{cp/topics/expressions gccjit context new_mult__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{274} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_mult (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{275}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{276}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_multEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{277}@anchor{cp/topics/expressions gccjit context new_mult__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{278} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{275}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{276}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{277}@anchor{cp/topics/expressions gccjit context new_divide__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{278} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_divide (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{279}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_divideEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27b}@anchor{cp/topics/expressions gccjit context new_divide__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{27c} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{279}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27b}@anchor{cp/topics/expressions gccjit context new_modulo__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{27c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_modulo (gccjit::type result_type, gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_moduloEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27f}@anchor{cp/topics/expressions gccjit context new_modulo__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{280} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{27d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{27f}@anchor{cp/topics/expressions gccjit context new_bitwise_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{280} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{281}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{282}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{283}@anchor{cp/topics/expressions gccjit context new_bitwise_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{284} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{281}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{282}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{283}@anchor{cp/topics/expressions gccjit context new_bitwise_xor__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{284} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{285}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{286}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_bitwise_xorEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{287}@anchor{cp/topics/expressions gccjit context new_bitwise_xor__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{288} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{285}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{286}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{287}@anchor{cp/topics/expressions gccjit context new_bitwise_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{288} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{289}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_bitwise_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28b}@anchor{cp/topics/expressions gccjit context new_bitwise_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{28c} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{289}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28a}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28b}@anchor{cp/topics/expressions gccjit context new_logical_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{28c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{28d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context15new_logical_andEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28f}@anchor{cp/topics/expressions gccjit context new_logical_and__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{290} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{28d}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28e}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{28f}@anchor{cp/topics/expressions gccjit context new_logical_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{290} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{291}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{292}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_logical_orEN6gccjit4typeEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{293}@anchor{cp/topics/expressions gccjit context new_logical_or__gccjit type gccjit rvalue gccjit rvalue gccjit location}@anchor{294} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{291}@anchor{cp/topics/expressions _CPPv3plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{292}@anchor{cp/topics/expressions _CPPv2plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{293}@anchor{cp/topics/expressions add-operator__gccjit rvalue gccjit rvalue}@anchor{294} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator+ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{295}@anchor{cp/topics/expressions _CPPv3plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{296}@anchor{cp/topics/expressions _CPPv2plN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{297}@anchor{cp/topics/expressions add-operator__gccjit rvalue gccjit rvalue}@anchor{298} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator+ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue sum = a + b; @@ -13802,8 +13975,8 @@ gccjit::rvalue sum = a + b; @end deffn @geindex operator- (C++ function) -@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{295}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{296}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{297}@anchor{cp/topics/expressions sub-operator__gccjit rvalue gccjit rvalue}@anchor{298} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator@w{-} (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{299}@anchor{cp/topics/expressions _CPPv3miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29a}@anchor{cp/topics/expressions _CPPv2miN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29b}@anchor{cp/topics/expressions sub-operator__gccjit rvalue gccjit rvalue}@anchor{29c} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator@w{-} (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue diff = a - b; @@ -13811,8 +13984,8 @@ gccjit::rvalue diff = a - b; @end deffn @geindex operator* (C++ function) -@anchor{cp/topics/expressions _CPPv4mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{299}@anchor{cp/topics/expressions _CPPv3mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29a}@anchor{cp/topics/expressions _CPPv2mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29b}@anchor{cp/topics/expressions mul-operator__gccjit rvalue gccjit rvalue}@anchor{29c} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator* (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29d}@anchor{cp/topics/expressions _CPPv3mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29e}@anchor{cp/topics/expressions _CPPv2mlN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29f}@anchor{cp/topics/expressions mul-operator__gccjit rvalue gccjit rvalue}@anchor{2a0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator* (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue prod = a * b; @@ -13820,8 +13993,8 @@ gccjit::rvalue prod = a * b; @end deffn @geindex operator/ (C++ function) -@anchor{cp/topics/expressions _CPPv4dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29d}@anchor{cp/topics/expressions _CPPv3dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29e}@anchor{cp/topics/expressions _CPPv2dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{29f}@anchor{cp/topics/expressions div-operator__gccjit rvalue gccjit rvalue}@anchor{2a0} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator/ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a1}@anchor{cp/topics/expressions _CPPv3dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a2}@anchor{cp/topics/expressions _CPPv2dvN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a3}@anchor{cp/topics/expressions div-operator__gccjit rvalue gccjit rvalue}@anchor{2a4} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator/ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue result = a / b; @@ -13829,8 +14002,8 @@ gccjit::rvalue result = a / b; @end deffn @geindex operator% (C++ function) -@anchor{cp/topics/expressions _CPPv4rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a1}@anchor{cp/topics/expressions _CPPv3rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a2}@anchor{cp/topics/expressions _CPPv2rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a3}@anchor{cp/topics/expressions mod-operator__gccjit rvalue gccjit rvalue}@anchor{2a4} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator% (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a5}@anchor{cp/topics/expressions _CPPv3rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a6}@anchor{cp/topics/expressions _CPPv2rmN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a7}@anchor{cp/topics/expressions mod-operator__gccjit rvalue gccjit rvalue}@anchor{2a8} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator% (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue mod = a % b; @@ -13838,8 +14011,8 @@ gccjit::rvalue mod = a % b; @end deffn @geindex operator& (C++ function) -@anchor{cp/topics/expressions _CPPv4anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a5}@anchor{cp/topics/expressions _CPPv3anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a6}@anchor{cp/topics/expressions _CPPv2anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a7}@anchor{cp/topics/expressions and-operator__gccjit rvalue gccjit rvalue}@anchor{2a8} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator& (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a9}@anchor{cp/topics/expressions _CPPv3anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2aa}@anchor{cp/topics/expressions _CPPv2anN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ab}@anchor{cp/topics/expressions and-operator__gccjit rvalue gccjit rvalue}@anchor{2ac} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator& (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a & b; @@ -13847,8 +14020,8 @@ gccjit::rvalue x = a & b; @end deffn @geindex operator^ (C++ function) -@anchor{cp/topics/expressions _CPPv4eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2a9}@anchor{cp/topics/expressions _CPPv3eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2aa}@anchor{cp/topics/expressions _CPPv2eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ab}@anchor{cp/topics/expressions xor-operator__gccjit rvalue gccjit rvalue}@anchor{2ac} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator^ (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ad}@anchor{cp/topics/expressions _CPPv3eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ae}@anchor{cp/topics/expressions _CPPv2eoN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2af}@anchor{cp/topics/expressions xor-operator__gccjit rvalue gccjit rvalue}@anchor{2b0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator^ (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a ^ b; @@ -13856,8 +14029,8 @@ gccjit::rvalue x = a ^ b; @end deffn @geindex operator| (C++ function) -@anchor{cp/topics/expressions _CPPv4orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ad}@anchor{cp/topics/expressions _CPPv3orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ae}@anchor{cp/topics/expressions _CPPv2orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2af}@anchor{cp/topics/expressions or-operator__gccjit rvalue gccjit rvalue}@anchor{2b0} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator| (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b1}@anchor{cp/topics/expressions _CPPv3orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b2}@anchor{cp/topics/expressions _CPPv2orN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b3}@anchor{cp/topics/expressions or-operator__gccjit rvalue gccjit rvalue}@anchor{2b4} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator| (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue x = a | b; @@ -13865,8 +14038,8 @@ gccjit::rvalue x = a | b; @end deffn @geindex operator&& (C++ function) -@anchor{cp/topics/expressions _CPPv4aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b1}@anchor{cp/topics/expressions _CPPv3aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b2}@anchor{cp/topics/expressions _CPPv2aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b3}@anchor{cp/topics/expressions sand-operator__gccjit rvalue gccjit rvalue}@anchor{2b4} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator&& (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b5}@anchor{cp/topics/expressions _CPPv3aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b6}@anchor{cp/topics/expressions _CPPv2aaN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b7}@anchor{cp/topics/expressions sand-operator__gccjit rvalue gccjit rvalue}@anchor{2b8} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator&& (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = a && b; @@ -13874,8 +14047,8 @@ gccjit::rvalue cond = a && b; @end deffn @geindex operator|| (C++ function) -@anchor{cp/topics/expressions _CPPv4ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b5}@anchor{cp/topics/expressions _CPPv3ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b6}@anchor{cp/topics/expressions _CPPv2ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b7}@anchor{cp/topics/expressions sor-operator__gccjit rvalue gccjit rvalue}@anchor{2b8} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator|| (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2b9}@anchor{cp/topics/expressions _CPPv3ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ba}@anchor{cp/topics/expressions _CPPv2ooN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2bb}@anchor{cp/topics/expressions sor-operator__gccjit rvalue gccjit rvalue}@anchor{2bc} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator|| (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = a || b; @@ -13893,13 +14066,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{2b9} +@anchor{cp/topics/expressions comparisons}@anchor{2bd} @subsubsection Comparisons @geindex gccjit;;context;;new_comparison (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{17f}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ba}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2bb}@anchor{cp/topics/expressions gccjit context new_comparison__gcc_jit_comparison gccjit rvalue gccjit rvalue gccjit location}@anchor{2bc} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,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{183}@anchor{cp/topics/expressions _CPPv3N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2be}@anchor{cp/topics/expressions _CPPv2N6gccjit7context14new_comparisonE18gcc_jit_comparisonN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2bf}@anchor{cp/topics/expressions gccjit context new_comparison__gcc_jit_comparison gccjit rvalue gccjit rvalue gccjit location}@anchor{2c0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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. @@ -13914,40 +14087,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{2bd}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2be}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2bf}@anchor{cp/topics/expressions gccjit context new_eq__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c0} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_eq (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c1}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c2}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_eqEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c3}@anchor{cp/topics/expressions gccjit context new_eq__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c4} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2c1}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c2}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c3}@anchor{cp/topics/expressions gccjit context new_ne__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c4} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_ne (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c5}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c6}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_neEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c7}@anchor{cp/topics/expressions gccjit context new_ne__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c8} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2c5}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c6}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c7}@anchor{cp/topics/expressions gccjit context new_lt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2c8} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_lt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2c9}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ca}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_ltEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cb}@anchor{cp/topics/expressions gccjit context new_lt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2cc} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2c9}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ca}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cb}@anchor{cp/topics/expressions gccjit context new_le__gccjit rvalue gccjit rvalue gccjit location}@anchor{2cc} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_le (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cd}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ce}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_leEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cf}@anchor{cp/topics/expressions gccjit context new_le__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2cd}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2ce}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2cf}@anchor{cp/topics/expressions gccjit context new_gt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d0} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_gt (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d1}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d2}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_gtEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d3}@anchor{cp/topics/expressions gccjit context new_gt__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d4} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2d1}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d2}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d3}@anchor{cp/topics/expressions gccjit context new_ge__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d4} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_ge (gccjit::rvalue a, gccjit::rvalue b, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d5}@anchor{cp/topics/expressions _CPPv3N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d6}@anchor{cp/topics/expressions _CPPv2N6gccjit7context6new_geEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2d7}@anchor{cp/topics/expressions gccjit context new_ge__gccjit rvalue gccjit rvalue gccjit location}@anchor{2d8} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,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{2d5}@anchor{cp/topics/expressions _CPPv3eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2d6}@anchor{cp/topics/expressions _CPPv2eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2d7}@anchor{cp/topics/expressions eq-operator__gccjit rvalue gccjit rvalue}@anchor{2d8} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator== (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2d9}@anchor{cp/topics/expressions _CPPv3eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2da}@anchor{cp/topics/expressions _CPPv2eqN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2db}@anchor{cp/topics/expressions eq-operator__gccjit rvalue gccjit rvalue}@anchor{2dc} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator== (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (a == ctxt.zero (t_int)); @@ -13955,8 +14128,8 @@ gccjit::rvalue cond = (a == ctxt.zero (t_int)); @end deffn @geindex operator!= (C++ function) -@anchor{cp/topics/expressions _CPPv4neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2d9}@anchor{cp/topics/expressions _CPPv3neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2da}@anchor{cp/topics/expressions _CPPv2neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2db}@anchor{cp/topics/expressions neq-operator__gccjit rvalue gccjit rvalue}@anchor{2dc} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator!= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2dd}@anchor{cp/topics/expressions _CPPv3neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2de}@anchor{cp/topics/expressions _CPPv2neN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2df}@anchor{cp/topics/expressions neq-operator__gccjit rvalue gccjit rvalue}@anchor{2e0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator!= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (i != j); @@ -13964,8 +14137,8 @@ gccjit::rvalue cond = (i != j); @end deffn @geindex operator< (C++ function) -@anchor{cp/topics/expressions _CPPv4ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2dd}@anchor{cp/topics/expressions _CPPv3ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2de}@anchor{cp/topics/expressions _CPPv2ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2df}@anchor{cp/topics/expressions lt-operator__gccjit rvalue gccjit rvalue}@anchor{2e0} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator< (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e1}@anchor{cp/topics/expressions _CPPv3ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e2}@anchor{cp/topics/expressions _CPPv2ltN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e3}@anchor{cp/topics/expressions lt-operator__gccjit rvalue gccjit rvalue}@anchor{2e4} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator< (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = i < n; @@ -13973,8 +14146,8 @@ gccjit::rvalue cond = i < n; @end deffn @geindex operator<= (C++ function) -@anchor{cp/topics/expressions _CPPv4leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e1}@anchor{cp/topics/expressions _CPPv3leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e2}@anchor{cp/topics/expressions _CPPv2leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e3}@anchor{cp/topics/expressions lte-operator__gccjit rvalue gccjit rvalue}@anchor{2e4} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator<= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e5}@anchor{cp/topics/expressions _CPPv3leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e6}@anchor{cp/topics/expressions _CPPv2leN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e7}@anchor{cp/topics/expressions lte-operator__gccjit rvalue gccjit rvalue}@anchor{2e8} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator<= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = i <= n; @@ -13982,8 +14155,8 @@ gccjit::rvalue cond = i <= n; @end deffn @geindex operator> (C++ function) -@anchor{cp/topics/expressions _CPPv4gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e5}@anchor{cp/topics/expressions _CPPv3gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e6}@anchor{cp/topics/expressions _CPPv2gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e7}@anchor{cp/topics/expressions gt-operator__gccjit rvalue gccjit rvalue}@anchor{2e8} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator> (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e9}@anchor{cp/topics/expressions _CPPv3gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ea}@anchor{cp/topics/expressions _CPPv2gtN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2eb}@anchor{cp/topics/expressions gt-operator__gccjit rvalue gccjit rvalue}@anchor{2ec} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator> (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (ch > limit); @@ -13991,8 +14164,8 @@ gccjit::rvalue cond = (ch > limit); @end deffn @geindex operator>= (C++ function) -@anchor{cp/topics/expressions _CPPv4geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2e9}@anchor{cp/topics/expressions _CPPv3geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ea}@anchor{cp/topics/expressions _CPPv2geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2eb}@anchor{cp/topics/expressions gte-operator__gccjit rvalue gccjit rvalue}@anchor{2ec} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} operator>= (gccjit::rvalue a, gccjit::rvalue b) +@anchor{cp/topics/expressions _CPPv4geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ed}@anchor{cp/topics/expressions _CPPv3geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ee}@anchor{cp/topics/expressions _CPPv2geN6gccjit6rvalueEN6gccjit6rvalueE}@anchor{2ef}@anchor{cp/topics/expressions gte-operator__gccjit rvalue gccjit rvalue}@anchor{2f0} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} operator>= (gccjit::rvalue a, gccjit::rvalue b) @example gccjit::rvalue cond = (score >= ctxt.new_rvalue (t_int, 100)); @@ -14002,12 +14175,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{2ed} +@anchor{cp/topics/expressions function-calls}@anchor{2f1} @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{2ee}@anchor{cp/topics/expressions _CPPv324gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2ef}@anchor{cp/topics/expressions _CPPv224gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f0}@anchor{cp/topics/expressions gcc_jit_context_new_call__gcc_jit_contextP gcc_jit_locationP gcc_jit_functionP i gcc_jit_rvaluePP}@anchor{2f1} +@anchor{cp/topics/expressions _CPPv424gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f2}@anchor{cp/topics/expressions _CPPv324gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f3}@anchor{cp/topics/expressions _CPPv224gcc_jit_context_new_callP15gcc_jit_contextP16gcc_jit_locationP16gcc_jit_functioniPP14gcc_jit_rvalue}@anchor{2f4}@anchor{cp/topics/expressions gcc_jit_context_new_call__gcc_jit_contextP gcc_jit_locationP gcc_jit_functionP i gcc_jit_rvaluePP}@anchor{2f5} @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 @@ -14016,14 +14189,14 @@ call to the function, with the result as an rvalue. @cartouche @quotation Note @code{gccjit::context::new_call()} merely builds a -@ref{16e,,gccjit;;rvalue} i.e. an expression that can be evaluated, +@ref{172,,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{2f2,,gccjit;;block;;add_eval()}: +@ref{2f6,,gccjit;;block;;add_eval()}: @example /* Add "(void)printf (arg0, arg1);". */ @@ -14034,26 +14207,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{2f3} +@anchor{cp/topics/expressions function-pointers}@anchor{2f7} @subsubsection Function pointers @geindex gccjit;;function;;get_address (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2f4}@anchor{cp/topics/expressions _CPPv3N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2f5}@anchor{cp/topics/expressions _CPPv2N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2f6}@anchor{cp/topics/expressions gccjit function get_address__gccjit location}@anchor{2f7} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{17c,,function}::get_address (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2f8}@anchor{cp/topics/expressions _CPPv3N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2f9}@anchor{cp/topics/expressions _CPPv2N6gccjit8function11get_addressEN6gccjit8locationE}@anchor{2fa}@anchor{cp/topics/expressions gccjit function get_address__gccjit location}@anchor{2fb} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{180,,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{2f8} +@anchor{cp/topics/expressions type-coercion}@anchor{2fc} @subsubsection Type-coercion @geindex gccjit;;context;;new_cast (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2f9}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2fa}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2fb}@anchor{cp/topics/expressions gccjit context new_cast__gccjit rvalue gccjit type gccjit location}@anchor{2fc} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{165,,context}::new_cast (gccjit::rvalue rvalue, gccjit::type type, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2fd}@anchor{cp/topics/expressions _CPPv3N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2fe}@anchor{cp/topics/expressions _CPPv2N6gccjit7context8new_castEN6gccjit6rvalueEN6gccjit4typeEN6gccjit8locationE}@anchor{2ff}@anchor{cp/topics/expressions gccjit context new_cast__gccjit rvalue gccjit type gccjit location}@anchor{300} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{169,,context}::new_cast (gccjit::rvalue rvalue, gccjit::type type, gccjit::location loc) Given an rvalue of T, construct another rvalue of another type. @@ -14077,25 +14250,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{2fd} +@anchor{cp/topics/expressions lvalues}@anchor{301} @subsubsection Lvalues @geindex gccjit;;lvalue (C++ class) -@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalueE}@anchor{177}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalueE}@anchor{2fe}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalueE}@anchor{2ff}@anchor{cp/topics/expressions gccjit lvalue}@anchor{300} +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalueE}@anchor{17b}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalueE}@anchor{302}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalueE}@anchor{303}@anchor{cp/topics/expressions gccjit lvalue}@anchor{304} @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{16e,,gccjit;;rvalue}, where the rvalue is computed by reading from the +@ref{172,,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{301}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{302}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{303}@anchor{cp/topics/expressions gccjit lvalue get_address__gccjit location}@anchor{304} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{177,,lvalue}::get_address (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{305}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{306}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue11get_addressEN6gccjit8locationE}@anchor{307}@anchor{cp/topics/expressions gccjit lvalue get_address__gccjit location}@anchor{308} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{17b,,lvalue}::get_address (gccjit::location loc) Take the address of an lvalue; analogous to: @@ -14114,28 +14287,28 @@ Parameter “loc” is optional. @end menu @node Global variables<2>,,,Lvalues<2> -@anchor{cp/topics/expressions global-variables}@anchor{305} +@anchor{cp/topics/expressions global-variables}@anchor{309} @subsubsection Global variables @geindex gccjit;;context;;new_global (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{306}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{307}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{308}@anchor{cp/topics/expressions gccjit context new_global__gcc_jit_global_kind gccjit type cCP gccjit location}@anchor{309} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{165,,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{30a}@anchor{cp/topics/expressions _CPPv3N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30b}@anchor{cp/topics/expressions _CPPv2N6gccjit7context10new_globalE19gcc_jit_global_kindN6gccjit4typeEPKcN6gccjit8locationE}@anchor{30c}@anchor{cp/topics/expressions gccjit context new_global__gcc_jit_global_kind gccjit type cCP gccjit location}@anchor{30d} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{169,,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{ea,,gcc_jit_context_new_global()} from +This is a thin wrapper around @ref{ed,,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{30a} +@anchor{cp/topics/expressions working-with-pointers-structs-and-unions}@anchor{30e} @subsubsection Working with pointers, structs and unions @geindex gccjit;;rvalue;;dereference (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{30b}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{30c}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{30d}@anchor{cp/topics/expressions gccjit rvalue dereference__gccjit location}@anchor{30e} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{16e,,rvalue}::dereference (gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{30f}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{310}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue11dereferenceEN6gccjit8locationE}@anchor{311}@anchor{cp/topics/expressions gccjit rvalue dereference__gccjit location}@anchor{312} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{172,,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: @@ -14153,8 +14326,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{30f}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvaluemlEv}@anchor{310}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvaluemlEv}@anchor{311}@anchor{cp/topics/expressions gccjit rvalue mul-operator}@anchor{312} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{16e,,rvalue}::operator* () +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvaluemlEv}@anchor{313}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvaluemlEv}@anchor{314}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvaluemlEv}@anchor{315}@anchor{cp/topics/expressions gccjit rvalue mul-operator}@anchor{316} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{172,,rvalue}::operator* () @example gccjit::lvalue content = *ptr; @@ -14164,8 +14337,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{313}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{314}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{315}@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{316} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{177,,lvalue}::access_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{317}@anchor{cp/topics/expressions _CPPv3N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{318}@anchor{cp/topics/expressions _CPPv2N6gccjit6lvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{319}@anchor{cp/topics/expressions gccjit lvalue access_field__gccjit field gccjit location}@anchor{31a} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{17b,,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: @@ -14178,8 +14351,8 @@ in C. @end deffn @geindex gccjit;;rvalue;;access_field (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{317}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{318}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{319}@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{31a} -@deffn {C++ Function} gccjit::@ref{16e,,rvalue} gccjit::@ref{16e,,rvalue}::access_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31b}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31c}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue12access_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31d}@anchor{cp/topics/expressions gccjit rvalue access_field__gccjit field gccjit location}@anchor{31e} +@deffn {C++ Function} gccjit::@ref{172,,rvalue} gccjit::@ref{172,,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: @@ -14192,8 +14365,8 @@ in C. @end deffn @geindex gccjit;;rvalue;;dereference_field (C++ function) -@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31b}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31c}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31d}@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{31e} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{16e,,rvalue}::dereference_field (gccjit::field field, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{31f}@anchor{cp/topics/expressions _CPPv3N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{320}@anchor{cp/topics/expressions _CPPv2N6gccjit6rvalue17dereference_fieldEN6gccjit5fieldEN6gccjit8locationE}@anchor{321}@anchor{cp/topics/expressions gccjit rvalue dereference_field__gccjit field gccjit location}@anchor{322} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{172,,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: @@ -14206,8 +14379,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{31f}@anchor{cp/topics/expressions _CPPv3N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{320}@anchor{cp/topics/expressions _CPPv2N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{321}@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{322} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{165,,context}::new_array_access (gccjit::rvalue ptr, gccjit::rvalue index, gccjit::location loc) +@anchor{cp/topics/expressions _CPPv4N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{323}@anchor{cp/topics/expressions _CPPv3N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{324}@anchor{cp/topics/expressions _CPPv2N6gccjit7context16new_array_accessEN6gccjit6rvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{325}@anchor{cp/topics/expressions gccjit context new_array_access__gccjit rvalue gccjit rvalue gccjit location}@anchor{326} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{169,,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 @@ -14223,7 +14396,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{18b,,gccjit;;location}, +For array accesses where you don’t need to specify a @ref{18f,,gccjit;;location}, two overloaded operators are available: @quotation @@ -14259,7 +14432,7 @@ gccjit::lvalue element = array[0]; @c . @node Creating and using functions<2>,Source Locations<2>,Expressions<2>,Topic Reference<2> -@anchor{cp/topics/functions doc}@anchor{323}@anchor{cp/topics/functions creating-and-using-functions}@anchor{324} +@anchor{cp/topics/functions doc}@anchor{327}@anchor{cp/topics/functions creating-and-using-functions}@anchor{328} @subsection Creating and using functions @@ -14272,36 +14445,36 @@ gccjit::lvalue element = array[0]; @end menu @node Params<2>,Functions<2>,,Creating and using functions<2> -@anchor{cp/topics/functions params}@anchor{325} +@anchor{cp/topics/functions params}@anchor{329} @subsubsection Params @geindex gccjit;;param (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit5paramE}@anchor{178}@anchor{cp/topics/functions _CPPv3N6gccjit5paramE}@anchor{326}@anchor{cp/topics/functions _CPPv2N6gccjit5paramE}@anchor{327}@anchor{cp/topics/functions gccjit param}@anchor{328} +@anchor{cp/topics/functions _CPPv4N6gccjit5paramE}@anchor{17c}@anchor{cp/topics/functions _CPPv3N6gccjit5paramE}@anchor{32a}@anchor{cp/topics/functions _CPPv2N6gccjit5paramE}@anchor{32b}@anchor{cp/topics/functions gccjit param}@anchor{32c} @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{16c}@anchor{cp/topics/functions _CPPv3N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{329}@anchor{cp/topics/functions _CPPv2N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{32a}@anchor{cp/topics/functions gccjit context new_param__gccjit type cCP gccjit location}@anchor{32b} -@deffn {C++ Function} gccjit::@ref{178,,param} gccjit::@ref{165,,context}::new_param (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{170}@anchor{cp/topics/functions _CPPv3N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{32d}@anchor{cp/topics/functions _CPPv2N6gccjit7context9new_paramEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{32e}@anchor{cp/topics/functions gccjit context new_param__gccjit type cCP gccjit location}@anchor{32f} +@deffn {C++ Function} gccjit::@ref{17c,,param} gccjit::@ref{169,,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{178,,gccjit;;param} is a subclass of @ref{177,,gccjit;;lvalue} (and thus -of @ref{16e,,gccjit;;rvalue} and @ref{16a,,gccjit;;object}). It is a thin +@ref{17c,,gccjit;;param} is a subclass of @ref{17b,,gccjit;;lvalue} (and thus +of @ref{172,,gccjit;;rvalue} and @ref{16e,,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{32c} +@anchor{cp/topics/functions functions}@anchor{330} @subsubsection Functions @geindex gccjit;;function (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit8functionE}@anchor{17c}@anchor{cp/topics/functions _CPPv3N6gccjit8functionE}@anchor{32d}@anchor{cp/topics/functions _CPPv2N6gccjit8functionE}@anchor{32e}@anchor{cp/topics/functions gccjit function}@anchor{32f} +@anchor{cp/topics/functions _CPPv4N6gccjit8functionE}@anchor{180}@anchor{cp/topics/functions _CPPv3N6gccjit8functionE}@anchor{331}@anchor{cp/topics/functions _CPPv2N6gccjit8functionE}@anchor{332}@anchor{cp/topics/functions gccjit function}@anchor{333} @deffn {C++ Class} gccjit::function A @cite{gccjit::function} represents a function - either one that we’re @@ -14309,8 +14482,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{330}@anchor{cp/topics/functions _CPPv3N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{331}@anchor{cp/topics/functions _CPPv2N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{332}@anchor{cp/topics/functions gccjit context new_function__gcc_jit_function_kind gccjit type cCP std vector param R i gccjit location}@anchor{333} -@deffn {C++ Function} gccjit::@ref{17c,,function} gccjit::@ref{165,,context}::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector ¶ms, int is_variadic, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{334}@anchor{cp/topics/functions _CPPv3N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{335}@anchor{cp/topics/functions _CPPv2N6gccjit7context12new_functionE21gcc_jit_function_kindN6gccjit4typeEPKcRNSt6vectorI5paramEEiN6gccjit8locationE}@anchor{336}@anchor{cp/topics/functions gccjit context new_function__gcc_jit_function_kind gccjit type cCP std vector param R i gccjit location}@anchor{337} +@deffn {C++ Function} gccjit::@ref{180,,function} gccjit::@ref{169,,context}::new_function (enum gcc_jit_function_kind, gccjit::type return_type, const char *name, std::vector ¶ms, int is_variadic, gccjit::location loc) Create a gcc_jit_function with the given name and parameters. @@ -14320,49 +14493,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{334}@anchor{cp/topics/functions _CPPv3N6gccjit7context20get_builtin_functionEPKc}@anchor{335}@anchor{cp/topics/functions _CPPv2N6gccjit7context20get_builtin_functionEPKc}@anchor{336}@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{337} -@deffn {C++ Function} gccjit::@ref{17c,,function} gccjit::@ref{165,,context}::get_builtin_function (const char *name) +@anchor{cp/topics/functions _CPPv4N6gccjit7context20get_builtin_functionEPKc}@anchor{338}@anchor{cp/topics/functions _CPPv3N6gccjit7context20get_builtin_functionEPKc}@anchor{339}@anchor{cp/topics/functions _CPPv2N6gccjit7context20get_builtin_functionEPKc}@anchor{33a}@anchor{cp/topics/functions gccjit context get_builtin_function__cCP}@anchor{33b} +@deffn {C++ Function} gccjit::@ref{180,,function} gccjit::@ref{169,,context}::get_builtin_function (const char *name) This is a wrapper around the C API’s -@ref{103,,gcc_jit_context_get_builtin_function()}. +@ref{106,,gcc_jit_context_get_builtin_function()}. @end deffn @geindex gccjit;;function;;get_param (C++ function) -@anchor{cp/topics/functions _CPPv4NK6gccjit8function9get_paramEi}@anchor{338}@anchor{cp/topics/functions _CPPv3NK6gccjit8function9get_paramEi}@anchor{339}@anchor{cp/topics/functions _CPPv2NK6gccjit8function9get_paramEi}@anchor{33a}@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{33b} -@deffn {C++ Function} gccjit::@ref{178,,param} gccjit::@ref{17c,,function}::get_param (int index) const +@anchor{cp/topics/functions _CPPv4NK6gccjit8function9get_paramEi}@anchor{33c}@anchor{cp/topics/functions _CPPv3NK6gccjit8function9get_paramEi}@anchor{33d}@anchor{cp/topics/functions _CPPv2NK6gccjit8function9get_paramEi}@anchor{33e}@anchor{cp/topics/functions gccjit function get_param__iC}@anchor{33f} +@deffn {C++ Function} gccjit::@ref{17c,,param} gccjit::@ref{180,,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{184}@anchor{cp/topics/functions _CPPv3N6gccjit8function11dump_to_dotEPKc}@anchor{33c}@anchor{cp/topics/functions _CPPv2N6gccjit8function11dump_to_dotEPKc}@anchor{33d}@anchor{cp/topics/functions gccjit function dump_to_dot__cCP}@anchor{33e} -@deffn {C++ Function} void gccjit::@ref{17c,,function}::dump_to_dot (const char *path) +@anchor{cp/topics/functions _CPPv4N6gccjit8function11dump_to_dotEPKc}@anchor{188}@anchor{cp/topics/functions _CPPv3N6gccjit8function11dump_to_dotEPKc}@anchor{340}@anchor{cp/topics/functions _CPPv2N6gccjit8function11dump_to_dotEPKc}@anchor{341}@anchor{cp/topics/functions gccjit function dump_to_dot__cCP}@anchor{342} +@deffn {C++ Function} void gccjit::@ref{180,,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{179}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{33f}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{340}@anchor{cp/topics/functions gccjit function new_local__gccjit type cCP gccjit location}@anchor{341} -@deffn {C++ Function} gccjit::@ref{177,,lvalue} gccjit::@ref{17c,,function}::new_local (gccjit::type type, const char *name, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{17d}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{343}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_localEN6gccjit4typeEPKcN6gccjit8locationE}@anchor{344}@anchor{cp/topics/functions gccjit function new_local__gccjit type cCP gccjit location}@anchor{345} +@deffn {C++ Function} gccjit::@ref{17b,,lvalue} gccjit::@ref{180,,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{342} +@anchor{cp/topics/functions blocks}@anchor{346} @subsubsection Blocks @geindex gccjit;;block (C++ class) -@anchor{cp/topics/functions _CPPv4N6gccjit5blockE}@anchor{17b}@anchor{cp/topics/functions _CPPv3N6gccjit5blockE}@anchor{343}@anchor{cp/topics/functions _CPPv2N6gccjit5blockE}@anchor{344}@anchor{cp/topics/functions gccjit block}@anchor{345} +@anchor{cp/topics/functions _CPPv4N6gccjit5blockE}@anchor{17f}@anchor{cp/topics/functions _CPPv3N6gccjit5blockE}@anchor{347}@anchor{cp/topics/functions _CPPv2N6gccjit5blockE}@anchor{348}@anchor{cp/topics/functions gccjit block}@anchor{349} @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{17b,,gccjit;;block} is a subclass of @ref{16a,,gccjit;;object}. +@ref{17f,,gccjit;;block} is a subclass of @ref{16e,,gccjit;;object}. The first basic block that you create within a function will be the entrypoint. @@ -14376,8 +14549,8 @@ one function. @end deffn @geindex gccjit;;function;;new_block (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_blockEPKc}@anchor{346}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_blockEPKc}@anchor{347}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_blockEPKc}@anchor{348}@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{349} -@deffn {C++ Function} gccjit::@ref{17b,,block} gccjit::@ref{17c,,function}::new_block (const char *name) +@anchor{cp/topics/functions _CPPv4N6gccjit8function9new_blockEPKc}@anchor{34a}@anchor{cp/topics/functions _CPPv3N6gccjit8function9new_blockEPKc}@anchor{34b}@anchor{cp/topics/functions _CPPv2N6gccjit8function9new_blockEPKc}@anchor{34c}@anchor{cp/topics/functions gccjit function new_block__cCP}@anchor{34d} +@deffn {C++ Function} gccjit::@ref{17f,,block} gccjit::@ref{180,,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 @@ -14386,13 +14559,13 @@ messages. @end deffn @node Statements<2>,,Blocks<2>,Creating and using functions<2> -@anchor{cp/topics/functions statements}@anchor{34a} +@anchor{cp/topics/functions statements}@anchor{34e} @subsubsection Statements @geindex gccjit;;block;;add_eval (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2f2}@anchor{cp/topics/functions _CPPv3N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{34b}@anchor{cp/topics/functions _CPPv2N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{34c}@anchor{cp/topics/functions gccjit block add_eval__gccjit rvalue gccjit location}@anchor{34d} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::add_eval (gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{2f6}@anchor{cp/topics/functions _CPPv3N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{34f}@anchor{cp/topics/functions _CPPv2N6gccjit5block8add_evalEN6gccjit6rvalueEN6gccjit8locationE}@anchor{350}@anchor{cp/topics/functions gccjit block add_eval__gccjit rvalue gccjit location}@anchor{351} +@deffn {C++ Function} void gccjit::@ref{17f,,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). @@ -14405,8 +14578,8 @@ This is equivalent to this C code: @end deffn @geindex gccjit;;block;;add_assignment (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{17d}@anchor{cp/topics/functions _CPPv3N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{34e}@anchor{cp/topics/functions _CPPv2N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{34f}@anchor{cp/topics/functions gccjit block add_assignment__gccjit lvalue gccjit rvalue gccjit location}@anchor{350} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::add_assignment (gccjit::lvalue lvalue, gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{181}@anchor{cp/topics/functions _CPPv3N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{352}@anchor{cp/topics/functions _CPPv2N6gccjit5block14add_assignmentEN6gccjit6lvalueEN6gccjit6rvalueEN6gccjit8locationE}@anchor{353}@anchor{cp/topics/functions gccjit block add_assignment__gccjit lvalue gccjit rvalue gccjit location}@anchor{354} +@deffn {C++ Function} void gccjit::@ref{17f,,block}::add_assignment (gccjit::lvalue lvalue, gccjit::rvalue rvalue, gccjit::location loc) Add evaluation of an rvalue, assigning the result to the given lvalue. @@ -14419,8 +14592,8 @@ lvalue = rvalue; @end deffn @geindex gccjit;;block;;add_assignment_op (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{181}@anchor{cp/topics/functions _CPPv3N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{351}@anchor{cp/topics/functions _CPPv2N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{352}@anchor{cp/topics/functions gccjit block add_assignment_op__gccjit lvalue gcc_jit_binary_op gccjit rvalue gccjit location}@anchor{353} -@deffn {C++ Function} void gccjit::@ref{17b,,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{185}@anchor{cp/topics/functions _CPPv3N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{355}@anchor{cp/topics/functions _CPPv2N6gccjit5block17add_assignment_opEN6gccjit6lvalueE17gcc_jit_binary_opN6gccjit6rvalueEN6gccjit8locationE}@anchor{356}@anchor{cp/topics/functions gccjit block add_assignment_op__gccjit lvalue gcc_jit_binary_op gccjit rvalue gccjit location}@anchor{357} +@deffn {C++ Function} void gccjit::@ref{17f,,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. @@ -14445,8 +14618,8 @@ loop_body.add_assignment_op ( @end deffn @geindex gccjit;;block;;add_comment (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{18d}@anchor{cp/topics/functions _CPPv3N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{354}@anchor{cp/topics/functions _CPPv2N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{355}@anchor{cp/topics/functions gccjit block add_comment__cCP gccjit location}@anchor{356} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::add_comment (const char *text, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{191}@anchor{cp/topics/functions _CPPv3N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{358}@anchor{cp/topics/functions _CPPv2N6gccjit5block11add_commentEPKcN6gccjit8locationE}@anchor{359}@anchor{cp/topics/functions gccjit block add_comment__cCP gccjit location}@anchor{35a} +@deffn {C++ Function} void gccjit::@ref{17f,,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 @@ -14459,8 +14632,8 @@ Parameter “loc” is optional. @end deffn @geindex gccjit;;block;;end_with_conditional (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{180}@anchor{cp/topics/functions _CPPv3N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{357}@anchor{cp/topics/functions _CPPv2N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{358}@anchor{cp/topics/functions gccjit block end_with_conditional__gccjit rvalue gccjit block gccjit block gccjit location}@anchor{359} -@deffn {C++ Function} void gccjit::@ref{17b,,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{184}@anchor{cp/topics/functions _CPPv3N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{35b}@anchor{cp/topics/functions _CPPv2N6gccjit5block20end_with_conditionalEN6gccjit6rvalueEN6gccjit5blockEN6gccjit5blockEN6gccjit8locationE}@anchor{35c}@anchor{cp/topics/functions gccjit block end_with_conditional__gccjit rvalue gccjit block gccjit block gccjit location}@anchor{35d} +@deffn {C++ Function} void gccjit::@ref{17f,,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. @@ -14478,8 +14651,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{35a}@anchor{cp/topics/functions _CPPv3N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{35b}@anchor{cp/topics/functions _CPPv2N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{35c}@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{35d} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::end_with_jump (gccjit::block target, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{35e}@anchor{cp/topics/functions _CPPv3N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{35f}@anchor{cp/topics/functions _CPPv2N6gccjit5block13end_with_jumpEN6gccjit5blockEN6gccjit8locationE}@anchor{360}@anchor{cp/topics/functions gccjit block end_with_jump__gccjit block gccjit location}@anchor{361} +@deffn {C++ Function} void gccjit::@ref{17f,,block}::end_with_jump (gccjit::block target, gccjit::location loc) Terminate a block by adding a jump to the given target block. @@ -14491,8 +14664,8 @@ goto target; @end deffn @geindex gccjit;;block;;end_with_return (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{35e}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{35f}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{360}@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{361} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::end_with_return (gccjit::rvalue rvalue, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{362}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{363}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_returnEN6gccjit6rvalueEN6gccjit8locationE}@anchor{364}@anchor{cp/topics/functions gccjit block end_with_return__gccjit rvalue gccjit location}@anchor{365} +@deffn {C++ Function} void gccjit::@ref{17f,,block}::end_with_return (gccjit::rvalue rvalue, gccjit::location loc) Terminate a block. @@ -14521,8 +14694,8 @@ return; @end deffn @geindex gccjit;;block;;end_with_switch (C++ function) -@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{362}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{363}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{364}@anchor{cp/topics/functions gccjit block end_with_switch__gccjit rvalue gccjit block std vector gccjit case_ gccjit location}@anchor{365} -@deffn {C++ Function} void gccjit::@ref{17b,,block}::end_with_switch (gccjit::rvalue expr, gccjit::block default_block, std::vector cases, gccjit::location loc) +@anchor{cp/topics/functions _CPPv4N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{366}@anchor{cp/topics/functions _CPPv3N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{367}@anchor{cp/topics/functions _CPPv2N6gccjit5block15end_with_switchEN6gccjit6rvalueEN6gccjit5blockENSt6vectorIN6gccjit5case_EEEN6gccjit8locationE}@anchor{368}@anchor{cp/topics/functions gccjit block end_with_switch__gccjit rvalue gccjit block std vector gccjit case_ gccjit location}@anchor{369} +@deffn {C++ Function} void gccjit::@ref{17f,,block}::end_with_switch (gccjit::rvalue expr, gccjit::block default_block, std::vector cases, gccjit::location loc) Terminate a block by adding evalation of an rvalue, then performing a multiway branch. @@ -14562,14 +14735,14 @@ The API entrypoints relating to switch statements and cases: @itemize * @item -@ref{362,,gccjit;;block;;end_with_switch()} +@ref{366,,gccjit;;block;;end_with_switch()} @item @code{gccjit::context::new_case()} @end itemize @end quotation -were added in @ref{114,,LIBGCCJIT_ABI_3}; you can test for their presence +were added in @ref{117,,LIBGCCJIT_ABI_3}; you can test for their presence using @example @@ -14577,9 +14750,9 @@ using @end example A @cite{gccjit::case_} represents a case within a switch statement, and -is created within a particular @ref{165,,gccjit;;context} using +is created within a particular @ref{169,,gccjit;;context} using @code{gccjit::context::new_case()}. It is a subclass of -@ref{16a,,gccjit;;object}. +@ref{16e,,gccjit;;object}. Each case expresses a multivalued range of integer values. You can express single-valued cases by passing in the same value for @@ -14682,12 +14855,12 @@ create_code (gcc_jit_context *c_ctxt, void *user_data) @c . @node Source Locations<2>,Compiling a context<2>,Creating and using functions<2>,Topic Reference<2> -@anchor{cp/topics/locations doc}@anchor{366}@anchor{cp/topics/locations source-locations}@anchor{367} +@anchor{cp/topics/locations doc}@anchor{36a}@anchor{cp/topics/locations source-locations}@anchor{36b} @subsection Source Locations @geindex gccjit;;location (C++ class) -@anchor{cp/topics/locations _CPPv4N6gccjit8locationE}@anchor{18b}@anchor{cp/topics/locations _CPPv3N6gccjit8locationE}@anchor{368}@anchor{cp/topics/locations _CPPv2N6gccjit8locationE}@anchor{369}@anchor{cp/topics/locations gccjit location}@anchor{36a} +@anchor{cp/topics/locations _CPPv4N6gccjit8locationE}@anchor{18f}@anchor{cp/topics/locations _CPPv3N6gccjit8locationE}@anchor{36c}@anchor{cp/topics/locations _CPPv2N6gccjit8locationE}@anchor{36d}@anchor{cp/topics/locations gccjit location}@anchor{36e} @deffn {C++ Class} gccjit::location A @cite{gccjit::location} encapsulates a source code location, so that @@ -14698,10 +14871,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{191,,gccjit;;context;;new_location()}. +You can construct them using @ref{195,,gccjit;;context;;new_location()}. You need to enable @ref{42,,GCC_JIT_BOOL_OPTION_DEBUGINFO} on the -@ref{165,,gccjit;;context} for these locations to actually be usable by +@ref{169,,gccjit;;context} for these locations to actually be usable by the debugger: @example @@ -14710,8 +14883,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{191}@anchor{cp/topics/locations _CPPv3N6gccjit7context12new_locationEPKcii}@anchor{36b}@anchor{cp/topics/locations _CPPv2N6gccjit7context12new_locationEPKcii}@anchor{36c}@anchor{cp/topics/locations gccjit context new_location__cCP i i}@anchor{36d} -@deffn {C++ Function} gccjit::@ref{18b,,location} gccjit::@ref{165,,context}::new_location (const char *filename, int line, int column) +@anchor{cp/topics/locations _CPPv4N6gccjit7context12new_locationEPKcii}@anchor{195}@anchor{cp/topics/locations _CPPv3N6gccjit7context12new_locationEPKcii}@anchor{36f}@anchor{cp/topics/locations _CPPv2N6gccjit7context12new_locationEPKcii}@anchor{370}@anchor{cp/topics/locations gccjit context new_location__cCP i i}@anchor{371} +@deffn {C++ Function} gccjit::@ref{18f,,location} gccjit::@ref{169,,context}::new_location (const char *filename, int line, int column) Create a @cite{gccjit::location} instance representing the given source location. @@ -14723,13 +14896,13 @@ location. @end menu @node Faking it<2>,,,Source Locations<2> -@anchor{cp/topics/locations faking-it}@anchor{36e} +@anchor{cp/topics/locations faking-it}@anchor{372} @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{1b0,,gccjit;;context;;dump_to_file()}: +your context using @ref{1b4,,gccjit;;context;;dump_to_file()}: @example ctxt.dump_to_file ("/tmp/something.c", @@ -14759,13 +14932,13 @@ file, giving you @emph{something} you can step through in the debugger. @c . @node Compiling a context<2>,Using Assembly Language with libgccjit++,Source Locations<2>,Topic Reference<2> -@anchor{cp/topics/compilation doc}@anchor{36f}@anchor{cp/topics/compilation compiling-a-context}@anchor{370} +@anchor{cp/topics/compilation doc}@anchor{373}@anchor{cp/topics/compilation compiling-a-context}@anchor{374} @subsection Compiling a context -Once populated, a @ref{165,,gccjit;;context} can be compiled to -machine code, either in-memory via @ref{16f,,gccjit;;context;;compile()} or -to disk via @ref{371,,gccjit;;context;;compile_to_file()}. +Once populated, a @ref{169,,gccjit;;context} can be compiled to +machine code, either in-memory via @ref{173,,gccjit;;context;;compile()} or +to disk via @ref{375,,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 @@ -14778,13 +14951,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{372} +@anchor{cp/topics/compilation in-memory-compilation}@anchor{376} @subsubsection In-memory compilation @geindex gccjit;;context;;compile (C++ function) -@anchor{cp/topics/compilation _CPPv4N6gccjit7context7compileEv}@anchor{16f}@anchor{cp/topics/compilation _CPPv3N6gccjit7context7compileEv}@anchor{373}@anchor{cp/topics/compilation _CPPv2N6gccjit7context7compileEv}@anchor{374}@anchor{cp/topics/compilation gccjit context compile}@anchor{375} -@deffn {C++ Function} gcc_jit_result *gccjit::@ref{165,,context}::compile () +@anchor{cp/topics/compilation _CPPv4N6gccjit7context7compileEv}@anchor{173}@anchor{cp/topics/compilation _CPPv3N6gccjit7context7compileEv}@anchor{377}@anchor{cp/topics/compilation _CPPv2N6gccjit7context7compileEv}@anchor{378}@anchor{cp/topics/compilation gccjit context compile}@anchor{379} +@deffn {C++ Function} gcc_jit_result *gccjit::@ref{169,,context}::compile () This calls into GCC and builds the code, returning a @cite{gcc_jit_result *}. @@ -14794,19 +14967,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{376} +@anchor{cp/topics/compilation ahead-of-time-compilation}@anchor{37a} @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{371,,gccjit;;context;;compile_to_file()} method. +compilers, via the @ref{375,,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{371}@anchor{cp/topics/compilation _CPPv3N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{377}@anchor{cp/topics/compilation _CPPv2N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{378}@anchor{cp/topics/compilation gccjit context compile_to_file__gcc_jit_output_kind cCP}@anchor{379} -@deffn {C++ Function} void gccjit::@ref{165,,context}::compile_to_file (enum gcc_jit_output_kind, const char *output_path) +@anchor{cp/topics/compilation _CPPv4N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{375}@anchor{cp/topics/compilation _CPPv3N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{37b}@anchor{cp/topics/compilation _CPPv2N6gccjit7context15compile_to_fileE19gcc_jit_output_kindPKc}@anchor{37c}@anchor{cp/topics/compilation gccjit context compile_to_file__gcc_jit_output_kind cCP}@anchor{37d} +@deffn {C++ Function} void gccjit::@ref{169,,context}::compile_to_file (enum gcc_jit_output_kind, const char *output_path) -Compile the @ref{165,,gccjit;;context} to a file of the given +Compile the @ref{169,,gccjit;;context} to a file of the given kind. This is a thin wrapper around the @@ -14831,7 +15004,7 @@ This is a thin wrapper around the @c . @node Using Assembly Language with libgccjit++,,Compiling a context<2>,Topic Reference<2> -@anchor{cp/topics/asm doc}@anchor{37a}@anchor{cp/topics/asm using-assembly-language-with-libgccjit}@anchor{37b} +@anchor{cp/topics/asm doc}@anchor{37e}@anchor{cp/topics/asm using-assembly-language-with-libgccjit}@anchor{37f} @subsection Using Assembly Language with libgccjit++ @@ -14841,7 +15014,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{146,,LIBGCCJIT_ABI_15}; you can test +These entrypoints were added in @ref{149,,LIBGCCJIT_ABI_15}; you can test for their presence using @quotation @@ -14858,38 +15031,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{37c} +@anchor{cp/topics/asm adding-assembler-instructions-within-a-function}@anchor{380} @subsubsection Adding assembler instructions within a function @geindex gccjit;;extended_asm (C++ class) -@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asmE}@anchor{37d}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asmE}@anchor{37e}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asmE}@anchor{37f}@anchor{cp/topics/asm gccjit extended_asm}@anchor{380} +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asmE}@anchor{381}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asmE}@anchor{382}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asmE}@anchor{383}@anchor{cp/topics/asm gccjit extended_asm}@anchor{384} @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{37d,,gccjit;;extended_asm} is a subclass of @ref{16a,,gccjit;;object}. -It is a thin wrapper around the C API’s @ref{115,,gcc_jit_extended_asm *}. +@ref{381,,gccjit;;extended_asm} is a subclass of @ref{16e,,gccjit;;object}. +It is a thin wrapper around the C API’s @ref{118,,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{37d,,gccjit;;extended_asm}, +an initial call to create the @ref{381,,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{37d,,gccjit;;extended_asm}: +There are two API entrypoints for creating a @ref{381,,gccjit;;extended_asm}: @itemize * @item -@ref{381,,gccjit;;block;;add_extended_asm()} for an @code{asm} statement with +@ref{385,,gccjit;;block;;add_extended_asm()} for an @code{asm} statement with no control flow, and @item -@ref{382,,gccjit;;block;;end_with_extended_asm_goto()} for an @code{asm goto}. +@ref{386,,gccjit;;block;;end_with_extended_asm_goto()} for an @code{asm goto}. @end itemize For example, to create the equivalent of: @@ -14917,8 +15090,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{383,,gccjit;;extended_asm;;add_output_operand()} and -@ref{384,,gccjit;;extended_asm;;add_input_operand()} were made in. +@ref{387,,gccjit;;extended_asm;;add_output_operand()} and +@ref{388,,gccjit;;extended_asm;;add_input_operand()} were made in. @end quotation @end cartouche @@ -14943,10 +15116,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{381}@anchor{cp/topics/asm _CPPv3N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{385}@anchor{cp/topics/asm _CPPv2N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{386}@anchor{cp/topics/asm gccjit block add_extended_asm__ssCR gccjit location}@anchor{387} -@deffn {C++ Function} @ref{37d,,extended_asm} gccjit::@ref{17b,,block}::add_extended_asm (const std::string &asm_template, gccjit::location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{385}@anchor{cp/topics/asm _CPPv3N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{389}@anchor{cp/topics/asm _CPPv2N6gccjit5block16add_extended_asmERKNSt6stringEN6gccjit8locationE}@anchor{38a}@anchor{cp/topics/asm gccjit block add_extended_asm__ssCR gccjit location}@anchor{38b} +@deffn {C++ Function} @ref{381,,extended_asm} gccjit::@ref{17f,,block}::add_extended_asm (const std::string &asm_template, gccjit::location loc = location()) -Create a @ref{37d,,gccjit;;extended_asm} for an extended @code{asm} statement +Create a @ref{381,,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} @@ -14956,10 +15129,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{382}@anchor{cp/topics/asm _CPPv3N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{388}@anchor{cp/topics/asm _CPPv2N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{389}@anchor{cp/topics/asm gccjit block end_with_extended_asm_goto__ssCR std vector block blockP location}@anchor{38a} -@deffn {C++ Function} @ref{37d,,extended_asm} gccjit::@ref{17b,,block}::end_with_extended_asm_goto (const std::string &asm_template, std::vector goto_blocks, block *fallthrough_block, location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{386}@anchor{cp/topics/asm _CPPv3N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{38c}@anchor{cp/topics/asm _CPPv2N6gccjit5block26end_with_extended_asm_gotoERKNSt6stringENSt6vectorI5blockEEP5block8location}@anchor{38d}@anchor{cp/topics/asm gccjit block end_with_extended_asm_goto__ssCR std vector block blockP location}@anchor{38e} +@deffn {C++ Function} @ref{381,,extended_asm} gccjit::@ref{17f,,block}::end_with_extended_asm_goto (const std::string &asm_template, std::vector goto_blocks, block *fallthrough_block, location loc = location()) -Create a @ref{37d,,gccjit;;extended_asm} for an extended @code{asm} statement +Create a @ref{381,,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. @@ -15008,7 +15181,7 @@ to fall through to after the statement. @cartouche @quotation Note -This is needed since each @ref{17b,,gccjit;;block} must have a +This is needed since each @ref{17f,,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 @@ -15018,10 +15191,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{38b}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17set_volatile_flagEb}@anchor{38c}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17set_volatile_flagEb}@anchor{38d}@anchor{cp/topics/asm gccjit extended_asm set_volatile_flag__b}@anchor{38e} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,extended_asm}::set_volatile_flag (bool flag) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17set_volatile_flagEb}@anchor{38f}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17set_volatile_flagEb}@anchor{390}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17set_volatile_flagEb}@anchor{391}@anchor{cp/topics/asm gccjit extended_asm set_volatile_flag__b}@anchor{392} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,extended_asm}::set_volatile_flag (bool flag) -Set whether the @ref{37d,,gccjit;;extended_asm} has side-effects, equivalent to the +Set whether the @ref{381,,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. @@ -15049,12 +15222,12 @@ the following API calls could be used: .add_clobber ("rdx"); @end example -where the @ref{37d,,gccjit;;extended_asm} is flagged as volatile. +where the @ref{381,,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{38f}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm15set_inline_flagEb}@anchor{390}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm15set_inline_flagEb}@anchor{391}@anchor{cp/topics/asm gccjit extended_asm set_inline_flag__b}@anchor{392} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,extended_asm}::set_inline_flag (bool flag) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm15set_inline_flagEb}@anchor{393}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm15set_inline_flagEb}@anchor{394}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm15set_inline_flagEb}@anchor{395}@anchor{cp/topics/asm gccjit extended_asm set_inline_flag__b}@anchor{396} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,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} @@ -15062,8 +15235,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{383}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{393}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{394}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR ssCR gccjit lvalue}@anchor{395} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,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{387}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{397}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringERKNSt6stringEN6gccjit6lvalueE}@anchor{398}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR ssCR gccjit lvalue}@anchor{399} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,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} @@ -15093,8 +15266,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{396}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{397}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{398}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR gccjit lvalue}@anchor{399} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,extended_asm}::add_output_operand (const std::string &constraint, gccjit::lvalue dest) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39a}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39b}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm18add_output_operandERKNSt6stringEN6gccjit6lvalueE}@anchor{39c}@anchor{cp/topics/asm gccjit extended_asm add_output_operand__ssCR gccjit lvalue}@anchor{39d} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,extended_asm}::add_output_operand (const std::string &constraint, gccjit::lvalue dest) As above, but don’t supply a symbolic name for the operand. @@ -15106,8 +15279,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{384}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{39a}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{39b}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR ssCR gccjit rvalue}@anchor{39c} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,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{388}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{39e}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringERKNSt6stringEN6gccjit6rvalueE}@anchor{39f}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR ssCR gccjit rvalue}@anchor{3a0} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,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} @@ -15131,8 +15304,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{39d}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{39e}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{39f}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR gccjit rvalue}@anchor{3a0} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,extended_asm}::add_input_operand (const std::string &constraint, gccjit::rvalue src) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a1}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a2}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm17add_input_operandERKNSt6stringEN6gccjit6rvalueE}@anchor{3a3}@anchor{cp/topics/asm gccjit extended_asm add_input_operand__ssCR gccjit rvalue}@anchor{3a4} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,extended_asm}::add_input_operand (const std::string &constraint, gccjit::rvalue src) As above, but don’t supply a symbolic name for the operand. @@ -15144,8 +15317,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{3a1}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a2}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a3}@anchor{cp/topics/asm gccjit extended_asm add_clobber__ssCR}@anchor{3a4} -@deffn {C++ Function} gccjit::@ref{37d,,extended_asm} &gccjit::@ref{37d,,extended_asm}::add_clobber (const std::string &victim) +@anchor{cp/topics/asm _CPPv4N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a5}@anchor{cp/topics/asm _CPPv3N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a6}@anchor{cp/topics/asm _CPPv2N6gccjit12extended_asm11add_clobberERKNSt6stringE}@anchor{3a7}@anchor{cp/topics/asm gccjit extended_asm add_clobber__ssCR}@anchor{3a8} +@deffn {C++ Function} gccjit::@ref{381,,extended_asm} &gccjit::@ref{381,,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 @@ -15163,7 +15336,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{3a5} +@anchor{cp/topics/asm adding-top-level-assembler-statements}@anchor{3a9} @subsubsection Adding top-level assembler statements @@ -15172,8 +15345,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{3a6}@anchor{cp/topics/asm _CPPv3N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3a7}@anchor{cp/topics/asm _CPPv2N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3a8}@anchor{cp/topics/asm gccjit context add_top_level_asm__cCP gccjit location}@anchor{3a9} -@deffn {C++ Function} void gccjit::@ref{165,,context}::add_top_level_asm (const char *asm_stmts, gccjit::location loc = location()) +@anchor{cp/topics/asm _CPPv4N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3aa}@anchor{cp/topics/asm _CPPv3N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3ab}@anchor{cp/topics/asm _CPPv2N6gccjit7context17add_top_level_asmEPKcN6gccjit8locationE}@anchor{3ac}@anchor{cp/topics/asm gccjit context add_top_level_asm__cCP gccjit location}@anchor{3ad} +@deffn {C++ Function} void gccjit::@ref{169,,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. @@ -15224,7 +15397,7 @@ the following API calls could be used: @c . @node Internals,Indices and tables,C++ bindings for libgccjit,Top -@anchor{internals/index doc}@anchor{3aa}@anchor{internals/index internals}@anchor{3ab} +@anchor{internals/index doc}@anchor{3ae}@anchor{internals/index internals}@anchor{3af} @chapter Internals @@ -15240,7 +15413,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{3ac} +@anchor{internals/index working-on-the-jit-library}@anchor{3b0} @section Working on the JIT library @@ -15273,7 +15446,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{3ad} +@anchor{internals/index cmdoption-enable-host-shared}@anchor{3b1} @deffn {Option} @w{-}@w{-}enable@w{-}host@w{-}shared Configuring with this option means that the compiler is built as @@ -15282,7 +15455,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{3ae} +@anchor{internals/index cmdoption-enable-languages}@anchor{3b2} @deffn {Option} @w{-}@w{-}enable@w{-}languages=jit,c++ This specifies which frontends to build. The JIT library looks like @@ -15299,7 +15472,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{3af} +@anchor{internals/index cmdoption-disable-bootstrap}@anchor{3b3} @deffn {Option} @w{-}@w{-}disable@w{-}bootstrap For hacking on the “jit” subdirectory, performing a full @@ -15309,7 +15482,7 @@ the compiler can still bootstrap itself. @end deffn @geindex command line option; --enable-checking=release -@anchor{internals/index cmdoption-enable-checking}@anchor{3b0} +@anchor{internals/index cmdoption-enable-checking}@anchor{3b4} @deffn {Option} @w{-}@w{-}enable@w{-}checking=release The compile can perform extensive self-checking as it runs, useful when @@ -15320,7 +15493,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{3b1} +@anchor{internals/index running-the-test-suite}@anchor{3b5} @section Running the test suite @@ -15378,7 +15551,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{3b2} +@anchor{internals/index running-under-valgrind}@anchor{3b6} @subsection Running under valgrind @@ -15427,7 +15600,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{3b3} +@anchor{internals/index environment-variables}@anchor{3b7} @section Environment variables @@ -15435,7 +15608,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{3b4} +@anchor{internals/index envvar-LD_LIBRARY_PATH}@anchor{3b8} @deffn {Environment Variable} LD_LIBRARY_PATH @quotation @@ -15455,7 +15628,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{3b5} +@anchor{internals/index envvar-PATH}@anchor{3b9} @deffn {Environment Variable} PATH The library uses a driver executable for converting from .s assembler @@ -15474,7 +15647,7 @@ of development. @end deffn @geindex environment variable; LIBRARY_PATH -@anchor{internals/index envvar-LIBRARY_PATH}@anchor{3b6} +@anchor{internals/index envvar-LIBRARY_PATH}@anchor{3ba} @deffn {Environment Variable} LIBRARY_PATH The driver executable invokes the linker, and the latter needs to locate @@ -15506,11 +15679,11 @@ hello world @end example @node Packaging notes,Overview of code structure,Environment variables,Internals -@anchor{internals/index packaging-notes}@anchor{3b7} +@anchor{internals/index packaging-notes}@anchor{3bb} @section Packaging notes -The configure-time option @ref{3ad,,--enable-host-shared} is needed when +The configure-time option @ref{3b1,,--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: @@ -15521,10 +15694,10 @@ with libgccjit, please configure and build twice: @itemize * @item -once without @ref{3ad,,--enable-host-shared} for most languages, and +once without @ref{3b1,,--enable-host-shared} for most languages, and @item -once with @ref{3ad,,--enable-host-shared} for the jit +once with @ref{3b1,,--enable-host-shared} for the jit @end itemize @end quotation @@ -15566,7 +15739,7 @@ popd @end example @node Overview of code structure,Design notes,Packaging notes,Internals -@anchor{internals/index overview-of-code-structure}@anchor{3b8} +@anchor{internals/index overview-of-code-structure}@anchor{3bc} @section Overview of code structure @@ -16035,7 +16208,7 @@ JIT: gcc::jit::logger::~logger() @end example @node Design notes,Submitting patches,Overview of code structure,Internals -@anchor{internals/index design-notes}@anchor{3b9} +@anchor{internals/index design-notes}@anchor{3bd} @section Design notes @@ -16048,7 +16221,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{3ba} +@anchor{internals/index submitting-patches}@anchor{3be} @section Submitting patches @@ -16182,7 +16355,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{3bb} +@anchor{index indices-and-tables}@anchor{3bf} @unnumbered Indices and tables diff --git a/gcc/jit/docs/topics/compatibility.rst b/gcc/jit/docs/topics/compatibility.rst index 03e3f34..297104a 100644 --- a/gcc/jit/docs/topics/compatibility.rst +++ b/gcc/jit/docs/topics/compatibility.rst @@ -314,3 +314,23 @@ of a global with an rvalue and to use constructors: * :func:`gcc_jit_context_new_struct_constructor` * :func:`gcc_jit_context_new_union_constructor` * :func:`gcc_jit_global_set_initializer_rvalue` + +.. _LIBGCCJIT_ABI_20: + +``LIBGCCJIT_ABI_20`` +----------------------- +``LIBGCCJIT_ABI_20`` covers the addition of sized integer types, including +128-bit integers and helper functions for types: + + * :func:`gcc_jit_compatible_types` + * :func:`gcc_jit_type_get_size` + * :c:macro:`GCC_JIT_TYPE_UINT8_T` + * :c:macro:`GCC_JIT_TYPE_UINT16_T` + * :c:macro:`GCC_JIT_TYPE_UINT32_T` + * :c:macro:`GCC_JIT_TYPE_UINT64_T` + * :c:macro:`GCC_JIT_TYPE_UINT128_T` + * :c:macro:`GCC_JIT_TYPE_INT8_T` + * :c:macro:`GCC_JIT_TYPE_INT16_T` + * :c:macro:`GCC_JIT_TYPE_INT32_T` + * :c:macro:`GCC_JIT_TYPE_INT64_T` + * :c:macro:`GCC_JIT_TYPE_INT128_T` diff --git a/gcc/jit/docs/topics/types.rst b/gcc/jit/docs/topics/types.rst index c2082c0..db7fac6 100644 --- a/gcc/jit/docs/topics/types.rst +++ b/gcc/jit/docs/topics/types.rst @@ -76,6 +76,16 @@ Standard types :c:data:`GCC_JIT_TYPE_UNSIGNED_LONG` C's ``unsigned long`` :c:data:`GCC_JIT_TYPE_LONG_LONG` C99's ``long long`` (signed) :c:data:`GCC_JIT_TYPE_UNSIGNED_LONG_LONG` C99's ``unsigned long long`` + :c:data:`GCC_JIT_TYPE_UINT8_T` C99's ``uint8_t`` + :c:data:`GCC_JIT_TYPE_UINT16_T` C99's ``uint16_t`` + :c:data:`GCC_JIT_TYPE_UINT32_T` C99's ``uint32_t`` + :c:data:`GCC_JIT_TYPE_UINT64_T` C99's ``uint64_t`` + :c:data:`GCC_JIT_TYPE_UINT128_T` C99's ``__uint128_t`` + :c:data:`GCC_JIT_TYPE_INT8_T` C99's ``int8_t`` + :c:data:`GCC_JIT_TYPE_INT16_T` C99's ``int16_t`` + :c:data:`GCC_JIT_TYPE_INT32_T` C99's ``int32_t`` + :c:data:`GCC_JIT_TYPE_INT64_T` C99's ``int64_t`` + :c:data:`GCC_JIT_TYPE_INT128_T` C99's ``__int128_t`` :c:data:`GCC_JIT_TYPE_FLOAT` :c:data:`GCC_JIT_TYPE_DOUBLE` :c:data:`GCC_JIT_TYPE_LONG_DOUBLE` @@ -467,3 +477,34 @@ Reflection API #ifdef LIBGCCJIT_HAVE_REFLECTION .. type:: gcc_jit_case + +.. function:: int\ + gcc_jit_compatible_types (gcc_jit_type *ltype,\ + gcc_jit_type *rtype) + + Return non-zero if the two types are compatible. For instance, + if :c:data:`GCC_JIT_TYPE_UINT64_T` and :c:data:`GCC_JIT_TYPE_UNSIGNED_LONG` + are the same size on the target, this will return non-zero. + The parameters ``ltype`` and ``rtype`` must be non-NULL. + Return 0 on errors. + + This entrypoint was added in :ref:`LIBGCCJIT_ABI_20`; you can test for + its presence using + + .. code-block:: c + + #ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS + +.. function:: ssize_t\ + gcc_jit_type_get_size (gcc_jit_type *type) + + Return the size of a type, in bytes. It only works on integer types for now. + The parameter ``type`` must be non-NULL. + Return -1 on errors. + + This entrypoint was added in :ref:`LIBGCCJIT_ABI_20`; you can test for + its presence using + + .. code-block:: c + + #ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc index 71c38eb..b949b73 100644 --- a/gcc/jit/jit-builtins.cc +++ b/gcc/jit/jit-builtins.cc @@ -483,6 +483,7 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id) case BT_UINT16: return m_ctxt->get_int_type (2, false); case BT_UINT32: return m_ctxt->get_int_type (4, false); case BT_UINT64: return m_ctxt->get_int_type (8, false); + case BT_UINT128: return m_ctxt->get_int_type (16, false); // case BT_WORD: // case BT_UNWINDWORD: case BT_FLOAT: return m_ctxt->get_type (GCC_JIT_TYPE_FLOAT); diff --git a/gcc/jit/jit-common.h b/gcc/jit/jit-common.h index 1a8cd8b..8c52ddf 100644 --- a/gcc/jit/jit-common.h +++ b/gcc/jit/jit-common.h @@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see #endif #endif -const int NUM_GCC_JIT_TYPES = GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE + 1; +const int NUM_GCC_JIT_TYPES = GCC_JIT_TYPE_INT128_T + 1; /* This comment is included by the docs. diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index d1835c7..3133d30 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -237,6 +237,38 @@ get_tree_node_for_type (enum gcc_jit_types type_) case GCC_JIT_TYPE_UNSIGNED_INT: return unsigned_type_node; + case GCC_JIT_TYPE_UINT8_T: + return unsigned_intQI_type_node; + case GCC_JIT_TYPE_UINT16_T: + return uint16_type_node; + case GCC_JIT_TYPE_UINT32_T: + return uint32_type_node; + case GCC_JIT_TYPE_UINT64_T: + return uint64_type_node; + case GCC_JIT_TYPE_UINT128_T: + if (targetm.scalar_mode_supported_p (TImode)) + return uint128_type_node; + + add_error (NULL, "gcc_jit_types value unsupported on this target: %i", + type_); + return NULL; + + case GCC_JIT_TYPE_INT8_T: + return intQI_type_node; + case GCC_JIT_TYPE_INT16_T: + return intHI_type_node; + case GCC_JIT_TYPE_INT32_T: + return intSI_type_node; + case GCC_JIT_TYPE_INT64_T: + return intDI_type_node; + case GCC_JIT_TYPE_INT128_T: + if (targetm.scalar_mode_supported_p (TImode)) + return intTI_type_node; + + add_error (NULL, "gcc_jit_types value unsupported on this target: %i", + type_); + return NULL; + case GCC_JIT_TYPE_LONG: return long_integer_type_node; case GCC_JIT_TYPE_UNSIGNED_LONG: @@ -268,6 +300,9 @@ get_tree_node_for_type (enum gcc_jit_types type_) return complex_long_double_type_node; } + add_error (NULL, "unrecognized (enum gcc_jit_types) value: %i", + type_); + return NULL; } @@ -280,10 +315,7 @@ get_type (enum gcc_jit_types type_) { tree type_node = get_tree_node_for_type (type_); if (type_node == NULL) - { - add_error (NULL, "unrecognized (enum gcc_jit_types) value: %i", type_); - return NULL; - } + return NULL; return new type (type_node); } diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 1e3fadf..4ffdad0 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -822,6 +822,10 @@ recording::context::get_int_type (int num_bytes, int is_signed) return get_type (is_signed ? GCC_JIT_TYPE_LONG_LONG : GCC_JIT_TYPE_UNSIGNED_LONG_LONG); + if (num_bits == 128) + return get_type (is_signed + ? GCC_JIT_TYPE_INT128_T + : GCC_JIT_TYPE_UINT128_T); /* Some other size, not corresponding to the C int types. */ /* To be written: support arbitrary other sizes, sharing by @@ -2325,6 +2329,26 @@ recording::memento_of_get_type::get_size () case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: size = LONG_LONG_TYPE_SIZE; break; + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_INT8_T: + size = 8; + break; + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_INT16_T: + size = 16; + break; + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_INT32_T: + size = 32; + break; + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_INT64_T: + size = 64; + break; + case GCC_JIT_TYPE_UINT128_T: + case GCC_JIT_TYPE_INT128_T: + size = 128; + break; case GCC_JIT_TYPE_FLOAT: size = FLOAT_TYPE_SIZE; break; @@ -2334,6 +2358,9 @@ recording::memento_of_get_type::get_size () case GCC_JIT_TYPE_LONG_DOUBLE: size = LONG_DOUBLE_TYPE_SIZE; break; + case GCC_JIT_TYPE_SIZE_T: + size = MAX_BITS_PER_WORD; + break; default: /* As this function is called by 'gcc_jit_global_set_initializer' and @@ -2373,6 +2400,16 @@ recording::memento_of_get_type::dereference () case GCC_JIT_TYPE_UNSIGNED_LONG: case GCC_JIT_TYPE_LONG_LONG: case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_UINT128_T: + case GCC_JIT_TYPE_INT8_T: + case GCC_JIT_TYPE_INT16_T: + case GCC_JIT_TYPE_INT32_T: + case GCC_JIT_TYPE_INT64_T: + case GCC_JIT_TYPE_INT128_T: case GCC_JIT_TYPE_FLOAT: case GCC_JIT_TYPE_DOUBLE: case GCC_JIT_TYPE_LONG_DOUBLE: @@ -2425,6 +2462,16 @@ recording::memento_of_get_type::is_int () const case GCC_JIT_TYPE_UNSIGNED_LONG: case GCC_JIT_TYPE_LONG_LONG: case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_UINT128_T: + case GCC_JIT_TYPE_INT8_T: + case GCC_JIT_TYPE_INT16_T: + case GCC_JIT_TYPE_INT32_T: + case GCC_JIT_TYPE_INT64_T: + case GCC_JIT_TYPE_INT128_T: return true; case GCC_JIT_TYPE_FLOAT: @@ -2448,6 +2495,60 @@ recording::memento_of_get_type::is_int () const } } +/* Implementation of pure virtual hook recording::type::is_signed for + recording::memento_of_get_type. */ + +bool +recording::memento_of_get_type::is_signed () const +{ + switch (m_kind) + { + default: gcc_unreachable (); + + case GCC_JIT_TYPE_SIGNED_CHAR: + case GCC_JIT_TYPE_CHAR: + case GCC_JIT_TYPE_SHORT: + case GCC_JIT_TYPE_INT: + case GCC_JIT_TYPE_LONG: + case GCC_JIT_TYPE_LONG_LONG: + case GCC_JIT_TYPE_INT8_T: + case GCC_JIT_TYPE_INT16_T: + case GCC_JIT_TYPE_INT32_T: + case GCC_JIT_TYPE_INT64_T: + case GCC_JIT_TYPE_INT128_T: + return true; + + case GCC_JIT_TYPE_VOID: + case GCC_JIT_TYPE_VOID_PTR: + case GCC_JIT_TYPE_BOOL: + case GCC_JIT_TYPE_UNSIGNED_CHAR: + case GCC_JIT_TYPE_UNSIGNED_SHORT: + case GCC_JIT_TYPE_UNSIGNED_INT: + case GCC_JIT_TYPE_UNSIGNED_LONG: + case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_UINT128_T: + + case GCC_JIT_TYPE_FLOAT: + case GCC_JIT_TYPE_DOUBLE: + case GCC_JIT_TYPE_LONG_DOUBLE: + + case GCC_JIT_TYPE_CONST_CHAR_PTR: + + case GCC_JIT_TYPE_SIZE_T: + + case GCC_JIT_TYPE_FILE_PTR: + + case GCC_JIT_TYPE_COMPLEX_FLOAT: + case GCC_JIT_TYPE_COMPLEX_DOUBLE: + case GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE: + return false; + } +} + /* Implementation of pure virtual hook recording::type::is_float for recording::memento_of_get_type. */ @@ -2478,6 +2579,16 @@ recording::memento_of_get_type::is_float () const case GCC_JIT_TYPE_UNSIGNED_LONG: case GCC_JIT_TYPE_LONG_LONG: case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_UINT128_T: + case GCC_JIT_TYPE_INT8_T: + case GCC_JIT_TYPE_INT16_T: + case GCC_JIT_TYPE_INT32_T: + case GCC_JIT_TYPE_INT64_T: + case GCC_JIT_TYPE_INT128_T: return false; case GCC_JIT_TYPE_FLOAT: @@ -2531,6 +2642,16 @@ recording::memento_of_get_type::is_bool () const case GCC_JIT_TYPE_UNSIGNED_LONG: case GCC_JIT_TYPE_LONG_LONG: case GCC_JIT_TYPE_UNSIGNED_LONG_LONG: + case GCC_JIT_TYPE_UINT8_T: + case GCC_JIT_TYPE_UINT16_T: + case GCC_JIT_TYPE_UINT32_T: + case GCC_JIT_TYPE_UINT64_T: + case GCC_JIT_TYPE_UINT128_T: + case GCC_JIT_TYPE_INT8_T: + case GCC_JIT_TYPE_INT16_T: + case GCC_JIT_TYPE_INT32_T: + case GCC_JIT_TYPE_INT64_T: + case GCC_JIT_TYPE_INT128_T: return false; case GCC_JIT_TYPE_FLOAT: @@ -2601,7 +2722,18 @@ static const char * const get_type_strings[] = { "complex float", /* GCC_JIT_TYPE_COMPLEX_FLOAT */ "complex double", /* GCC_JIT_TYPE_COMPLEX_DOUBLE */ - "complex long double" /* GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE */ + "complex long double", /* GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE */ + + "__uint8_t", /* GCC_JIT_TYPE_UINT8_T */ + "__uint16_t", /* GCC_JIT_TYPE_UINT16_T */ + "__uint32_t", /* GCC_JIT_TYPE_UINT32_T */ + "__uint64_t", /* GCC_JIT_TYPE_UINT64_T */ + "__uint128_t", /* GCC_JIT_TYPE_UINT128_T */ + "__int8_t", /* GCC_JIT_TYPE_INT8_T */ + "__int16_t", /* GCC_JIT_TYPE_INT16_T */ + "__int32_t", /* GCC_JIT_TYPE_INT32_T */ + "__int64_t", /* GCC_JIT_TYPE_INT64_T */ + "__int128_t", /* GCC_JIT_TYPE_INT128_T */ }; @@ -2637,7 +2769,17 @@ static const char * const get_type_enum_strings[] = { "GCC_JIT_TYPE_FILE_PTR", "GCC_JIT_TYPE_COMPLEX_FLOAT", "GCC_JIT_TYPE_COMPLEX_DOUBLE", - "GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE" + "GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE", + "GCC_JIT_TYPE_UINT8_T", + "GCC_JIT_TYPE_UINT16_T", + "GCC_JIT_TYPE_UINT32_T", + "GCC_JIT_TYPE_UINT64_T", + "GCC_JIT_TYPE_UINT128_T", + "GCC_JIT_TYPE_INT8_T", + "GCC_JIT_TYPE_INT16_T", + "GCC_JIT_TYPE_INT32_T", + "GCC_JIT_TYPE_INT64_T", + "GCC_JIT_TYPE_INT128_T", }; void diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h index 846d65c..cf668e7 100644 --- a/gcc/jit/jit-recording.h +++ b/gcc/jit/jit-recording.h @@ -564,6 +564,7 @@ public: virtual bool is_void () const { return false; } virtual vector_type *is_vector () { return NULL; } virtual bool has_known_size () const { return true; } + virtual bool is_signed () const = 0; bool is_numeric () const { @@ -604,12 +605,21 @@ public: bool accepts_writes_from (type *rtype) FINAL OVERRIDE { if (m_kind == GCC_JIT_TYPE_VOID_PTR) - if (rtype->is_pointer ()) - { - /* LHS (this) is type (void *), and the RHS is a pointer: - accept it: */ - return true; - } + { + if (rtype->is_pointer ()) + { + /* LHS (this) is type (void *), and the RHS is a pointer: + accept it: */ + return true; + } + } else if (is_int () + && rtype->is_int () + && get_size () == rtype->get_size () + && is_signed () == rtype->is_signed ()) + { + /* LHS (this) is an integer of the same size and sign as rtype. */ + return true; + } return type::accepts_writes_from (rtype); } @@ -620,6 +630,7 @@ public: type *is_pointer () FINAL OVERRIDE { return dereference (); } type *is_array () FINAL OVERRIDE { return NULL; } bool is_void () const FINAL OVERRIDE { return m_kind == GCC_JIT_TYPE_VOID; } + bool is_signed () const FINAL OVERRIDE; public: void replay_into (replayer *r) FINAL OVERRIDE; @@ -653,6 +664,7 @@ public: bool is_bool () const FINAL OVERRIDE { return false; } type *is_pointer () FINAL OVERRIDE { return m_other_type; } type *is_array () FINAL OVERRIDE { return NULL; } + bool is_signed () const FINAL OVERRIDE { return false; } private: string * make_debug_string () FINAL OVERRIDE; @@ -674,12 +686,15 @@ public: type *dereference () FINAL OVERRIDE { return m_other_type->dereference (); } + size_t get_size () FINAL OVERRIDE { return m_other_type->get_size (); }; + bool is_int () const FINAL OVERRIDE { return m_other_type->is_int (); } bool is_float () const FINAL OVERRIDE { return m_other_type->is_float (); } bool is_bool () const FINAL OVERRIDE { return m_other_type->is_bool (); } type *is_pointer () FINAL OVERRIDE { return m_other_type->is_pointer (); } type *is_array () FINAL OVERRIDE { return m_other_type->is_array (); } struct_ *is_struct () FINAL OVERRIDE { return m_other_type->is_struct (); } + bool is_signed () const FINAL OVERRIDE { return m_other_type->is_signed (); } protected: type *m_other_type; @@ -811,6 +826,7 @@ class array_type : public type type *is_pointer () FINAL OVERRIDE { return NULL; } type *is_array () FINAL OVERRIDE { return m_element_type; } int num_elements () { return m_num_elements; } + bool is_signed () const FINAL OVERRIDE { return false; } void replay_into (replayer *) FINAL OVERRIDE; @@ -844,6 +860,7 @@ public: bool is_bool () const FINAL OVERRIDE { return false; } type *is_pointer () FINAL OVERRIDE { return NULL; } type *is_array () FINAL OVERRIDE { return NULL; } + bool is_signed () const FINAL OVERRIDE { return false; } void replay_into (replayer *) FINAL OVERRIDE; @@ -957,6 +974,7 @@ public: bool is_bool () const FINAL OVERRIDE { return false; } type *is_pointer () FINAL OVERRIDE { return NULL; } type *is_array () FINAL OVERRIDE { return NULL; } + bool is_signed () const FINAL OVERRIDE { return false; } bool has_known_size () const FINAL OVERRIDE { return m_fields != NULL; } diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc index 4c352e8..44395d7 100644 --- a/gcc/jit/libgccjit.cc +++ b/gcc/jit/libgccjit.cc @@ -352,6 +352,17 @@ compatible_types (gcc::jit::recording::type *ltype, return ltype->accepts_writes_from (rtype); } +/* Public entrypoint wrapping compatible_types. */ + +int +gcc_jit_compatible_types (gcc_jit_type *ltype, + gcc_jit_type *rtype) +{ + RETURN_VAL_IF_FAIL (ltype, 0, NULL, NULL, "NULL ltype"); + RETURN_VAL_IF_FAIL (rtype, 0, NULL, NULL, "NULL rtype"); + return compatible_types (ltype, rtype); +} + /* Public entrypoint for acquiring a gcc_jit_context. Note that this creates a new top-level context; contrast with gcc_jit_context_new_child_context below. @@ -456,7 +467,7 @@ gcc_jit_context_get_type (gcc_jit_context *ctxt, JIT_LOG_FUNC (ctxt->get_logger ()); RETURN_NULL_IF_FAIL_PRINTF1 ( (type >= GCC_JIT_TYPE_VOID - && type <= GCC_JIT_TYPE_FILE_PTR), + && type < NUM_GCC_JIT_TYPES), ctxt, NULL, "unrecognized value for enum gcc_jit_types: %i", type); @@ -526,6 +537,22 @@ gcc_jit_type_get_volatile (gcc_jit_type *type) /* Public entrypoint. See description in libgccjit.h. After error-checking, the real work is done by the + gcc::jit::recording::type::get_size method, in + jit-recording.cc. */ + +ssize_t +gcc_jit_type_get_size (gcc_jit_type *type) +{ + RETURN_VAL_IF_FAIL (type, -1, NULL, NULL, "NULL type"); + RETURN_VAL_IF_FAIL + (type->is_int (), -1, NULL, NULL, + "only getting the size of an integer type is supported for now"); + return type->get_size (); +} + +/* Public entrypoint. See description in libgccjit.h. + + After error-checking, the real work is done by the gcc::jit::recording::type::is_array method, in jit-recording.cc. */ @@ -2119,7 +2146,8 @@ gcc_jit_context_new_binary_op (gcc_jit_context *ctxt, RETURN_NULL_IF_FAIL (a, ctxt, loc, "NULL a"); RETURN_NULL_IF_FAIL (b, ctxt, loc, "NULL b"); RETURN_NULL_IF_FAIL_PRINTF4 ( - a->get_type ()->unqualified () == b->get_type ()->unqualified (), + compatible_types (a->get_type ()->unqualified (), + b->get_type ()->unqualified ()), ctxt, loc, "mismatching types for binary op:" " a: %s (type: %s) b: %s (type: %s)", diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 95d60f8..5d3f5d5 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -574,8 +574,19 @@ enum gcc_jit_types /* Complex numbers. */ GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE, - GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE - + GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE, + + /* Sized integer types. */ + GCC_JIT_TYPE_UINT8_T, + GCC_JIT_TYPE_UINT16_T, + GCC_JIT_TYPE_UINT32_T, + GCC_JIT_TYPE_UINT64_T, + GCC_JIT_TYPE_UINT128_T, + GCC_JIT_TYPE_INT8_T, + GCC_JIT_TYPE_INT16_T, + GCC_JIT_TYPE_INT32_T, + GCC_JIT_TYPE_INT64_T, + GCC_JIT_TYPE_INT128_T }; extern gcc_jit_type * @@ -601,6 +612,23 @@ gcc_jit_type_get_const (gcc_jit_type *type); extern gcc_jit_type * gcc_jit_type_get_volatile (gcc_jit_type *type); +#define LIBGCCJIT_HAVE_SIZED_INTEGERS + +/* Given types LTYPE and RTYPE, return non-zero if they are compatible. + This API entrypoint was added in LIBGCCJIT_ABI_20; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS */ +extern int +gcc_jit_compatible_types (gcc_jit_type *ltype, + gcc_jit_type *rtype); + +/* Given type "T", get its size. + This API entrypoint was added in LIBGCCJIT_ABI_20; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS */ +extern ssize_t +gcc_jit_type_get_size (gcc_jit_type *type); + /* Given type "T", get type "T[N]" (for a constant N). */ extern gcc_jit_type * gcc_jit_context_new_array_type (gcc_jit_context *ctxt, diff --git a/gcc/jit/libgccjit.map b/gcc/jit/libgccjit.map index f373fd3..1c00278 100644 --- a/gcc/jit/libgccjit.map +++ b/gcc/jit/libgccjit.map @@ -243,3 +243,9 @@ LIBGCCJIT_ABI_19 { gcc_jit_context_new_union_constructor; gcc_jit_global_set_initializer_rvalue; } LIBGCCJIT_ABI_18; + +LIBGCCJIT_ABI_20 { + global: + gcc_jit_compatible_types; + gcc_jit_type_get_size; +} LIBGCCJIT_ABI_19; diff --git a/gcc/testsuite/jit.dg/test-types.c b/gcc/testsuite/jit.dg/test-types.c index 8debcd7..6836597 100644 --- a/gcc/testsuite/jit.dg/test-types.c +++ b/gcc/testsuite/jit.dg/test-types.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -29,6 +30,21 @@ struct zoo long long m_long_long; unsigned long long m_unsigned_long_long; + uint8_t m_u8; + uint16_t m_u16; + uint32_t m_u32; + uint64_t m_u64; + + int8_t m_i8; + int16_t m_i16; + int32_t m_i32; + int64_t m_i64; + +#ifdef __SIZEOF_INT128__ + __uint128_t m_u128; + __int128_t m_i128; +#endif + int m_sized_int_type; float m_float; @@ -101,6 +117,31 @@ create_code (gcc_jit_context *ctxt, void *user_data) gcc_jit_field *field_m_unsigned_long_long = CREATE_FIELD (GCC_JIT_TYPE_UNSIGNED_LONG_LONG, "m_unsigned_long_long"); + gcc_jit_field *field_m_u8 = + CREATE_FIELD (GCC_JIT_TYPE_UINT8_T, "m_u8"); + gcc_jit_field *field_m_u16 = + CREATE_FIELD (GCC_JIT_TYPE_UINT16_T, "m_u16"); + gcc_jit_field *field_m_u32 = + CREATE_FIELD (GCC_JIT_TYPE_UINT32_T, "m_u32"); + gcc_jit_field *field_m_u64 = + CREATE_FIELD (GCC_JIT_TYPE_UINT64_T, "m_u64"); + + gcc_jit_field *field_m_i8 = + CREATE_FIELD (GCC_JIT_TYPE_INT8_T, "m_i8"); + gcc_jit_field *field_m_i16 = + CREATE_FIELD (GCC_JIT_TYPE_INT16_T, "m_i16"); + gcc_jit_field *field_m_i32 = + CREATE_FIELD (GCC_JIT_TYPE_INT32_T, "m_i32"); + gcc_jit_field *field_m_i64 = + CREATE_FIELD (GCC_JIT_TYPE_INT64_T, "m_i64"); + +#ifdef __SIZEOF_INT128__ + gcc_jit_field *field_m_u128 = + CREATE_FIELD (GCC_JIT_TYPE_UINT128_T, "m_u128"); + gcc_jit_field *field_m_i128 = + CREATE_FIELD (GCC_JIT_TYPE_INT128_T, "m_i128"); +#endif + /* Signed int type with sizeof (int): */ gcc_jit_type *sized_int_type = gcc_jit_context_get_int_type (ctxt, sizeof (int), 1); @@ -147,6 +188,21 @@ create_code (gcc_jit_context *ctxt, void *user_data) field_m_long_long, field_m_unsigned_long_long, + field_m_u8, + field_m_u16, + field_m_u32, + field_m_u64, + + field_m_i8, + field_m_i16, + field_m_i32, + field_m_i64, + +#ifdef __SIZEOF_INT128__ + field_m_u128, + field_m_i128, +#endif + field_m_sized_int_type, field_m_float, @@ -266,6 +322,61 @@ create_code (gcc_jit_context *ctxt, void *user_data) gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UNSIGNED_LONG_LONG), 123456789)) + ASSIGN(field_m_u8, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UINT8_T), + 123)) + ASSIGN(field_m_u16, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UINT16_T), + 12345)) + ASSIGN(field_m_u32, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UINT32_T), + 123456789)) + ASSIGN(field_m_u64, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UINT64_T), + 123456789)) + + ASSIGN(field_m_i8, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT8_T), + -1)) + ASSIGN(field_m_i16, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT16_T), + -2)) + ASSIGN(field_m_i32, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT32_T), + -3)) + ASSIGN(field_m_i64, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT64_T), + -4)) + +#ifdef __SIZEOF_INT128__ + ASSIGN(field_m_u128, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_UINT128_T), + 123456789)) + ASSIGN(field_m_i128, + gcc_jit_context_new_rvalue_from_int ( + ctxt, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT128_T), + -5)) +#endif + ASSIGN(field_m_sized_int_type, gcc_jit_context_new_rvalue_from_int ( ctxt, @@ -347,6 +458,21 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result) CHECK_VALUE (z.m_long_long, -42); CHECK_VALUE (z.m_unsigned_long_long, 123456789); + CHECK_VALUE (z.m_u8, 123); + CHECK_VALUE (z.m_u16, 12345); + CHECK_VALUE (z.m_u32, 123456789); + CHECK_VALUE (z.m_u64, 123456789); + + CHECK_VALUE (z.m_i8, -1); + CHECK_VALUE (z.m_i16, -2); + CHECK_VALUE (z.m_i32, -3); + CHECK_VALUE (z.m_i64, -4); + +#ifdef __SIZEOF_INT128__ + CHECK_VALUE (z.m_u128, 123456789); + CHECK_VALUE (z.m_i128, -5); +#endif + CHECK_VALUE (z.m_sized_int_type, 500); CHECK_VALUE (z.m_float, 3.141f); @@ -358,4 +484,9 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result) CHECK_VALUE (z.m_size_t, sizeof (struct zoo)); CHECK_VALUE (z.m_FILE_ptr, stderr); + + if (sizeof(long) == 8) + CHECK (gcc_jit_compatible_types ( + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_LONG), + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT64_T))); }