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
6235e6fd
Commit
6235e6fd
authored
Apr 18, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Apr 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add shift operators to ARM disassembler.
parent
69f3d230
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
be_arm.c
programs/winedbg/be_arm.c
+25
-3
No files found.
programs/winedbg/be_arm.c
View file @
6235e6fd
...
@@ -62,6 +62,10 @@ static char const tbl_dataops[][4] = {
...
@@ -62,6 +62,10 @@ static char const tbl_dataops[][4] = {
"mov"
,
"bic"
,
"mvn"
"mov"
,
"bic"
,
"mvn"
};
};
static
char
const
tbl_shifts
[][
4
]
=
{
"lsl"
,
"lsr"
,
"asr"
,
"ror"
};
static
char
const
tbl_hiops_t
[][
4
]
=
{
static
char
const
tbl_hiops_t
[][
4
]
=
{
"add"
,
"cmp"
,
"mov"
,
"bx"
"add"
,
"cmp"
,
"mov"
,
"bx"
};
};
...
@@ -140,8 +144,16 @@ static UINT arm_disasm_dataprocessing(UINT inst)
...
@@ -140,8 +144,16 @@ static UINT arm_disasm_dataprocessing(UINT inst)
if
(
immediate
)
if
(
immediate
)
dbg_printf
(
"%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
dbg_printf
(
"%s, #%u"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
ROR32
(
inst
&
0xff
,
2
*
get_nibble
(
inst
,
2
)));
ROR32
(
inst
&
0xff
,
2
*
get_nibble
(
inst
,
2
)));
else
else
if
(((
inst
>>
4
)
&
0xff
)
==
0x00
)
/* no shift */
dbg_printf
(
"%s, %s"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
dbg_printf
(
"%s, %s"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
else
if
(((
inst
>>
4
)
&
0x09
)
==
0x01
)
/* register shift */
dbg_printf
(
"%s, %s, %s %s"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)],
tbl_shifts
[(
inst
>>
5
)
&
0x03
],
tbl_regs
[(
inst
>>
8
)
&
0x0f
]);
else
if
(((
inst
>>
4
)
&
0x01
)
==
0x00
)
/* immediate shift */
dbg_printf
(
"%s, %s, %s #%d"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)],
tbl_shifts
[(
inst
>>
5
)
&
0x03
],
(
inst
>>
7
)
&
0x1f
);
else
return
inst
;
}
}
return
0
;
return
0
;
}
}
...
@@ -165,15 +177,25 @@ static UINT arm_disasm_singletrans(UINT inst)
...
@@ -165,15 +177,25 @@ static UINT arm_disasm_singletrans(UINT inst)
{
{
if
(
immediate
)
if
(
immediate
)
dbg_printf
(
"[%s, #%d]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
dbg_printf
(
"[%s, #%d]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
else
if
(((
inst
>>
4
)
&
0xff
)
==
0x00
)
/* no shift */
dbg_printf
(
"[%s, %s]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
dbg_printf
(
"[%s, %s]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
else
if
(((
inst
>>
4
)
&
0x01
)
==
0x00
)
/* immediate shift (there's no register shift) */
dbg_printf
(
"[%s, %s, %s #%d]"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)],
tbl_shifts
[(
inst
>>
5
)
&
0x03
],
(
inst
>>
7
)
&
0x1f
);
else
return
inst
;
}
}
else
else
{
{
if
(
immediate
)
if
(
immediate
)
dbg_printf
(
"[%s], #%d"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
dbg_printf
(
"[%s], #%d"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
offset
);
else
else
if
(((
inst
>>
4
)
&
0xff
)
==
0x00
)
/* no shift */
dbg_printf
(
"[%s], %s"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
dbg_printf
(
"[%s], %s"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)]);
else
if
(((
inst
>>
4
)
&
0x01
)
==
0x00
)
/* immediate shift (there's no register shift) */
dbg_printf
(
"[%s], %s, %s #%d"
,
tbl_regs
[
get_nibble
(
inst
,
4
)],
tbl_regs
[
get_nibble
(
inst
,
0
)],
tbl_shifts
[(
inst
>>
5
)
&
0x03
],
(
inst
>>
7
)
&
0x1f
);
else
return
inst
;
}
}
return
0
;
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