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
0004788e
Commit
0004788e
authored
Jan 02, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Jan 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add modified immediate dataprocessing operators to Thumb2 disassembler.
parent
87fbe4ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
be_arm.c
programs/winedbg/be_arm.c
+74
-0
No files found.
programs/winedbg/be_arm.c
View file @
0004788e
...
...
@@ -1133,6 +1133,79 @@ static UINT thumb2_disasm_dataprocessing(UINT inst, ADDRESS64 *addr)
return
inst
;
}
static
UINT
thumb2_disasm_dataprocessingmod
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
op
=
(
inst
>>
21
)
&
0x0f
;
WORD
sf
=
(
inst
>>
20
)
&
0x01
;
WORD
offset
=
((
inst
>>
15
)
&
0x0800
)
+
((
inst
>>
4
)
&
0x0700
)
+
(
inst
&
0xff
);
/* FIXME: use ThumbExpandImm_C */
switch
(
op
)
{
case
0
:
if
(
get_nibble
(
inst
,
2
)
==
15
)
dbg_printf
(
"
\n\t
tst
\t
%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
dbg_printf
(
"
\n\t
and%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
1
:
dbg_printf
(
"
\n\t
bic%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
2
:
if
(
get_nibble
(
inst
,
4
)
==
15
)
dbg_printf
(
"
\n\t
mov%s
\t
%s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
offset
);
else
dbg_printf
(
"
\n\t
orr%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
3
:
if
(
get_nibble
(
inst
,
4
)
==
15
)
dbg_printf
(
"
\n\t
mvn%s
\t
%s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
offset
);
else
dbg_printf
(
"
\n\t
orn%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
4
:
if
(
get_nibble
(
inst
,
2
)
==
15
)
dbg_printf
(
"
\n\t
teq
\t
%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
dbg_printf
(
"
\n\t
eor%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
8
:
if
(
get_nibble
(
inst
,
2
)
==
15
)
dbg_printf
(
"
\n\t
cmn
\t
%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
dbg_printf
(
"
\n\t
add%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
10
:
dbg_printf
(
"
\n\t
adc%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
11
:
dbg_printf
(
"
\n\t
sbc%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
13
:
if
(
get_nibble
(
inst
,
2
)
==
15
)
dbg_printf
(
"
\n\t
cmp
\t
%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
dbg_printf
(
"
\n\t
sub%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
case
14
:
dbg_printf
(
"
\n\t
rsb%s
\t
%s, %s, #%u"
,
sf
?
"s"
:
""
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
default:
return
inst
;
}
}
static
UINT
thumb2_disasm_coprocdat
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
opc2
=
(
inst
>>
5
)
&
0x07
;
...
...
@@ -1370,6 +1443,7 @@ static const struct inst_arm tbl_thumb32[] = {
{
0xfe70f000
,
0xf810f000
,
thumb2_disasm_preload
},
{
0xfe500000
,
0xf8100000
,
thumb2_disasm_ldrnonword
},
{
0xfa008000
,
0xf2000000
,
thumb2_disasm_dataprocessing
},
{
0xfa008000
,
0xf0000000
,
thumb2_disasm_dataprocessingmod
},
{
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