2.4.1.4 Unary Operations

C Function: gcc_jit_rvalue * gcc_jit_context_new_unary_op (gcc_jit_context *ctxt, gcc_jit_location *loc, enum gcc_jit_unary_op op, gcc_jit_type *result_type, gcc_jit_rvalue *rvalue)

Build a unary operation out of an input rvalue.

The parameter result_type must be a numeric type.

C Type: enum gcc_jit_unary_op

The available unary operations are:

Unary OperationC equivalent
GCC_JIT_UNARY_OP_MINUS-(EXPR)
GCC_JIT_UNARY_OP_BITWISE_NEGATE~(EXPR)
GCC_JIT_UNARY_OP_LOGICAL_NEGATE!(EXPR)
GCC_JIT_UNARY_OP_ABSabs (EXPR)
C Macro: GCC_JIT_UNARY_OP_MINUS

Negate an arithmetic value; analogous to:

-(EXPR)

in C.

C Macro: GCC_JIT_UNARY_OP_BITWISE_NEGATE

Bitwise negation of an integer value (one’s complement); analogous to:

~(EXPR)

in C.

C Macro: GCC_JIT_UNARY_OP_LOGICAL_NEGATE

Logical negation of an arithmetic or pointer value; analogous to:

!(EXPR)

in C.

C Macro: GCC_JIT_UNARY_OP_ABS

Absolute value of an arithmetic expression; analogous to:

abs (EXPR)

in C.