Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
SandHook
Commits
04992943
Commit
04992943
authored
May 17, 2019
by
swift_gan
Committed by
swift_gan
May 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NativeHook]fix pop & push
parent
5d6a9540
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
assembler_a64.cpp
.../src/main/cpp/archs/arm/arm64/assembler/assembler_a64.cpp
+10
-4
No files found.
nativehook/src/main/cpp/archs/arm/arm64/assembler/assembler_a64.cpp
View file @
04992943
...
...
@@ -174,19 +174,25 @@ void AssemblerA64::Ldrsw(XRegister &rt, const MemOperand& memOperand) {
}
}
// If the current stack pointer is sp, then it must be aligned to 16 bytes
// on entry and the total size of the specified registers must also be a
// multiple of 16 bytes.
void
AssemblerA64
::
Pop
(
RegisterA64
&
rd
)
{
if
(
rd
.
isX
())
{
Ldr
(
rd
,
MemOperand
(
&
SP
,
rd
.
getWideInBytes
()
,
PostIndex
));
Ldr
(
rd
,
MemOperand
(
&
SP
,
16
,
PostIndex
));
}
else
{
Ldr
(
rd
,
MemOperand
(
&
WSP
,
rd
.
getWideInBytes
()
,
PostIndex
));
Ldr
(
rd
,
MemOperand
(
&
WSP
,
16
,
PostIndex
));
}
}
// If the current stack pointer is sp, then it must be aligned to 16 bytes
// on entry and the total size of the specified registers must also be a
// multiple of 16 bytes.
void
AssemblerA64
::
Push
(
RegisterA64
&
rt
)
{
if
(
rt
.
isX
())
{
Str
(
rt
,
MemOperand
(
&
SP
,
-
rt
.
getWideInBytes
()
,
PreIndex
));
Str
(
rt
,
MemOperand
(
&
SP
,
-
16
,
PreIndex
));
}
else
{
Str
(
rt
,
MemOperand
(
&
WSP
,
-
rt
.
getWideInBytes
()
,
PreIndex
));
Str
(
rt
,
MemOperand
(
&
WSP
,
-
16
,
PreIndex
));
}
}
...
...
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