Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
0149d937
Commit
0149d937
authored
Jan 17, 2015
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize symbols for fat routines.
parent
f003aee6
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
18 deletions
+28
-18
ChangeLog
ChangeLog
+10
-0
asm.m4
asm.m4
+6
-5
config.m4.in
config.m4.in
+1
-1
fat-x86_64.c
fat-x86_64.c
+5
-6
x86_64/fat/aes-decrypt-internal-2.asm
x86_64/fat/aes-decrypt-internal-2.asm
+1
-1
x86_64/fat/aes-decrypt-internal.asm
x86_64/fat/aes-decrypt-internal.asm
+1
-1
x86_64/fat/aes-encrypt-internal-2.asm
x86_64/fat/aes-encrypt-internal-2.asm
+1
-1
x86_64/fat/aes-encrypt-internal.asm
x86_64/fat/aes-encrypt-internal.asm
+1
-1
x86_64/fat/memxor-2.asm
x86_64/fat/memxor-2.asm
+1
-1
x86_64/fat/memxor.asm
x86_64/fat/memxor.asm
+1
-1
No files found.
ChangeLog
View file @
0149d937
2015-01-17 Niels Möller <nisse@lysator.liu.se>
* config.m4.in (SYMBOL_PREFIX): Define from from autoconf
ASM_SYMBOL_PREFIX.
(C_NAMS): move definition to...
* asm.m4 (C_NAME): Define here, also take fat_transform.
(fat_suffix): Replaced by...
(fat_transform): New macro, taking symbol nama as argument.
Updated all uses of fat_suffix.
* fat-x86_64.c: Updated for internal "_nettle" prefix on
cpu-specific memxor functions.
* fat-x86_64.c: Set up for sse2 vs non-sse2 memxor. Patch by Nikos
Mavrogiannopoulos.
* configure.ac (asm_nettle_optional_list): Added memxor-2.asm.
...
...
asm.m4
View file @
0149d937
...
...
@@ -13,7 +13,8 @@ dnl Including files from the srcdir
define(<include_src>, <include(srcdir/$1)>)dnl
dnl default definition, changed in fat builds
define(<fat_suffix>, <>)
define(<fat_transform>, <$1>)
define(<C_NAME>, <SYMBOL_PREFIX<>fat_transform($1)>)
dnl Pseudo ops
define(<DECLARE_FUNC>,
...
...
@@ -27,13 +28,13 @@ COFF_STYLE, yes,
<>)>)
define(<PROLOGUE>,
<.globl C_NAME($1)
<>fat_suffix
DECLARE_FUNC(C_NAME($1)
<>fat_suffix
)
C_NAME($1)
<>fat_suffix
:>)
<.globl C_NAME($1)
DECLARE_FUNC(C_NAME($1))
C_NAME($1):>)
define(<EPILOGUE>,
<ifelse(ELF_STYLE,yes,
<.size C_NAME($1)
<>fat_suffix, . - C_NAME($1)<>fat_suffix
>,<>)>)
<.size C_NAME($1)
, . - C_NAME($1)
>,<>)>)
define(<m4_log2>, <m4_log2_internal($1,1,0)>)
define(<m4_log2_internal>,
...
...
config.m4.in
View file @
0149d937
define(<srcdir>, <<@srcdir@>>)dnl
define(<
C_NAME
>, <@ASM_SYMBOL_PREFIX@><$1>)dnl
define(<
SYMBOL_PREFIX
>, <@ASM_SYMBOL_PREFIX@><$1>)dnl
define(<ELF_STYLE>, <@ASM_ELF_STYLE@>)dnl
define(<COFF_STYLE>, <@ASM_COFF_STYLE@>)dnl
define(<TYPE_FUNCTION>, <@ASM_TYPE_FUNCTION@>)dnl
...
...
fat-x86_64.c
View file @
0149d937
...
...
@@ -105,10 +105,9 @@ aes_crypt_internal_func _nettle_aes_decrypt_aesni;
typedef
void
*
(
memxor_func
)(
void
*
dst_in
,
const
void
*
src_in
,
size_t
n
);
/* FIXME: Fix fat name-mangling to get _nettle prefix. */
memxor_func
nettle_memxor
IFUNC
(
"_memxor_resolve"
);
memxor_func
nettle_memxor_x86_64
;
memxor_func
nettle_memxor_sse2
;
memxor_func
_
nettle_memxor_x86_64
;
memxor_func
_
nettle_memxor_sse2
;
#if HAVE_LINK_IFUNC
#define _aes_encrypt_init NULL
...
...
@@ -120,7 +119,7 @@ static aes_crypt_internal_func _aes_decrypt_init;
static
aes_crypt_internal_func
*
_aes_encrypt_vec
=
_aes_encrypt_init
;
static
aes_crypt_internal_func
*
_aes_decrypt_vec
=
_aes_decrypt_init
;
static
memxor_func
*
_memxor_vec
=
nettle_memxor_x86_64
;
static
memxor_func
*
_memxor_vec
=
_
nettle_memxor_x86_64
;
/* This function should usually be called only once, at startup. But
it is idempotent, and on x86, pointer updates are atomic, so
...
...
@@ -167,13 +166,13 @@ fat_init (void)
{
if
(
verbose
)
fprintf
(
stderr
,
"libnettle: intel SSE2 will be used for XOR.
\n
"
);
_memxor_vec
=
nettle_memxor_sse2
;
_memxor_vec
=
_
nettle_memxor_sse2
;
}
else
{
if
(
verbose
)
fprintf
(
stderr
,
"libnettle: intel SSE2 will not be used for XOR.
\n
"
);
_memxor_vec
=
nettle_memxor_x86_64
;
_memxor_vec
=
_
nettle_memxor_x86_64
;
}
/* The x86_64 architecture should always make stores visible in the
...
...
x86_64/fat/aes-decrypt-internal-2.asm
View file @
0149d937
...
...
@@ -31,5 +31,5 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_aesni
>
)
define
(
<
fat_
transform
>
,
<
$
1
_aesni
>
)
include_src
(
<
x86_64
/
aesni
/
aes
-
decrypt
-
internal.asm
>
)
x86_64/fat/aes-decrypt-internal.asm
View file @
0149d937
...
...
@@ -31,5 +31,5 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_x86_64
>
)
define
(
<
fat_
transform
>
,
<
$
1
_x86_64
>
)
include_src
(
<
x86_64
/
aes
-
decrypt
-
internal.asm
>
)
x86_64/fat/aes-encrypt-internal-2.asm
View file @
0149d937
...
...
@@ -31,5 +31,5 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_aesni
>
)
define
(
<
fat_
transform
>
,
<
$
1
_aesni
>
)
include_src
(
<
x86_64
/
aesni
/
aes
-
encrypt
-
internal.asm
>
)
x86_64/fat/aes-encrypt-internal.asm
View file @
0149d937
...
...
@@ -31,5 +31,5 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_x86_64
>
)
define
(
<
fat_
transform
>
,
<
$
1
_x86_64
>
)
include_src
(
<
x86_64
/
aes
-
encrypt
-
internal.asm
>
)
x86_64/fat/memxor-2.asm
View file @
0149d937
...
...
@@ -31,6 +31,6 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_sse2
>
)
define
(
<
fat_
transform
>
,
<
_$1
_sse2
>
)
define
(
<
USE_SSE2
>
,
<
yes
>
)
include_src
(
<
x86_64
/
memxor.asm
>
)
x86_64/fat/memxor.asm
View file @
0149d937
...
...
@@ -31,5 +31,5 @@ ifelse(<
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
define
(
<
fat_
suffix
>
,
<
_x86_64
>
)
define
(
<
fat_
transform
>
,
<
_$1
_x86_64
>
)
include_src
(
<
x86_64
/
memxor.asm
>
)
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