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
1bf24a29
Commit
1bf24a29
authored
Dec 06, 2016
by
Brenden Blanco
Committed by
GitHub
Dec 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #840 from zhiyisun/dev
Add support for aarch64
parents
e596170f
8e434b79
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
src/cc/export/helpers.h
src/cc/export/helpers.h
+12
-0
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/b_frontend_action.cc
+4
-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 @
1bf24a29
...
@@ -448,6 +448,18 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l
...
@@ -448,6 +448,18 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l
#define PT_REGS_RC(ctx) ((ctx)->ax)
#define PT_REGS_RC(ctx) ((ctx)->ax)
#define PT_REGS_IP(ctx) ((ctx)->ip)
#define PT_REGS_IP(ctx) ((ctx)->ip)
#define PT_REGS_SP(ctx) ((ctx)->sp)
#define PT_REGS_SP(ctx) ((ctx)->sp)
#elif defined(__aarch64__)
#define PT_REGS_PARM1(x) ((x)->regs[0])
#define PT_REGS_PARM2(x) ((x)->regs[1])
#define PT_REGS_PARM3(x) ((x)->regs[2])
#define PT_REGS_PARM4(x) ((x)->regs[3])
#define PT_REGS_PARM5(x) ((x)->regs[4])
#define PT_REGS_PARM6(x) ((x)->regs[5])
#define PT_REGS_RET(x) ((x)->regs[30])
#define PT_REGS_FP(x) ((x)->regs[29]) /* Works only with CONFIG_FRAME_POINTER */
#define PT_REGS_RC(x) ((x)->regs[0])
#define PT_REGS_SP(x) ((x)->sp)
#define PT_REGS_IP(x) ((x)->pc)
#else
#else
#error "
bcc
does
not
support
this
platform
yet
"
#error "
bcc
does
not
support
this
platform
yet
"
#endif
#endif
...
...
src/cc/frontends/clang/b_frontend_action.cc
View file @
1bf24a29
...
@@ -38,9 +38,13 @@ const char *calling_conv_regs_x86[] = {
...
@@ -38,9 +38,13 @@ const char *calling_conv_regs_x86[] = {
};
};
const
char
*
calling_conv_regs_ppc
[]
=
{
"gpr[3]"
,
"gpr[4]"
,
"gpr[5]"
,
const
char
*
calling_conv_regs_ppc
[]
=
{
"gpr[3]"
,
"gpr[4]"
,
"gpr[5]"
,
"gpr[6]"
,
"gpr[7]"
,
"gpr[8]"
};
"gpr[6]"
,
"gpr[7]"
,
"gpr[8]"
};
const
char
*
calling_conv_regs_arm64
[]
=
{
"regs[0]"
,
"regs[1]"
,
"regs[2]"
,
"regs[3]"
,
"regs[4]"
,
"regs[5]"
};
// todo: support more archs
// todo: support more archs
#if defined(__powerpc__)
#if defined(__powerpc__)
const
char
**
calling_conv_regs
=
calling_conv_regs_ppc
;
const
char
**
calling_conv_regs
=
calling_conv_regs_ppc
;
#elif defined(__aarch64__)
const
char
**
calling_conv_regs
=
calling_conv_regs_arm64
;
#else
#else
const
char
**
calling_conv_regs
=
calling_conv_regs_x86
;
const
char
**
calling_conv_regs
=
calling_conv_regs_x86
;
#endif
#endif
...
...
src/cc/frontends/clang/loader.cc
View file @
1bf24a29
...
@@ -166,6 +166,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, unique_ptr<vector<TableDes
...
@@ -166,6 +166,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, unique_ptr<vector<TableDes
// set up the command line argument wrapper
// set up the command line argument wrapper
#if defined(__powerpc64__)
#if defined(__powerpc64__)
driver
::
Driver
drv
(
""
,
"ppc64le-unknown-linux-gnu"
,
diags
);
driver
::
Driver
drv
(
""
,
"ppc64le-unknown-linux-gnu"
,
diags
);
#elif defined(__aarch64__)
driver
::
Driver
drv
(
""
,
"aarch64-unknown-linux-gnu"
,
diags
);
#else
#else
driver
::
Driver
drv
(
""
,
"x86_64-unknown-linux-gnu"
,
diags
);
driver
::
Driver
drv
(
""
,
"x86_64-unknown-linux-gnu"
,
diags
);
#endif
#endif
...
...
src/cc/libbpf.c
View file @
1bf24a29
...
@@ -44,6 +44,8 @@
...
@@ -44,6 +44,8 @@
#ifndef __NR_bpf
#ifndef __NR_bpf
#if defined(__powerpc64__)
#if defined(__powerpc64__)
#define __NR_bpf 361
#define __NR_bpf 361
#elif defined(__aarch64__)
#define __NR_bpf 280
#else
#else
#define __NR_bpf 321
#define __NR_bpf 321
#endif
#endif
...
...
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