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
abc304f3
Commit
abc304f3
authored
Apr 15, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Solve ARM disassembling fixmes.
parent
6a2f3e6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
13 deletions
+37
-13
be_arm.c
programs/winedbg/be_arm.c
+37
-13
No files found.
programs/winedbg/be_arm.c
View file @
abc304f3
...
...
@@ -139,7 +139,7 @@ static UINT arm_disasm_singletrans(UINT inst)
short
writeback
=
(
inst
>>
21
)
&
0x01
;
short
byte
=
(
inst
>>
22
)
&
0x01
;
short
direction
=
(
inst
>>
23
)
&
0x01
;
/* FIXME: what to do with bit 24 (indexing) */
short
indexing
=
(
inst
>>
24
)
&
0x01
;
short
immediate
=
!
((
inst
>>
25
)
&
0x01
);
short
offset
=
inst
&
0x0fff
;
...
...
@@ -147,11 +147,21 @@ static UINT arm_disasm_singletrans(UINT inst)
dbg_printf
(
"
\n\t
%s%s%s%s"
,
load
?
"ldr"
:
"str"
,
byte
?
"b"
:
""
,
writeback
?
"t"
:
""
,
get_cond
(
inst
));
if
(
immediate
)
dbg_printf
(
"
\t
r%u, [r%u, #%d]"
,
get_nibble
(
inst
,
3
),
get_nibble
(
inst
,
4
),
offset
);
dbg_printf
(
"
\t
r%u, "
,
get_nibble
(
inst
,
3
));
if
(
indexing
)
{
if
(
immediate
)
dbg_printf
(
"[r%u, #%d]"
,
get_nibble
(
inst
,
4
),
offset
);
else
dbg_printf
(
"[r%u, r%u]"
,
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
}
else
dbg_printf
(
"
\t
r%u, r%u, r%u"
,
get_nibble
(
inst
,
3
),
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
{
if
(
immediate
)
dbg_printf
(
"[r%u], #%d"
,
get_nibble
(
inst
,
4
),
offset
);
else
dbg_printf
(
"[r%u], r%u"
,
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
}
return
0
;
}
...
...
@@ -163,17 +173,28 @@ static UINT arm_disasm_halfwordtrans(UINT inst)
short
writeback
=
(
inst
>>
21
)
&
0x01
;
short
immediate
=
(
inst
>>
22
)
&
0x01
;
short
direction
=
(
inst
>>
23
)
&
0x01
;
/* FIXME: what to do with bit 24 (indexing) */
short
indexing
=
(
inst
>>
24
)
&
0x01
;
short
offset
=
((
inst
>>
4
)
&
0xf0
)
+
(
inst
&
0x0f
);
if
(
!
direction
)
offset
*=
-
1
;
dbg_printf
(
"
\n\t
%s%s%s%s%s"
,
load
?
"ldr"
:
"str"
,
sign
?
"s"
:
""
,
halfword
?
"h"
:
(
sign
?
"b"
:
""
),
writeback
?
"t"
:
""
,
get_cond
(
inst
));
if
(
immediate
)
dbg_printf
(
"
\t
r%u, r%u, #%d"
,
get_nibble
(
inst
,
3
),
get_nibble
(
inst
,
4
),
offset
);
dbg_printf
(
"
\t
r%u, "
,
get_nibble
(
inst
,
3
));
if
(
indexing
)
{
if
(
immediate
)
dbg_printf
(
"[r%u, #%d]"
,
get_nibble
(
inst
,
4
),
offset
);
else
dbg_printf
(
"[r%u, r%u]"
,
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
}
else
dbg_printf
(
"
\t
r%u, r%u, r%u"
,
get_nibble
(
inst
,
3
),
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
{
if
(
immediate
)
dbg_printf
(
"[r%u], #%d"
,
get_nibble
(
inst
,
4
),
offset
);
else
dbg_printf
(
"[r%u], r%u"
,
get_nibble
(
inst
,
4
),
get_nibble
(
inst
,
0
));
}
return
0
;
}
...
...
@@ -207,7 +228,7 @@ static UINT arm_disasm_blocktrans(UINT inst)
static
UINT
arm_disasm_swi
(
UINT
inst
)
{
UINT
comment
=
inst
&
0x00ffffff
;
dbg_printf
(
"
\n\t
swi%s
\t
#%d
/0x%08x"
,
get_cond
(
inst
),
comment
,
comment
);
dbg_printf
(
"
\n\t
swi%s
\t
#%d
"
,
get_cond
(
inst
)
,
comment
);
return
0
;
}
...
...
@@ -244,16 +265,19 @@ static UINT arm_disasm_coprocdatatrans(UINT inst)
WORD
CPnum
=
(
inst
>>
8
)
&
0x0f
;
WORD
CRd
=
(
inst
>>
12
)
&
0x0f
;
WORD
load
=
(
inst
>>
20
)
&
0x01
;
/* FIXME: what to do with bit 21 (writeback) */
WORD
writeback
=
(
inst
>>
21
)
&
0x01
;
WORD
translen
=
(
inst
>>
22
)
&
0x01
;
WORD
direction
=
(
inst
>>
23
)
&
0x01
;
/* FIXME: what to do with bit 24 (indexing) */
WORD
indexing
=
(
inst
>>
24
)
&
0x01
;
short
offset
=
(
inst
&
0xff
)
<<
2
;
if
(
!
direction
)
offset
*=
-
1
;
dbg_printf
(
"
\n\t
%s%s%s"
,
load
?
"ldc"
:
"stc"
,
translen
?
"l"
:
""
,
get_cond
(
inst
));
dbg_printf
(
"
\t
%u, cr%u, [r%u, #%d]"
,
CPnum
,
CRd
,
get_nibble
(
inst
,
4
),
offset
);
if
(
indexing
)
dbg_printf
(
"
\t
%u, cr%u, [r%u, #%d]%s"
,
CPnum
,
CRd
,
get_nibble
(
inst
,
4
),
offset
,
writeback
?
"!"
:
""
);
else
dbg_printf
(
"
\t
%u, cr%u, [r%u], #%d"
,
CPnum
,
CRd
,
get_nibble
(
inst
,
4
),
offset
);
return
0
;
}
...
...
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