Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
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
go
Commits
6b573292
Commit
6b573292
authored
Mar 15, 2013
by
Keith Randall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: use AES hash for compound objects.
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/7716047
parent
a5b2623d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/pkg/runtime/alg.c
src/pkg/runtime/alg.c
+7
-0
No files found.
src/pkg/runtime/alg.c
View file @
6b573292
...
...
@@ -8,6 +8,8 @@
#define M0 (sizeof(uintptr)==4 ? 2860486313UL : 33054211828000289ULL)
#define M1 (sizeof(uintptr)==4 ? 3267000013UL : 23344194077549503ULL)
static
bool
use_aeshash
;
/*
* map and chan helpers for
* dealing with unknown types
...
...
@@ -17,6 +19,10 @@ runtime·memhash(uintptr *h, uintptr s, void *a)
{
byte
*
b
;
uintptr
hash
;
if
(
use_aeshash
)
{
runtime
·
aeshash
(
h
,
s
,
a
);
return
;
}
b
=
a
;
hash
=
M0
^
*
h
;
...
...
@@ -479,6 +485,7 @@ runtime·hashinit(void)
(
runtime
·
cpuid_ecx
&
(
1
<<
19
))
!=
0
)
{
// sse4.1 (pinsr{d,q})
byte
*
rnd
;
int32
n
;
use_aeshash
=
true
;
runtime
·
algarray
[
AMEM
].
hash
=
runtime
·
aeshash
;
runtime
·
algarray
[
AMEM8
].
hash
=
runtime
·
aeshash
;
runtime
·
algarray
[
AMEM16
].
hash
=
runtime
·
aeshash
;
...
...
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