]> Git Repo - linux.git/blob - tools/perf/arch/s390/annotate/instructions.c
Merge tag 'perf-core-for-mingo-4.15-20171103' of git://git.kernel.org/pub/scm/linux...
[linux.git] / tools / perf / arch / s390 / annotate / instructions.c
1 #include <linux/compiler.h>
2
3 static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name)
4 {
5         struct ins_ops *ops = NULL;
6
7         /* catch all kind of jumps */
8         if (strchr(name, 'j') ||
9             !strncmp(name, "bct", 3) ||
10             !strncmp(name, "br", 2))
11                 ops = &jump_ops;
12         /* override call/returns */
13         if (!strcmp(name, "bras") ||
14             !strcmp(name, "brasl") ||
15             !strcmp(name, "basr"))
16                 ops = &call_ops;
17         if (!strcmp(name, "br"))
18                 ops = &ret_ops;
19
20         arch__associate_ins_ops(arch, name, ops);
21         return ops;
22 }
23
24 static int s390__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
25 {
26         if (!arch->initialized) {
27                 arch->initialized = true;
28                 arch->associate_instruction_ops = s390__associate_ins_ops;
29         }
30
31         return 0;
32 }
This page took 0.036463 seconds and 4 git commands to generate.