]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gccint/gimple/tuple-specific-accessors/gimpleasm.rst
082b6dcfa201f946a42bd83e0389dbce4795121c
[thirdparty/gcc.git] / gcc / doc / gccint / gimple / tuple-specific-accessors / gimpleasm.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: GIMPLE_ASM
7
8 GIMPLE_ASM
9 ^^^^^^^^^^
10
11 .. function:: gasm *gimple_build_asm_vec ( const char *string, vec<tree, va_gc> *inputs, vec<tree, va_gc> *outputs, vec<tree, va_gc> *clobbers, vec<tree, va_gc> *labels)
12
13 Build a ``GIMPLE_ASM`` statement. This statement is used for
14 building in-line assembly constructs. ``STRING`` is the assembly
15 code. ``INPUTS``, ``OUTPUTS``, ``CLOBBERS`` and ``LABELS``
16 are the inputs, outputs, clobbered registers and labels.
17
18 .. function:: unsigned gimple_asm_ninputs (const gasm *g)
19
20 Return the number of input operands for ``GIMPLE_ASM`` ``G``.
21
22 .. function:: unsigned gimple_asm_noutputs (const gasm *g)
23
24 Return the number of output operands for ``GIMPLE_ASM`` ``G``.
25
26 .. function:: unsigned gimple_asm_nclobbers (const gasm *g)
27
28 Return the number of clobber operands for ``GIMPLE_ASM`` ``G``.
29
30 .. function:: tree gimple_asm_input_op (const gasm *g, unsigned index)
31
32 Return input operand ``INDEX`` of ``GIMPLE_ASM`` ``G``.
33
34 .. function:: void gimple_asm_set_input_op (gasm *g, unsigned index, tree in_op)
35
36 Set ``IN_OP`` to be input operand ``INDEX`` in ``GIMPLE_ASM`` ``G``.
37
38 .. function:: tree gimple_asm_output_op (const gasm *g, unsigned index)
39
40 Return output operand ``INDEX`` of ``GIMPLE_ASM`` ``G``.
41
42 .. function:: void gimple_asm_set_output_op (gasm *g, unsigned index, tree out_op)
43
44 Set ``OUT_OP`` to be output operand ``INDEX`` in ``GIMPLE_ASM`` ``G``.
45
46 .. function:: tree gimple_asm_clobber_op (const gasm *g, unsigned index)
47
48 Return clobber operand ``INDEX`` of ``GIMPLE_ASM`` ``G``.
49
50 .. function:: void gimple_asm_set_clobber_op (gasm *g, unsigned index, tree clobber_op)
51
52 Set ``CLOBBER_OP`` to be clobber operand ``INDEX`` in ``GIMPLE_ASM`` ``G``.
53
54 .. function:: const char * gimple_asm_string (const gasm *g)
55
56 Return the string representing the assembly instruction in
57 ``GIMPLE_ASM`` ``G``.
58
59 .. function:: bool gimple_asm_volatile_p (const gasm *g)
60
61 Return true if ``G`` is an asm statement marked volatile.
62
63 .. function:: void gimple_asm_set_volatile (gasm *g, bool volatile_p)
64
65 Mark asm statement ``G`` as volatile or non-volatile based on
66 ``VOLATILE_P``.