Protect Sandy2x files against double compilation (Cocoapods...)

This commit is contained in:
Frank Denis 2015-11-04 19:03:13 +01:00
parent e5f768a96e
commit 0ca0ff8923
7 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
/*
REDMASK51 is from amd64-51/consts.s.
*/
@ -19,3 +21,5 @@ m26: .quad 67108863, 67108863
subc0: .quad 0x07FFFFDA, 0x03FFFFFE
subc2: .quad 0x07FFFFFE, 0x03FFFFFE
REDMASK51: .quad 0x0007FFFFFFFFFFFF
#endif

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
/*
This file is basically amd64-51/fe25519_mul.s.
*/
@ -183,3 +185,5 @@ add %r11,%rsp
mov %rdi,%rax
mov %rsi,%rdx
ret
#endif

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
/*
This file is adapted from amd64-51/fe25519_square.s:
Adding loop to perform n squares.
@ -159,3 +161,5 @@ movq 40(%rsp),%rbx
movq 48(%rsp),%rbp
add %r11,%rsp
ret
#endif

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
/*
This file is the result of merging
amd64-51/fe25519_pack.c and amd64-51/fe25519_freeze.s.
@ -213,3 +215,5 @@ movq 0(%rsp),%r11
movq 8(%rsp),%r12
add %r11,%rsp
ret
#endif

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
#include "ladder_namespace.h"
#include "consts_namespace.h"
.p2align 5
@ -1426,3 +1428,5 @@ movq 1840(%rsp),%r13
movq 1848(%rsp),%r14
add %r11,%rsp
ret
#endif

View File

@ -1,3 +1,5 @@
#ifdef IN_SANDY2X
#include "ladder_base_namespace.h"
#include "consts_namespace.h"
.p2align 5
@ -1281,3 +1283,5 @@ movq 1544(%rsp),%r12
movq 1552(%rsp),%r13
add %r11,%rsp
ret
#endif

View File

@ -1,4 +1,8 @@
#ifdef HAVE_AMD64_ASM
#define IN_SANDY2X
#include "consts.S"
#include "fe51_mul.S"
#include "fe51_nsquare.S"
@ -9,3 +13,5 @@
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
#endif