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
Kirill Smelkov
linux
Commits
27f7bfe1
Commit
27f7bfe1
authored
Jan 27, 2004
by
Jean-Luc Cooke
Committed by
Hideaki Yoshifuji
Jan 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CRYPTO]: Help gcc optimize sha256/sha512 better.
parent
01477f1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
crypto/sha256.c
crypto/sha256.c
+2
-2
crypto/sha512.c
crypto/sha512.c
+2
-2
No files found.
crypto/sha256.c
View file @
27f7bfe1
...
@@ -34,12 +34,12 @@ struct sha256_ctx {
...
@@ -34,12 +34,12 @@ struct sha256_ctx {
static
inline
u32
Ch
(
u32
x
,
u32
y
,
u32
z
)
static
inline
u32
Ch
(
u32
x
,
u32
y
,
u32
z
)
{
{
return
((
x
&
y
)
^
(
~
x
&
z
));
return
z
^
(
x
&
(
y
^
z
));
}
}
static
inline
u32
Maj
(
u32
x
,
u32
y
,
u32
z
)
static
inline
u32
Maj
(
u32
x
,
u32
y
,
u32
z
)
{
{
return
(
(
x
&
y
)
^
(
x
&
z
)
^
(
y
&
z
));
return
(
x
&
y
)
|
(
z
&
(
x
|
y
));
}
}
static
inline
u32
RORu32
(
u32
x
,
u32
y
)
static
inline
u32
RORu32
(
u32
x
,
u32
y
)
...
...
crypto/sha512.c
View file @
27f7bfe1
...
@@ -34,12 +34,12 @@ struct sha512_ctx {
...
@@ -34,12 +34,12 @@ struct sha512_ctx {
static
inline
u64
Ch
(
u64
x
,
u64
y
,
u64
z
)
static
inline
u64
Ch
(
u64
x
,
u64
y
,
u64
z
)
{
{
return
((
x
&
y
)
^
(
~
x
&
z
));
return
z
^
(
x
&
(
y
^
z
));
}
}
static
inline
u64
Maj
(
u64
x
,
u64
y
,
u64
z
)
static
inline
u64
Maj
(
u64
x
,
u64
y
,
u64
z
)
{
{
return
(
(
x
&
y
)
^
(
x
&
z
)
^
(
y
&
z
));
return
(
x
&
y
)
|
(
z
&
(
x
|
y
));
}
}
static
inline
u64
RORu64
(
u64
x
,
u64
y
)
static
inline
u64
RORu64
(
u64
x
,
u64
y
)
...
...
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