Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a0ae8b4b
Commit
a0ae8b4b
authored
Oct 07, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Oct 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add load non-word operators to Thumb2 disassembler.
parent
13da3a92
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
be_arm.c
programs/winedbg/be_arm.c
+63
-0
No files found.
programs/winedbg/be_arm.c
View file @
a0ae8b4b
...
...
@@ -992,6 +992,68 @@ static UINT thumb2_disasm_preload(UINT inst, ADDRESS64 *addr)
return
inst
;
}
static
UINT
thumb2_disasm_ldrnonword
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
op1
=
(
inst
>>
23
)
&
0x03
;
WORD
hw
=
(
inst
>>
21
)
&
0x01
;
if
(
!
(
op1
&
0x01
)
&&
!
((
inst
>>
6
)
&
0x3f
)
&&
get_nibble
(
inst
,
4
)
!=
15
)
{
WORD
shift
=
(
inst
>>
4
)
&
0x03
;
dbg_printf
(
"
\n\t
%s%s
\t
%s, [%s, %s"
,
op1
?
"ldrs"
:
"ldr"
,
hw
?
"h"
:
"b"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
if
(
shift
)
dbg_printf
(
", lsl #%u]"
,
shift
);
else
dbg_printf
(
"]"
);
return
0
;
}
if
(
!
(
op1
&
0x01
)
&&
((
inst
>>
8
)
&
0x0f
)
==
14
&&
get_nibble
(
inst
,
4
)
!=
15
)
{
WORD
offset
=
inst
&
0xff
;
dbg_printf
(
"
\n\t
%s%s
\t
%s, [%s"
,
op1
?
"ldrs"
:
"ldr"
,
hw
?
"ht"
:
"bt"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)]);
if
(
offset
)
dbg_printf
(
", #%u]"
,
offset
);
else
dbg_printf
(
"]"
);
return
0
;
}
if
(
get_nibble
(
inst
,
4
)
!=
15
)
{
int
offset
;
dbg_printf
(
"
\n\t
%s%s
\t
%s, [%s"
,
(
op1
&
0x02
)
?
"ldrs"
:
"ldr"
,
hw
?
"h"
:
"b"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)]);
if
(
op1
&
0x01
)
{
dbg_printf
(
", #%u]"
,
inst
&
0x0fff
);
return
0
;
}
offset
=
inst
&
0xff
;
if
(
!
(
inst
&
0x0200
))
offset
*=
-
1
;
if
(
!
(
inst
&
0x0400
)
&&
(
inst
&
0x0100
))
dbg_printf
(
"], #%i"
,
offset
);
else
if
(
inst
&
0x0400
)
dbg_printf
(
", #%i]%s"
,
offset
,
(
inst
&
0x0100
)
?
"!"
:
""
);
else
return
inst
;
return
0
;
}
if
(
get_nibble
(
inst
,
4
)
==
15
)
{
int
offset
=
inst
&
0x0fff
;
if
(
!
op1
)
offset
*=
-
1
;
dbg_printf
(
"
\n\t
%s%s
\t
%s, "
,
(
op1
&
0x02
)
?
"ldrs"
:
"ldr"
,
hw
?
"h"
:
"b"
,
tbl_regs
[
get_nibble
(
inst
,
3
)]);
db_printsym
(
addr
->
Offset
+
offset
+
4
);
return
0
;
}
return
inst
;
}
static
UINT
thumb2_disasm_coprocdat
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
opc2
=
(
inst
>>
5
)
&
0x07
;
...
...
@@ -1139,6 +1201,7 @@ static const struct inst_arm tbl_thumb32[] = {
{
0xff100000
,
0xf8000000
,
thumb2_disasm_str
},
{
0xff700000
,
0xf8500000
,
thumb2_disasm_ldrword
},
{
0xfe70f000
,
0xf810f000
,
thumb2_disasm_preload
},
{
0xfe500000
,
0xf8100000
,
thumb2_disasm_ldrnonword
},
{
0xef000010
,
0xee000000
,
thumb2_disasm_coprocdat
},
{
0xef000010
,
0xee000010
,
thumb2_disasm_coprocmov1
},
{
0xefe00000
,
0xec400000
,
thumb2_disasm_coprocmov2
},
...
...
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