]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | /* Copyright (C) 2021-2024 Free Software Foundation, Inc. |
6f52fdf4 SDJ |
2 | |
3 | This file is part of GDB. | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | ||
18 | #include <sys/sdt.h> | |
19 | ||
20 | .file "amd64-stap-expressions.S" | |
21 | .text | |
22 | .globl main | |
23 | main: | |
24 | /* We use a nop here because we don't want the first probe to | |
25 | be placed at the same location as the main label. */ | |
26 | nop | |
27 | ||
28 | /* Single operands. */ | |
29 | STAP_PROBE1(probe, log_neg, 8@!($0+$1)) | |
30 | STAP_PROBE1(probe, minus, -8@-($3+$4)) | |
31 | STAP_PROBE1(probe, bit_neg, -8@~$22) | |
32 | ||
33 | /* Arithmetic expressions. */ | |
34 | STAP_PROBE1(probe, plus1, 8@$3+($10-$8)-$1) | |
35 | STAP_PROBE1(probe, plus2, 8@$100-( ($8+$10) -$50)+$3) | |
36 | STAP_PROBE1(probe, plus3, 8@$100-(($8+$10)-$50)+((($8 - $9) + $40) - $4)+$4) | |
37 | ||
38 | /* Bitwise expressions. */ | |
39 | STAP_PROBE1(probe, and, 8@$128&$128) | |
40 | STAP_PROBE1(probe, or, 8@$8|$4) | |
41 | ||
42 | xor %rax,%rax | |
43 | ret | |
0f2cd53c | 44 | .section .note.GNU-stack,"",@progbits |