Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
98121a3e
Commit
98121a3e
authored
Mar 07, 2017
by
Zvonko Kosic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added s390x support. Needs 4.10 Kernel
parent
575b3e5a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
src/cc/export/helpers.h
src/cc/export/helpers.h
+11
-0
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/b_frontend_action.cc
+6
-0
src/cc/frontends/clang/loader.cc
src/cc/frontends/clang/loader.cc
+2
-0
src/cc/libbpf.c
src/cc/libbpf.c
+2
-0
No files found.
src/cc/export/helpers.h
View file @
98121a3e
...
...
@@ -468,6 +468,17 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l
#define PT_REGS_RC(ctx) ((ctx)->gpr[3])
#define PT_REGS_IP(ctx) ((ctx)->nip)
#define PT_REGS_SP(ctx) ((ctx)->sp)
#elif defined(__s390x__)
#define PT_REGS_PARM1(x) ((x)->gprs[2])
#define PT_REGS_PARM2(x) ((x)->gprs[3])
#define PT_REGS_PARM3(x) ((x)->gprs[4])
#define PT_REGS_PARM4(x) ((x)->gprs[5])
#define PT_REGS_PARM5(x) ((x)->gprs[6])
#define PT_REGS_RET(x) ((x)->gprs[14])
#define PT_REGS_FP(x) ((x)->gprs[11]) /* Works only with CONFIG_FRAME_POINTER */
#define PT_REGS_RC(x) ((x)->gprs[2])
#define PT_REGS_SP(x) ((x)->gprs[15])
#define PT_REGS_IP(x) ((x)->psw.addr)
#elif defined(__x86_64__)
#define PT_REGS_PARM1(ctx) ((ctx)->di)
#define PT_REGS_PARM2(ctx) ((ctx)->si)
...
...
src/cc/frontends/clang/b_frontend_action.cc
View file @
98121a3e
...
...
@@ -39,11 +39,17 @@ const char *calling_conv_regs_x86[] = {
};
const
char
*
calling_conv_regs_ppc
[]
=
{
"gpr[3]"
,
"gpr[4]"
,
"gpr[5]"
,
"gpr[6]"
,
"gpr[7]"
,
"gpr[8]"
};
const
char
*
calling_conv_regs_s390x
[]
=
{
"gprs[2]"
,
"gprs[3]"
,
"gprs[4]"
,
"gprs[5]"
,
"gprs[6]"
};
const
char
*
calling_conv_regs_arm64
[]
=
{
"regs[0]"
,
"regs[1]"
,
"regs[2]"
,
"regs[3]"
,
"regs[4]"
,
"regs[5]"
};
// todo: support more archs
#if defined(__powerpc__)
const
char
**
calling_conv_regs
=
calling_conv_regs_ppc
;
#elif defined(__s390x__)
const
char
**
calling_conv_regs
=
calling_conv_regs_s390x
;
#elif defined(__aarch64__)
const
char
**
calling_conv_regs
=
calling_conv_regs_arm64
;
#else
...
...
src/cc/frontends/clang/loader.cc
View file @
98121a3e
...
...
@@ -172,6 +172,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, unique_ptr<vector<TableDes
#else
driver
::
Driver
drv
(
""
,
"powerpc64-unknown-linux-gnu"
,
diags
);
#endif
#elif defined(__s390x__)
driver
::
Driver
drv
(
""
,
"s390x-ibm-linux-gnu"
,
diags
);
#elif defined(__aarch64__)
driver
::
Driver
drv
(
""
,
"aarch64-unknown-linux-gnu"
,
diags
);
#else
...
...
src/cc/libbpf.c
View file @
98121a3e
...
...
@@ -46,6 +46,8 @@
#ifndef __NR_bpf
#if defined(__powerpc64__)
#define __NR_bpf 361
#elif defined(__s390x__)
#define __NR_bpf 351
#elif defined(__aarch64__)
#define __NR_bpf 280
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment