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
785bdb64
Commit
785bdb64
authored
Dec 10, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Dec 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add load/store dual/exclusive and table branch operators to Thumb2 disassembler.
parent
b9c71ffd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
be_arm.c
programs/winedbg/be_arm.c
+68
-0
No files found.
programs/winedbg/be_arm.c
View file @
785bdb64
...
@@ -1147,6 +1147,73 @@ static UINT thumb2_disasm_ldrstrmul(UINT inst, ADDRESS64 *addr)
...
@@ -1147,6 +1147,73 @@ static UINT thumb2_disasm_ldrstrmul(UINT inst, ADDRESS64 *addr)
return
0
;
return
0
;
}
}
static
UINT
thumb2_disasm_ldrstrextbr
(
UINT
inst
,
ADDRESS64
*
addr
)
{
WORD
op1
=
(
inst
>>
23
)
&
0x03
;
WORD
op2
=
(
inst
>>
20
)
&
0x03
;
WORD
op3
=
(
inst
>>
4
)
&
0x0f
;
WORD
indexing
=
(
inst
>>
24
)
&
0x01
;
WORD
direction
=
(
inst
>>
23
)
&
0x01
;
WORD
writeback
=
(
inst
>>
21
)
&
0x01
;
WORD
load
=
(
inst
>>
20
)
&
0x01
;
short
offset
=
(
inst
&
0xff
)
<<
2
;
if
(
op1
==
1
&&
op2
==
1
&&
op3
<
2
)
{
WORD
halfword
=
(
inst
>>
4
)
&
0x01
;
if
(
halfword
)
dbg_printf
(
"
\n\t
tbh
\t
[%s, %s, lsl #1]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
else
dbg_printf
(
"
\n\t
tbb
\t
[%s, %s]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
return
0
;
}
if
(
op1
==
0
&&
op2
<
2
)
{
if
(
get_nibble
(
inst
,
2
)
==
15
)
dbg_printf
(
"
\n\t
ldrex
\t
%s, [%s, #%u]"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
dbg_printf
(
"
\n\t
strex
\t
%s, %s, [%s, #%u]"
,
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
}
if
(
op1
==
1
&&
op2
<
2
)
{
WORD
halfword
=
(
inst
>>
4
)
&
0x01
;
if
(
get_nibble
(
inst
,
0
)
==
15
)
dbg_printf
(
"
\n\t
ldrex%s
\t
%s, [%s]"
,
halfword
?
"h"
:
"b"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)]);
else
dbg_printf
(
"
\n\t
strex%s
\t
%s, %s, [%s]"
,
halfword
?
"h"
:
"b"
,
tbl_regs
[
get_nibble
(
inst
,
0
)],
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
4
)]);
return
0
;
}
if
(
!
direction
)
offset
*=
-
1
;
dbg_printf
(
"
\n\t
%s
\t
"
,
load
?
"ldrd"
:
"strd"
);
if
(
indexing
)
{
if
(
load
&&
get_nibble
(
inst
,
4
)
==
15
)
{
dbg_printf
(
"%s, %s, "
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
2
)]);
db_printsym
(
addr
->
Offset
+
offset
+
4
);
}
else
dbg_printf
(
"%s, %s, [%s, #%d]%s"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
,
writeback
?
"!"
:
""
);
}
else
dbg_printf
(
"%s, %s, [%s], #%d"
,
tbl_regs
[
get_nibble
(
inst
,
3
)],
tbl_regs
[
get_nibble
(
inst
,
2
)],
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
return
0
;
}
struct
inst_arm
struct
inst_arm
{
{
UINT
mask
;
UINT
mask
;
...
@@ -1226,6 +1293,7 @@ static const struct inst_arm tbl_thumb32[] = {
...
@@ -1226,6 +1293,7 @@ static const struct inst_arm tbl_thumb32[] = {
{
0xefe00000
,
0xec400000
,
thumb2_disasm_coprocmov2
},
{
0xefe00000
,
0xec400000
,
thumb2_disasm_coprocmov2
},
{
0xee000000
,
0xec000000
,
thumb2_disasm_coprocdatatrans
},
{
0xee000000
,
0xec000000
,
thumb2_disasm_coprocdatatrans
},
{
0xfe402000
,
0xe8000000
,
thumb2_disasm_ldrstrmul
},
{
0xfe402000
,
0xe8000000
,
thumb2_disasm_ldrstrmul
},
{
0xfe400000
,
0xe8400000
,
thumb2_disasm_ldrstrextbr
},
{
0x00000000
,
0x00000000
,
NULL
}
{
0x00000000
,
0x00000000
,
NULL
}
};
};
...
...
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