Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
f5b3bce6
Commit
f5b3bce6
authored
Apr 05, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format my patchpoint commit
parent
c83f33a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
27 deletions
+20
-27
src/codegen/patchpoints.cpp
src/codegen/patchpoints.cpp
+20
-27
No files found.
src/codegen/patchpoints.cpp
View file @
f5b3bce6
...
...
@@ -136,42 +136,36 @@ static LiveOutSet extractLiveOuts(StackMap::Record* r, llvm::CallingConv::ID cc)
return
live_outs
;
}
#ifdef Py_TRACE_REFS
#error "trace_refs not supported yet"
#else
#ifndef Py_REF_DEBUG
#if !defined(Py_REF_DEBUG) && !defined(Py_TRACE_REFS)
static
char
decref_code
[]
=
"
\x48\xff\x0f
"
// decq (%rdi)
"
\x75\x07
"
// jne +7
"
\x48\x8b\x47\x08
"
// mov 0x8(%rdi),%rax
"
\xff\x50\x30
"
// callq *0x30(%rax)
static
char
decref_code
[]
=
"
\x48\xff\x0f
"
// decq (%rdi)
"
\x75\x07
"
// jne +7
"
\x48\x8b\x47\x08
"
// mov 0x8(%rdi),%rax
"
\xff\x50\x30
"
// callq *0x30(%rax)
;
static
char
xdecref_code
[]
=
"
\x48\x85\xff
"
// test %rdi,%rdi
"
\x74\x0c
"
// je +12
"
\x48\xff\x0f
"
// decq (%rdi)
"
\x75\x07
"
// jne +7
"
\x48\x8b\x47\x08
"
// mov 0x8(%rdi),%rax
"
\xff\x50\x30
"
// callq *0x30(%rax)
static
char
xdecref_code
[]
=
"
\x48\x85\xff
"
// test %rdi,%rdi
"
\x74\x0c
"
// je +12
"
\x48\xff\x0f
"
// decq (%rdi)
"
\x75\x07
"
// jne +7
"
\x48\x8b\x47\x08
"
// mov 0x8(%rdi),%rax
"
\xff\x50\x30
"
// callq *0x30(%rax)
;
#else // #ifdef Py_REF_DEBUG:
#else
static
void
_decref
(
Box
*
b
)
{
Py_DECREF
(
b
);
}
static
char
decref_code
[]
=
"
\x48\xb8\x00\x00\x00\x00\x00\x00\x00\x00
"
// movabs $0x00, %rax
"
\xff\xd0
"
// callq *%rax
static
char
decref_code
[]
=
"
\x48\xb8\x00\x00\x00\x00\x00\x00\x00\x00
"
// movabs $0x00, %rax
"
\xff\xd0
"
// callq *%rax
;
static
void
_xdecref
(
Box
*
b
)
{
Py_XDECREF
(
b
);
}
static
char
xdecref_code
[]
=
"
\x48\xb8\x00\x00\x00\x00\x00\x00\x00\x00
"
// movabs $0x00, %rax
"
\xff\xd0
"
// callq *%rax
static
char
xdecref_code
[]
=
"
\x48\xb8\x00\x00\x00\x00\x00\x00\x00\x00
"
// movabs $0x00, %rax
"
\xff\xd0
"
// callq *%rax
;
namespace
{
...
...
@@ -179,17 +173,16 @@ class _Initializer {
public:
_Initializer
()
{
void
*
p
=
(
void
*
)
&
_decref
;
memcpy
(
decref_code
+
2
,
&
p
,
sizeof
(
p
));
memcpy
(
decref_code
+
2
,
&
p
,
sizeof
(
p
));
p
=
(
void
*
)
&
_xdecref
;
memcpy
(
xdecref_code
+
2
,
&
p
,
sizeof
(
p
));
memcpy
(
xdecref_code
+
2
,
&
p
,
sizeof
(
p
));
}
}
_i
;
}
#endif
#endif
const
int
DECREF_PP_SIZE
=
sizeof
(
decref_code
)
-
1
;
// -1 for the NUL byte
const
int
DECREF_PP_SIZE
=
sizeof
(
decref_code
)
-
1
;
// -1 for the NUL byte
const
int
XDECREF_PP_SIZE
=
sizeof
(
xdecref_code
)
-
1
;
// -1 for the NUL byte
void
emitDecref
(
void
*
addr
)
{
...
...
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