Mercurial > hg > CbC > CbC_gcc
comparison gcc/jit/docs/_build/texinfo/libgccjit.texi @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
17 | 17 |
18 @c %**end of header | 18 @c %**end of header |
19 | 19 |
20 @copying | 20 @copying |
21 @quotation | 21 @quotation |
22 libgccjit 8.0.0 (experimental 20171004), October 04, 2017 | 22 libgccjit 8.0.0 (experimental 20171031), October 31, 2017 |
23 | 23 |
24 David Malcolm | 24 David Malcolm |
25 | 25 |
26 Copyright @copyright{} 2014-2017 Free Software Foundation, Inc. | 26 Copyright @copyright{} 2014-2018 Free Software Foundation, Inc. |
27 @end quotation | 27 @end quotation |
28 | 28 |
29 @end copying | 29 @end copying |
30 | 30 |
31 @titlepage | 31 @titlepage |
44 @insertcopying | 44 @insertcopying |
45 @end ifnottex | 45 @end ifnottex |
46 | 46 |
47 @c %**start of body | 47 @c %**start of body |
48 @anchor{index doc}@anchor{0} | 48 @anchor{index doc}@anchor{0} |
49 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 49 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
50 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 50 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
51 @c | 51 @c |
52 @c This is free software: you can redistribute it and/or modify it | 52 @c This is free software: you can redistribute it and/or modify it |
53 @c under the terms of the GNU General Public License as published by | 53 @c under the terms of the GNU General Public License as published by |
54 @c the Free Software Foundation, either version 3 of the License, or | 54 @c the Free Software Foundation, either version 3 of the License, or |
83 wrapper classes around the C API, to save typing. | 83 wrapper classes around the C API, to save typing. |
84 @end itemize | 84 @end itemize |
85 | 85 |
86 Contents: | 86 Contents: |
87 | 87 |
88 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 88 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
89 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 89 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
90 @c | 90 @c |
91 @c This is free software: you can redistribute it and/or modify it | 91 @c This is free software: you can redistribute it and/or modify it |
92 @c under the terms of the GNU General Public License as published by | 92 @c under the terms of the GNU General Public License as published by |
93 @c the Free Software Foundation, either version 3 of the License, or | 93 @c the Free Software Foundation, either version 3 of the License, or |
386 @node Tutorial,Topic Reference,Top,Top | 386 @node Tutorial,Topic Reference,Top,Top |
387 @anchor{intro/index libgccjit}@anchor{1}@anchor{intro/index doc}@anchor{2}@anchor{intro/index tutorial}@anchor{3} | 387 @anchor{intro/index libgccjit}@anchor{1}@anchor{intro/index doc}@anchor{2}@anchor{intro/index tutorial}@anchor{3} |
388 @chapter Tutorial | 388 @chapter Tutorial |
389 | 389 |
390 | 390 |
391 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 391 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
392 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 392 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
393 @c | 393 @c |
394 @c This is free software: you can redistribute it and/or modify it | 394 @c This is free software: you can redistribute it and/or modify it |
395 @c under the terms of the GNU General Public License as published by | 395 @c under the terms of the GNU General Public License as published by |
396 @c the Free Software Foundation, either version 3 of the License, or | 396 @c the Free Software Foundation, either version 3 of the License, or |
430 | 430 |
431 @quotation | 431 @quotation |
432 | 432 |
433 @example | 433 @example |
434 /* Smoketest example for libgccjit.so | 434 /* Smoketest example for libgccjit.so |
435 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 435 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
436 | 436 |
437 This file is part of GCC. | 437 This file is part of GCC. |
438 | 438 |
439 GCC is free software; you can redistribute it and/or modify it | 439 GCC is free software; you can redistribute it and/or modify it |
440 under the terms of the GNU General Public License as published by | 440 under the terms of the GNU General Public License as published by |
581 hello world | 581 hello world |
582 @end example | 582 @end example |
583 | 583 |
584 @noindent | 584 @noindent |
585 | 585 |
586 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 586 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
587 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 587 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
588 @c | 588 @c |
589 @c This is free software: you can redistribute it and/or modify it | 589 @c This is free software: you can redistribute it and/or modify it |
590 @c under the terms of the GNU General Public License as published by | 590 @c under the terms of the GNU General Public License as published by |
591 @c the Free Software Foundation, either version 3 of the License, or | 591 @c the Free Software Foundation, either version 3 of the License, or |
1035 | 1035 |
1036 @quotation | 1036 @quotation |
1037 | 1037 |
1038 @example | 1038 @example |
1039 /* Usage example for libgccjit.so | 1039 /* Usage example for libgccjit.so |
1040 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 1040 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
1041 | 1041 |
1042 This file is part of GCC. | 1042 This file is part of GCC. |
1043 | 1043 |
1044 GCC is free software; you can redistribute it and/or modify it | 1044 GCC is free software; you can redistribute it and/or modify it |
1045 under the terms of the GNU General Public License as published by | 1045 under the terms of the GNU General Public License as published by |
1168 result: 25 | 1168 result: 25 |
1169 @end example | 1169 @end example |
1170 | 1170 |
1171 @noindent | 1171 @noindent |
1172 | 1172 |
1173 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 1173 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
1174 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 1174 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
1175 @c | 1175 @c |
1176 @c This is free software: you can redistribute it and/or modify it | 1176 @c This is free software: you can redistribute it and/or modify it |
1177 @c under the terms of the GNU General Public License as published by | 1177 @c under the terms of the GNU General Public License as published by |
1178 @c the Free Software Foundation, either version 3 of the License, or | 1178 @c the Free Software Foundation, either version 3 of the License, or |
1649 | 1649 |
1650 @quotation | 1650 @quotation |
1651 | 1651 |
1652 @example | 1652 @example |
1653 /* Usage example for libgccjit.so | 1653 /* Usage example for libgccjit.so |
1654 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 1654 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
1655 | 1655 |
1656 This file is part of GCC. | 1656 This file is part of GCC. |
1657 | 1657 |
1658 GCC is free software; you can redistribute it and/or modify it | 1658 GCC is free software; you can redistribute it and/or modify it |
1659 under the terms of the GNU General Public License as published by | 1659 under the terms of the GNU General Public License as published by |
1841 loop_test returned: 285 | 1841 loop_test returned: 285 |
1842 @end example | 1842 @end example |
1843 | 1843 |
1844 @noindent | 1844 @noindent |
1845 | 1845 |
1846 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 1846 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
1847 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 1847 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
1848 @c | 1848 @c |
1849 @c This is free software: you can redistribute it and/or modify it | 1849 @c This is free software: you can redistribute it and/or modify it |
1850 @c under the terms of the GNU General Public License as published by | 1850 @c under the terms of the GNU General Public License as published by |
1851 @c the Free Software Foundation, either version 3 of the License, or | 1851 @c the Free Software Foundation, either version 3 of the License, or |
3990 @} | 3990 @} |
3991 @end example | 3991 @end example |
3992 | 3992 |
3993 @noindent | 3993 @noindent |
3994 | 3994 |
3995 @c Copyright (C) 2015-2017 Free Software Foundation, Inc. | 3995 @c Copyright (C) 2015-2018 Free Software Foundation, Inc. |
3996 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 3996 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
3997 @c | 3997 @c |
3998 @c This is free software: you can redistribute it and/or modify it | 3998 @c This is free software: you can redistribute it and/or modify it |
3999 @c under the terms of the GNU General Public License as published by | 3999 @c under the terms of the GNU General Public License as published by |
4000 @c the Free Software Foundation, either version 3 of the License, or | 4000 @c the Free Software Foundation, either version 3 of the License, or |
4822 The above demonstrates compiling a @pxref{8,,gcc_jit_context *} directly | 4822 The above demonstrates compiling a @pxref{8,,gcc_jit_context *} directly |
4823 to an executable. It's also possible to compile it to an object file, | 4823 to an executable. It's also possible to compile it to an object file, |
4824 and to a dynamic library. See the documentation of | 4824 and to a dynamic library. See the documentation of |
4825 @pxref{4a,,gcc_jit_context_compile_to_file()} for more information. | 4825 @pxref{4a,,gcc_jit_context_compile_to_file()} for more information. |
4826 | 4826 |
4827 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 4827 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
4828 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 4828 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
4829 @c | 4829 @c |
4830 @c This is free software: you can redistribute it and/or modify it | 4830 @c This is free software: you can redistribute it and/or modify it |
4831 @c under the terms of the GNU General Public License as published by | 4831 @c under the terms of the GNU General Public License as published by |
4832 @c the Free Software Foundation, either version 3 of the License, or | 4832 @c the Free Software Foundation, either version 3 of the License, or |
4844 @node Topic Reference,C++ bindings for libgccjit,Tutorial,Top | 4844 @node Topic Reference,C++ bindings for libgccjit,Tutorial,Top |
4845 @anchor{topics/index doc}@anchor{4f}@anchor{topics/index topic-reference}@anchor{50} | 4845 @anchor{topics/index doc}@anchor{4f}@anchor{topics/index topic-reference}@anchor{50} |
4846 @chapter Topic Reference | 4846 @chapter Topic Reference |
4847 | 4847 |
4848 | 4848 |
4849 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 4849 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
4850 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 4850 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
4851 @c | 4851 @c |
4852 @c This is free software: you can redistribute it and/or modify it | 4852 @c This is free software: you can redistribute it and/or modify it |
4853 @c under the terms of the GNU General Public License as published by | 4853 @c under the terms of the GNU General Public License as published by |
4854 @c the Free Software Foundation, either version 3 of the License, or | 4854 @c the Free Software Foundation, either version 3 of the License, or |
5621 @end example | 5621 @end example |
5622 | 5622 |
5623 @noindent | 5623 @noindent |
5624 @end deffn | 5624 @end deffn |
5625 | 5625 |
5626 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 5626 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
5627 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 5627 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
5628 @c | 5628 @c |
5629 @c This is free software: you can redistribute it and/or modify it | 5629 @c This is free software: you can redistribute it and/or modify it |
5630 @c under the terms of the GNU General Public License as published by | 5630 @c under the terms of the GNU General Public License as published by |
5631 @c the Free Software Foundation, either version 3 of the License, or | 5631 @c the Free Software Foundation, either version 3 of the License, or |
5738 object's context is released. | 5738 object's context is released. |
5739 @end quotation | 5739 @end quotation |
5740 @end cartouche | 5740 @end cartouche |
5741 @end deffn | 5741 @end deffn |
5742 | 5742 |
5743 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 5743 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
5744 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 5744 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
5745 @c | 5745 @c |
5746 @c This is free software: you can redistribute it and/or modify it | 5746 @c This is free software: you can redistribute it and/or modify it |
5747 @c under the terms of the GNU General Public License as published by | 5747 @c under the terms of the GNU General Public License as published by |
5748 @c the Free Software Foundation, either version 3 of the License, or | 5748 @c the Free Software Foundation, either version 3 of the License, or |
6376 | 6376 |
6377 | 6377 |
6378 Function pointer types can be created using | 6378 Function pointer types can be created using |
6379 @pxref{91,,gcc_jit_context_new_function_ptr_type()}. | 6379 @pxref{91,,gcc_jit_context_new_function_ptr_type()}. |
6380 | 6380 |
6381 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 6381 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
6382 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 6382 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
6383 @c | 6383 @c |
6384 @c This is free software: you can redistribute it and/or modify it | 6384 @c This is free software: you can redistribute it and/or modify it |
6385 @c under the terms of the GNU General Public License as published by | 6385 @c under the terms of the GNU General Public License as published by |
6386 @c the Free Software Foundation, either version 3 of the License, or | 6386 @c the Free Software Foundation, either version 3 of the License, or |
7462 @noindent | 7462 @noindent |
7463 | 7463 |
7464 in C (or, indeed, to @code{PTR + INDEX}). | 7464 in C (or, indeed, to @code{PTR + INDEX}). |
7465 @end deffn | 7465 @end deffn |
7466 | 7466 |
7467 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 7467 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
7468 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 7468 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
7469 @c | 7469 @c |
7470 @c This is free software: you can redistribute it and/or modify it | 7470 @c This is free software: you can redistribute it and/or modify it |
7471 @c under the terms of the GNU General Public License as published by | 7471 @c under the terms of the GNU General Public License as published by |
7472 @c the Free Software Foundation, either version 3 of the License, or | 7472 @c the Free Software Foundation, either version 3 of the License, or |
8088 | 8088 |
8089 @noindent | 8089 @noindent |
8090 @end quotation | 8090 @end quotation |
8091 @end deffn | 8091 @end deffn |
8092 | 8092 |
8093 @c Copyright (C) 2017 Free Software Foundation, Inc. | 8093 @c Copyright (C) 2017-2018 Free Software Foundation, Inc. |
8094 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 8094 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
8095 @c | 8095 @c |
8096 @c This is free software: you can redistribute it and/or modify it | 8096 @c This is free software: you can redistribute it and/or modify it |
8097 @c under the terms of the GNU General Public License as published by | 8097 @c under the terms of the GNU General Public License as published by |
8098 @c the Free Software Foundation, either version 3 of the License, or | 8098 @c the Free Software Foundation, either version 3 of the License, or |
8171 | 8171 |
8172 Generate a @pxref{a,,gcc_jit_type} for a function pointer with the | 8172 Generate a @pxref{a,,gcc_jit_type} for a function pointer with the |
8173 given return type and parameters. | 8173 given return type and parameters. |
8174 @end deffn | 8174 @end deffn |
8175 | 8175 |
8176 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 8176 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
8177 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 8177 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
8178 @c | 8178 @c |
8179 @c This is free software: you can redistribute it and/or modify it | 8179 @c This is free software: you can redistribute it and/or modify it |
8180 @c under the terms of the GNU General Public License as published by | 8180 @c under the terms of the GNU General Public License as published by |
8181 @c the Free Software Foundation, either version 3 of the License, or | 8181 @c the Free Software Foundation, either version 3 of the License, or |
8259 This will dump C-like code to the given path. If the @cite{update_locations} | 8259 This will dump C-like code to the given path. If the @cite{update_locations} |
8260 argument is true, this will also set up @cite{gcc_jit_location} information | 8260 argument is true, this will also set up @cite{gcc_jit_location} information |
8261 throughout the context, pointing at the dump file as if it were a source | 8261 throughout the context, pointing at the dump file as if it were a source |
8262 file, giving you @emph{something} you can step through in the debugger. | 8262 file, giving you @emph{something} you can step through in the debugger. |
8263 | 8263 |
8264 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 8264 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
8265 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 8265 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
8266 @c | 8266 @c |
8267 @c This is free software: you can redistribute it and/or modify it | 8267 @c This is free software: you can redistribute it and/or modify it |
8268 @c under the terms of the GNU General Public License as published by | 8268 @c under the terms of the GNU General Public License as published by |
8269 @c the Free Software Foundation, either version 3 of the License, or | 8269 @c the Free Software Foundation, either version 3 of the License, or |
8536 | 8536 |
8537 There is currently no support for specifying libraries to link | 8537 There is currently no support for specifying libraries to link |
8538 against. | 8538 against. |
8539 @end deffn | 8539 @end deffn |
8540 | 8540 |
8541 @c Copyright (C) 2015-2017 Free Software Foundation, Inc. | 8541 @c Copyright (C) 2015-2018 Free Software Foundation, Inc. |
8542 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 8542 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
8543 @c | 8543 @c |
8544 @c This is free software: you can redistribute it and/or modify it | 8544 @c This is free software: you can redistribute it and/or modify it |
8545 @c under the terms of the GNU General Public License as published by | 8545 @c under the terms of the GNU General Public License as published by |
8546 @c the Free Software Foundation, either version 3 of the License, or | 8546 @c the Free Software Foundation, either version 3 of the License, or |
8787 | 8787 |
8788 | 8788 |
8789 @code{LIBGCCJIT_ABI_10} covers the addition of | 8789 @code{LIBGCCJIT_ABI_10} covers the addition of |
8790 @pxref{85,,gcc_jit_context_new_rvalue_from_vector()} | 8790 @pxref{85,,gcc_jit_context_new_rvalue_from_vector()} |
8791 | 8791 |
8792 @c Copyright (C) 2015-2017 Free Software Foundation, Inc. | 8792 @c Copyright (C) 2015-2018 Free Software Foundation, Inc. |
8793 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 8793 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
8794 @c | 8794 @c |
8795 @c This is free software: you can redistribute it and/or modify it | 8795 @c This is free software: you can redistribute it and/or modify it |
8796 @c under the terms of the GNU General Public License as published by | 8796 @c under the terms of the GNU General Public License as published by |
8797 @c the Free Software Foundation, either version 3 of the License, or | 8797 @c the Free Software Foundation, either version 3 of the License, or |
9098 @end example | 9098 @end example |
9099 | 9099 |
9100 @noindent | 9100 @noindent |
9101 @end deffn | 9101 @end deffn |
9102 | 9102 |
9103 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9103 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9104 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 9104 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
9105 @c | 9105 @c |
9106 @c This is free software: you can redistribute it and/or modify it | 9106 @c This is free software: you can redistribute it and/or modify it |
9107 @c under the terms of the GNU General Public License as published by | 9107 @c under the terms of the GNU General Public License as published by |
9108 @c the Free Software Foundation, either version 3 of the License, or | 9108 @c the Free Software Foundation, either version 3 of the License, or |
9136 the APIs are not yet set in stone, and they shouldn't be used in | 9136 the APIs are not yet set in stone, and they shouldn't be used in |
9137 production yet. | 9137 production yet. |
9138 | 9138 |
9139 Contents: | 9139 Contents: |
9140 | 9140 |
9141 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9141 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9142 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 9142 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
9143 @c | 9143 @c |
9144 @c This is free software: you can redistribute it and/or modify it | 9144 @c This is free software: you can redistribute it and/or modify it |
9145 @c under the terms of the GNU General Public License as published by | 9145 @c under the terms of the GNU General Public License as published by |
9146 @c the Free Software Foundation, either version 3 of the License, or | 9146 @c the Free Software Foundation, either version 3 of the License, or |
9271 @node Tutorial<2>,Topic Reference<2>,,C++ bindings for libgccjit | 9271 @node Tutorial<2>,Topic Reference<2>,,C++ bindings for libgccjit |
9272 @anchor{cp/intro/index doc}@anchor{118}@anchor{cp/intro/index tutorial}@anchor{119} | 9272 @anchor{cp/intro/index doc}@anchor{118}@anchor{cp/intro/index tutorial}@anchor{119} |
9273 @section Tutorial | 9273 @section Tutorial |
9274 | 9274 |
9275 | 9275 |
9276 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9276 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9277 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 9277 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
9278 @c | 9278 @c |
9279 @c This is free software: you can redistribute it and/or modify it | 9279 @c This is free software: you can redistribute it and/or modify it |
9280 @c under the terms of the GNU General Public License as published by | 9280 @c under the terms of the GNU General Public License as published by |
9281 @c the Free Software Foundation, either version 3 of the License, or | 9281 @c the Free Software Foundation, either version 3 of the License, or |
9314 | 9314 |
9315 @quotation | 9315 @quotation |
9316 | 9316 |
9317 @example | 9317 @example |
9318 /* Smoketest example for libgccjit.so C++ API | 9318 /* Smoketest example for libgccjit.so C++ API |
9319 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9319 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9320 | 9320 |
9321 This file is part of GCC. | 9321 This file is part of GCC. |
9322 | 9322 |
9323 GCC is free software; you can redistribute it and/or modify it | 9323 GCC is free software; you can redistribute it and/or modify it |
9324 under the terms of the GNU General Public License as published by | 9324 under the terms of the GNU General Public License as published by |
9449 hello world | 9449 hello world |
9450 @end example | 9450 @end example |
9451 | 9451 |
9452 @noindent | 9452 @noindent |
9453 | 9453 |
9454 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9454 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9455 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 9455 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
9456 @c | 9456 @c |
9457 @c This is free software: you can redistribute it and/or modify it | 9457 @c This is free software: you can redistribute it and/or modify it |
9458 @c under the terms of the GNU General Public License as published by | 9458 @c under the terms of the GNU General Public License as published by |
9459 @c the Free Software Foundation, either version 3 of the License, or | 9459 @c the Free Software Foundation, either version 3 of the License, or |
9845 | 9845 |
9846 @quotation | 9846 @quotation |
9847 | 9847 |
9848 @example | 9848 @example |
9849 /* Usage example for libgccjit.so's C++ API | 9849 /* Usage example for libgccjit.so's C++ API |
9850 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9850 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9851 | 9851 |
9852 This file is part of GCC. | 9852 This file is part of GCC. |
9853 | 9853 |
9854 GCC is free software; you can redistribute it and/or modify it | 9854 GCC is free software; you can redistribute it and/or modify it |
9855 under the terms of the GNU General Public License as published by | 9855 under the terms of the GNU General Public License as published by |
9960 result: 25 | 9960 result: 25 |
9961 @end example | 9961 @end example |
9962 | 9962 |
9963 @noindent | 9963 @noindent |
9964 | 9964 |
9965 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 9965 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
9966 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 9966 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
9967 @c | 9967 @c |
9968 @c This is free software: you can redistribute it and/or modify it | 9968 @c This is free software: you can redistribute it and/or modify it |
9969 @c under the terms of the GNU General Public License as published by | 9969 @c under the terms of the GNU General Public License as published by |
9970 @c the Free Software Foundation, either version 3 of the License, or | 9970 @c the Free Software Foundation, either version 3 of the License, or |
10464 | 10464 |
10465 @quotation | 10465 @quotation |
10466 | 10466 |
10467 @example | 10467 @example |
10468 /* Usage example for libgccjit.so's C++ API | 10468 /* Usage example for libgccjit.so's C++ API |
10469 Copyright (C) 2014-2017 Free Software Foundation, Inc. | 10469 Copyright (C) 2014-2018 Free Software Foundation, Inc. |
10470 | 10470 |
10471 This file is part of GCC. | 10471 This file is part of GCC. |
10472 | 10472 |
10473 GCC is free software; you can redistribute it and/or modify it | 10473 GCC is free software; you can redistribute it and/or modify it |
10474 under the terms of the GNU General Public License as published by | 10474 under the terms of the GNU General Public License as published by |
10621 loop_test returned: 285 | 10621 loop_test returned: 285 |
10622 @end example | 10622 @end example |
10623 | 10623 |
10624 @noindent | 10624 @noindent |
10625 | 10625 |
10626 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 10626 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
10627 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 10627 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
10628 @c | 10628 @c |
10629 @c This is free software: you can redistribute it and/or modify it | 10629 @c This is free software: you can redistribute it and/or modify it |
10630 @c under the terms of the GNU General Public License as published by | 10630 @c under the terms of the GNU General Public License as published by |
10631 @c the Free Software Foundation, either version 3 of the License, or | 10631 @c the Free Software Foundation, either version 3 of the License, or |
12547 @} | 12547 @} |
12548 @end example | 12548 @end example |
12549 | 12549 |
12550 @noindent | 12550 @noindent |
12551 | 12551 |
12552 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 12552 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
12553 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 12553 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
12554 @c | 12554 @c |
12555 @c This is free software: you can redistribute it and/or modify it | 12555 @c This is free software: you can redistribute it and/or modify it |
12556 @c under the terms of the GNU General Public License as published by | 12556 @c under the terms of the GNU General Public License as published by |
12557 @c the Free Software Foundation, either version 3 of the License, or | 12557 @c the Free Software Foundation, either version 3 of the License, or |
12569 @node Topic Reference<2>,,Tutorial<2>,C++ bindings for libgccjit | 12569 @node Topic Reference<2>,,Tutorial<2>,C++ bindings for libgccjit |
12570 @anchor{cp/topics/index doc}@anchor{147}@anchor{cp/topics/index topic-reference}@anchor{148} | 12570 @anchor{cp/topics/index doc}@anchor{147}@anchor{cp/topics/index topic-reference}@anchor{148} |
12571 @section Topic Reference | 12571 @section Topic Reference |
12572 | 12572 |
12573 | 12573 |
12574 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 12574 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
12575 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 12575 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
12576 @c | 12576 @c |
12577 @c This is free software: you can redistribute it and/or modify it | 12577 @c This is free software: you can redistribute it and/or modify it |
12578 @c under the terms of the GNU General Public License as published by | 12578 @c under the terms of the GNU General Public License as published by |
12579 @c the Free Software Foundation, either version 3 of the License, or | 12579 @c the Free Software Foundation, either version 3 of the License, or |
12963 @end example | 12963 @end example |
12964 | 12964 |
12965 @noindent | 12965 @noindent |
12966 @end deffn | 12966 @end deffn |
12967 | 12967 |
12968 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 12968 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
12969 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 12969 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
12970 @c | 12970 @c |
12971 @c This is free software: you can redistribute it and/or modify it | 12971 @c This is free software: you can redistribute it and/or modify it |
12972 @c under the terms of the GNU General Public License as published by | 12972 @c under the terms of the GNU General Public License as published by |
12973 @c the Free Software Foundation, either version 3 of the License, or | 12973 @c the Free Software Foundation, either version 3 of the License, or |
13061 @end example | 13061 @end example |
13062 | 13062 |
13063 @noindent | 13063 @noindent |
13064 @end deffn | 13064 @end deffn |
13065 | 13065 |
13066 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 13066 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
13067 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 13067 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
13068 @c | 13068 @c |
13069 @c This is free software: you can redistribute it and/or modify it | 13069 @c This is free software: you can redistribute it and/or modify it |
13070 @c under the terms of the GNU General Public License as published by | 13070 @c under the terms of the GNU General Public License as published by |
13071 @c the Free Software Foundation, either version 3 of the License, or | 13071 @c the Free Software Foundation, either version 3 of the License, or |
13349 specifying the fields. The fields can be omitted (in which case the | 13349 specifying the fields. The fields can be omitted (in which case the |
13350 size of the struct is not known), or later specified using | 13350 size of the struct is not known), or later specified using |
13351 @pxref{8d,,gcc_jit_struct_set_fields()}. | 13351 @pxref{8d,,gcc_jit_struct_set_fields()}. |
13352 @end deffn | 13352 @end deffn |
13353 | 13353 |
13354 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 13354 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
13355 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 13355 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
13356 @c | 13356 @c |
13357 @c This is free software: you can redistribute it and/or modify it | 13357 @c This is free software: you can redistribute it and/or modify it |
13358 @c under the terms of the GNU General Public License as published by | 13358 @c under the terms of the GNU General Public License as published by |
13359 @c the Free Software Foundation, either version 3 of the License, or | 13359 @c the Free Software Foundation, either version 3 of the License, or |
14251 @end example | 14251 @end example |
14252 | 14252 |
14253 @noindent | 14253 @noindent |
14254 @end quotation | 14254 @end quotation |
14255 | 14255 |
14256 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 14256 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
14257 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 14257 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
14258 @c | 14258 @c |
14259 @c This is free software: you can redistribute it and/or modify it | 14259 @c This is free software: you can redistribute it and/or modify it |
14260 @c under the terms of the GNU General Public License as published by | 14260 @c under the terms of the GNU General Public License as published by |
14261 @c the Free Software Foundation, either version 3 of the License, or | 14261 @c the Free Software Foundation, either version 3 of the License, or |
14714 | 14714 |
14715 @noindent | 14715 @noindent |
14716 @end quotation | 14716 @end quotation |
14717 @end deffn | 14717 @end deffn |
14718 | 14718 |
14719 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 14719 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
14720 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 14720 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
14721 @c | 14721 @c |
14722 @c This is free software: you can redistribute it and/or modify it | 14722 @c This is free software: you can redistribute it and/or modify it |
14723 @c under the terms of the GNU General Public License as published by | 14723 @c under the terms of the GNU General Public License as published by |
14724 @c the Free Software Foundation, either version 3 of the License, or | 14724 @c the Free Software Foundation, either version 3 of the License, or |
14795 This will dump C-like code to the given path. If the @cite{update_locations} | 14795 This will dump C-like code to the given path. If the @cite{update_locations} |
14796 argument is true, this will also set up @cite{gccjit::location} information | 14796 argument is true, this will also set up @cite{gccjit::location} information |
14797 throughout the context, pointing at the dump file as if it were a source | 14797 throughout the context, pointing at the dump file as if it were a source |
14798 file, giving you @emph{something} you can step through in the debugger. | 14798 file, giving you @emph{something} you can step through in the debugger. |
14799 | 14799 |
14800 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 14800 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
14801 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 14801 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
14802 @c | 14802 @c |
14803 @c This is free software: you can redistribute it and/or modify it | 14803 @c This is free software: you can redistribute it and/or modify it |
14804 @c under the terms of the GNU General Public License as published by | 14804 @c under the terms of the GNU General Public License as published by |
14805 @c the Free Software Foundation, either version 3 of the License, or | 14805 @c the Free Software Foundation, either version 3 of the License, or |
14867 | 14867 |
14868 This is a thin wrapper around the | 14868 This is a thin wrapper around the |
14869 @pxref{4a,,gcc_jit_context_compile_to_file()} API entrypoint. | 14869 @pxref{4a,,gcc_jit_context_compile_to_file()} API entrypoint. |
14870 @end deffn | 14870 @end deffn |
14871 | 14871 |
14872 @c Copyright (C) 2014-2017 Free Software Foundation, Inc. | 14872 @c Copyright (C) 2014-2018 Free Software Foundation, Inc. |
14873 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> | 14873 @c Originally contributed by David Malcolm <dmalcolm@redhat.com> |
14874 @c | 14874 @c |
14875 @c This is free software: you can redistribute it and/or modify it | 14875 @c This is free software: you can redistribute it and/or modify it |
14876 @c under the terms of the GNU General Public License as published by | 14876 @c under the terms of the GNU General Public License as published by |
14877 @c the Free Software Foundation, either version 3 of the License, or | 14877 @c the Free Software Foundation, either version 3 of the License, or |
15014 jit/build/gcc/testsuite/jit/jit.log | 15014 jit/build/gcc/testsuite/jit/jit.log |
15015 @end example | 15015 @end example |
15016 | 15016 |
15017 @noindent | 15017 @noindent |
15018 | 15018 |
15019 The test executables can be seen as: | 15019 The test executables are normally deleted after each test is run. For |
15020 debugging, they can be preserved by setting | |
15021 @geindex PRESERVE_EXECUTABLES | |
15022 @geindex environment variable; PRESERVE_EXECUTABLES | |
15023 @code{PRESERVE_EXECUTABLES} | |
15024 in the environment. If so, they can then be seen as: | |
15020 | 15025 |
15021 @example | 15026 @example |
15022 jit/build/gcc/testsuite/jit/*.exe | 15027 jit/build/gcc/testsuite/jit/*.exe |
15023 @end example | 15028 @end example |
15024 | 15029 |
15027 which can be run independently. | 15032 which can be run independently. |
15028 | 15033 |
15029 You can compile and run individual tests by passing "jit.exp=TESTNAME" to RUNTESTFLAGS e.g.: | 15034 You can compile and run individual tests by passing "jit.exp=TESTNAME" to RUNTESTFLAGS e.g.: |
15030 | 15035 |
15031 @example | 15036 @example |
15032 [gcc] $ make check-jit RUNTESTFLAGS="-v -v -v jit.exp=test-factorial.c" | 15037 [gcc] $ PRESERVE_EXECUTABLES= \ |
15038 make check-jit \ | |
15039 RUNTESTFLAGS="-v -v -v jit.exp=test-factorial.c" | |
15033 @end example | 15040 @end example |
15034 | 15041 |
15035 @noindent | 15042 @noindent |
15036 | 15043 |
15037 and once a test has been compiled, you can debug it directly: | 15044 and once a test has been compiled, you can debug it directly: |
15054 @node Running under valgrind,,,Running the test suite | 15061 @node Running under valgrind,,,Running the test suite |
15055 @anchor{internals/index running-under-valgrind}@anchor{1e2} | 15062 @anchor{internals/index running-under-valgrind}@anchor{1e2} |
15056 @subsection Running under valgrind | 15063 @subsection Running under valgrind |
15057 | 15064 |
15058 | 15065 |
15059 The jit testsuite detects if RUN_UNDER_VALGRIND is present in the | 15066 The jit testsuite detects if |
15067 @geindex RUN_UNDER_VALGRIND | |
15068 @geindex environment variable; RUN_UNDER_VALGRIND | |
15069 @code{RUN_UNDER_VALGRIND} is present in the | |
15060 environment (with any value). If it is present, it runs the test client | 15070 environment (with any value). If it is present, it runs the test client |
15061 code under valgrind@footnote{http://valgrind.org}, | 15071 code under valgrind@footnote{http://valgrind.org}, |
15062 specifcally, the default | 15072 specifcally, the default |
15063 memcheck@footnote{http://valgrind.org/docs/manual/mc-manual.html} | 15073 memcheck@footnote{http://valgrind.org/docs/manual/mc-manual.html} |
15064 tool with | 15074 tool with |