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
e2761ab0
Commit
e2761ab0
authored
Jan 08, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Use an if instead of a switch in case some float types have the same size.
parent
02aa1451
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
be_arm.c
programs/winedbg/be_arm.c
+5
-6
be_i386.c
programs/winedbg/be_i386.c
+5
-7
be_x86_64.c
programs/winedbg/be_x86_64.c
+5
-7
No files found.
programs/winedbg/be_arm.c
View file @
e2761ab0
...
...
@@ -1875,12 +1875,11 @@ static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
*/
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
switch
(
size
)
{
case
sizeof
(
float
):
*
ret
=
*
(
float
*
)
tmp
;
break
;
case
sizeof
(
double
):
*
ret
=
*
(
double
*
)
tmp
;
break
;
default:
return
FALSE
;
}
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
else
if
(
size
==
sizeof
(
double
))
*
ret
=
*
(
double
*
)
tmp
;
else
if
(
size
==
sizeof
(
long
double
))
*
ret
=
*
(
long
double
*
)
tmp
;
else
return
FALSE
;
return
TRUE
;
}
...
...
programs/winedbg/be_i386.c
View file @
e2761ab0
...
...
@@ -767,13 +767,11 @@ static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
/* float & double types have to be promoted to a long double */
switch
(
size
)
{
case
sizeof
(
float
):
*
ret
=
*
(
float
*
)
tmp
;
break
;
case
sizeof
(
double
):
*
ret
=
*
(
double
*
)
tmp
;
break
;
case
sizeof
(
long
double
):
*
ret
=
*
(
long
double
*
)
tmp
;
break
;
default:
return
FALSE
;
}
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
else
if
(
size
==
sizeof
(
double
))
*
ret
=
*
(
double
*
)
tmp
;
else
if
(
size
==
sizeof
(
long
double
))
*
ret
=
*
(
long
double
*
)
tmp
;
else
return
FALSE
;
return
TRUE
;
}
...
...
programs/winedbg/be_x86_64.c
View file @
e2761ab0
...
...
@@ -631,13 +631,11 @@ static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
if
(
!
memory_read_value
(
lvalue
,
size
,
tmp
))
return
FALSE
;
/* float & double types have to be promoted to a long double */
switch
(
size
)
{
case
sizeof
(
float
):
*
ret
=
*
(
float
*
)
tmp
;
break
;
case
sizeof
(
double
):
*
ret
=
*
(
double
*
)
tmp
;
break
;
case
sizeof
(
long
double
):
*
ret
=
*
(
long
double
*
)
tmp
;
break
;
default:
return
FALSE
;
}
if
(
size
==
sizeof
(
float
))
*
ret
=
*
(
float
*
)
tmp
;
else
if
(
size
==
sizeof
(
double
))
*
ret
=
*
(
double
*
)
tmp
;
else
if
(
size
==
sizeof
(
long
double
))
*
ret
=
*
(
long
double
*
)
tmp
;
else
return
FALSE
;
return
TRUE
;
}
...
...
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