Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2e8ecdc0
Commit
2e8ecdc0
authored
Oct 31, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Fix masking and shifting in VIS fpcmp emulation.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
a52312b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
arch/sparc/kernel/visemul.c
arch/sparc/kernel/visemul.c
+16
-16
No files found.
arch/sparc/kernel/visemul.c
View file @
2e8ecdc0
...
@@ -713,17 +713,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
...
@@ -713,17 +713,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
if
(
a
>
b
)
if
(
a
>
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
8
>>
i
;
}
}
break
;
break
;
case
FCMPGT32_OPF
:
case
FCMPGT32_OPF
:
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
;
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
ffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
ffff
;
if
(
a
>
b
)
if
(
a
>
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
2
>>
i
;
}
}
break
;
break
;
...
@@ -733,17 +733,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
...
@@ -733,17 +733,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
if
(
a
<=
b
)
if
(
a
<=
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
8
>>
i
;
}
}
break
;
break
;
case
FCMPLE32_OPF
:
case
FCMPLE32_OPF
:
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
;
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
ffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
ffff
;
if
(
a
<=
b
)
if
(
a
<=
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
2
>>
i
;
}
}
break
;
break
;
...
@@ -753,17 +753,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
...
@@ -753,17 +753,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
if
(
a
!=
b
)
if
(
a
!=
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
8
>>
i
;
}
}
break
;
break
;
case
FCMPNE32_OPF
:
case
FCMPNE32_OPF
:
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
;
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
ffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
ffff
;
if
(
a
!=
b
)
if
(
a
!=
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
2
>>
i
;
}
}
break
;
break
;
...
@@ -773,17 +773,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
...
@@ -773,17 +773,17 @@ static void pcmp(struct pt_regs *regs, unsigned int insn, unsigned int opf)
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
s16
b
=
(
rs2
>>
(
i
*
16
))
&
0xffff
;
if
(
a
==
b
)
if
(
a
==
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
8
>>
i
;
}
}
break
;
break
;
case
FCMPEQ32_OPF
:
case
FCMPEQ32_OPF
:
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
;
s32
a
=
(
rs1
>>
(
i
*
32
))
&
0xffff
ffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
;
s32
b
=
(
rs2
>>
(
i
*
32
))
&
0xffff
ffff
;
if
(
a
==
b
)
if
(
a
==
b
)
rd_val
|=
1
<<
i
;
rd_val
|=
2
>>
i
;
}
}
break
;
break
;
}
}
...
...
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