Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7e132ac1
Commit
7e132ac1
authored
Aug 26, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Aug 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add register data processing operators to Thumb2 disassembler.
parent
c5fbebd3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
14 deletions
+30
-14
be_arm.c
programs/winedbg/be_arm.c
+30
-14
No files found.
programs/winedbg/be_arm.c
View file @
7e132ac1
...
...
@@ -84,6 +84,10 @@ static char const tbl_sregops_t[][5] = {
"strh"
,
"ldsb"
,
"ldrh"
,
"ldsh"
};
static
char
const
tbl_miscops_t2
[][
6
]
=
{
"rev"
,
"rev16"
,
"rbit"
,
"revsh"
};
static
char
const
tbl_width_t2
[][
2
]
=
{
"b"
,
"h"
,
""
,
"?"
};
...
...
@@ -655,22 +659,33 @@ static UINT thumb2_disasm_misc(UINT inst, ADDRESS64 *addr)
if
(
op1
==
1
)
{
switch
(
op2
)
dbg_printf
(
"
\n\t
%s
\t
%s, %s"
,
tbl_miscops_t2
[
op2
],
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
return
0
;
}
return
inst
;
}
static
UINT
thumb2_disasm_dataprocessingreg
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
op1
=
(
inst
>>
20
)
&
0x07
;
WORD
op2
=
(
inst
>>
4
)
&
0x0f
;
if
(
!
op2
)
{
case
0
:
dbg_printf
(
"
\n\t
rev
\t
"
);
break
;
case
1
:
dbg_printf
(
"
\n\t
rev16
\t
"
);
break
;
case
2
:
dbg_printf
(
"
\n\t
rbit
\t
"
);
break
;
case
3
:
dbg_printf
(
"
\n\t
revsh
\t
"
);
break
;
dbg_printf
(
"
\n\t
%s%s
\t
%s, %s, %s"
,
tbl_shifts
[
op1
>>
1
],
(
op1
&
1
)
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
return
0
;
}
dbg_printf
(
"%s, %s"
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
if
((
op2
&
0x0C
)
==
0x08
&&
get_nibble
(
inst
,
4
)
==
0x0f
)
{
dbg_printf
(
"
\n\t
%sxt%s
\t
%s, %s"
,
(
op1
&
1
)
?
"u"
:
"s"
,
(
op1
&
4
)
?
"b"
:
"h"
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
if
(
op2
&
0x03
)
dbg_printf
(
", ROR #%u"
,
(
op2
&
3
)
*
8
);
return
0
;
}
...
...
@@ -933,6 +948,7 @@ static const struct inst_thumb16 tbl_thumb16[] = {
static
const
struct
inst_arm
tbl_thumb32
[]
=
{
{
0xf800f800
,
0xf000f800
,
thumb2_disasm_branchlinked
},
{
0xffc0f0c0
,
0xfa80f080
,
thumb2_disasm_misc
},
{
0xff80f000
,
0xfa00f000
,
thumb2_disasm_dataprocessingreg
},
{
0xff8000c0
,
0xfb000000
,
thumb2_disasm_mul
},
{
0xff8000f0
,
0xfb800000
,
thumb2_disasm_longmuldiv
},
{
0xff8000f0
,
0xfb8000f0
,
thumb2_disasm_longmuldiv
},
...
...
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