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
1e1e181b
Commit
1e1e181b
authored
Oct 03, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Oct 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Improve and add branch operators for Thumb2 disassembler.
parent
4d39cb56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
be_arm.c
programs/winedbg/be_arm.c
+22
-4
No files found.
programs/winedbg/be_arm.c
View file @
1e1e181b
...
...
@@ -634,11 +634,29 @@ static WORD thumb_disasm_movshift(WORD inst, ADDRESS64 *addr)
return
0
;
}
static
UINT
thumb2_disasm_branch
linked
(
UINT
inst
,
ADDRESS64
*
addr
)
static
UINT
thumb2_disasm_branch
(
UINT
inst
,
ADDRESS64
*
addr
)
{
UINT
offset
=
(((
inst
&
0x07ff0000
)
>>
4
)
|
((
inst
&
0x000007ff
)
<<
1
))
+
4
;
UINT
S
=
(
inst
>>
26
)
&
0x01
;
UINT
L
=
(
inst
>>
14
)
&
0x01
;
UINT
I1
=
!
(((
inst
>>
13
)
&
0x01
)
^
S
);
UINT
C
=
!
((
inst
>>
12
)
&
0x01
);
UINT
I2
=
!
(((
inst
>>
11
)
&
0x01
)
^
S
);
UINT
offset
=
(
inst
&
0x000007ff
)
<<
1
;
dbg_printf
(
"
\n\t
bl
\t
"
);
if
(
C
)
{
offset
|=
I1
<<
19
|
I2
<<
18
|
(
inst
&
0x003f0000
)
>>
4
;
offset
+=
4
;
if
(
S
)
offset
|=
0x0fff
<<
20
;
}
else
{
offset
|=
I1
<<
23
|
I2
<<
22
|
(
inst
&
0x03ff0000
)
>>
4
;
offset
+=
4
;
if
(
S
)
offset
|=
0xff
<<
24
;
}
dbg_printf
(
"
\n\t
b%s%s
\t
"
,
L
?
"l"
:
""
,
C
?
tbl_cond
[(
inst
>>
22
)
&
0x0f
]
:
""
);
db_printsym
(
addr
->
Offset
+
offset
);
return
0
;
}
...
...
@@ -946,7 +964,7 @@ static const struct inst_thumb16 tbl_thumb16[] = {
};
static
const
struct
inst_arm
tbl_thumb32
[]
=
{
{
0xf800f
800
,
0xf000f800
,
thumb2_disasm_branchlinked
},
{
0xf800f
000
,
0xf0008000
,
thumb2_disasm_branch
},
{
0xffc0f0c0
,
0xfa80f080
,
thumb2_disasm_misc
},
{
0xff80f000
,
0xfa00f000
,
thumb2_disasm_dataprocessingreg
},
{
0xff8000c0
,
0xfb000000
,
thumb2_disasm_mul
},
...
...
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