Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
1c6a1dc7
Commit
1c6a1dc7
authored
Sep 29, 2014
by
Damien George
Browse files
py: Allow x86-64 to mov r16 to rm16 with extended src reg.
Fixes bug with x86-64 viper ptr16.
parent
dfef4249
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/asmx64.c
View file @
1c6a1dc7
...
...
@@ -311,9 +311,12 @@ void asm_x64_mov_r8_to_disp(asm_x64_t *as, int src_r64, int dest_r64, int dest_d
}
void
asm_x64_mov_r16_to_disp
(
asm_x64_t
*
as
,
int
src_r64
,
int
dest_r64
,
int
dest_disp
)
{
assert
(
src_r64
<
8
);
assert
(
dest_r64
<
8
);
asm_x64_write_byte_2
(
as
,
OP_SIZE_PREFIX
,
OPCODE_MOV_R64_TO_RM64
);
if
(
src_r64
<
8
)
{
asm_x64_write_byte_2
(
as
,
OP_SIZE_PREFIX
,
OPCODE_MOV_R64_TO_RM64
);
}
else
{
asm_x64_write_byte_3
(
as
,
OP_SIZE_PREFIX
,
REX_PREFIX
|
REX_R
,
OPCODE_MOV_R64_TO_RM64
);
}
asm_x64_write_r64_disp
(
as
,
src_r64
,
dest_r64
,
dest_disp
);
}
...
...
Write
Preview
Supports
Markdown
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