projects
/
shamirs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1eda9ca
)
Fix noinline already defined
author
Matt Corallo
<git@bluematt.me>
Sun, 8 Sep 2013 04:11:09 +0000
(
00:11
-0400)
committer
Matt Corallo
<git@bluematt.me>
Thu, 5 Sep 2013 15:01:41 +0000
(11:01 -0400)
shamirssecret.c
patch
|
blob
|
history
diff --git
a/shamirssecret.c
b/shamirssecret.c
index bc3bb3fe3ebf330d69e1709c81c001faebb58320..f440f49f21d7d2d9d7413f048b8cc546b38c0536 100644
(file)
--- a/
shamirssecret.c
+++ b/
shamirssecret.c
@@
-27,6
+27,10
@@
#include "shamirssecret.h"
#include "shamirssecret.h"
+#ifndef noinline
+#define noinline __attribute__((noinline))
+#endif
+
/*
* Calculations across the finite field GF(2^8)
*/
/*
* Calculations across the finite field GF(2^8)
*/
@@
-85,7
+89,7
@@
static const uint8_t log[P] = {
0x4a, 0xed, 0xde, 0xc5, 0x31, 0xfe, 0x18, 0x0d, 0x63, 0x8c, 0x80, 0xc0, 0xf7, 0x70, 0x07};
// We disable lots of optimizations that result in non-constant runtime (+/- branch delays)
0x4a, 0xed, 0xde, 0xc5, 0x31, 0xfe, 0x18, 0x0d, 0x63, 0x8c, 0x80, 0xc0, 0xf7, 0x70, 0x07};
// We disable lots of optimizations that result in non-constant runtime (+/- branch delays)
-static uint8_t field_mul_ret(uint8_t calc, uint8_t a, uint8_t b) __attribute__((optimize("-O0")))
__attribute__((noinline))
;
+static uint8_t field_mul_ret(uint8_t calc, uint8_t a, uint8_t b) __attribute__((optimize("-O0")))
noinline
;
static uint8_t field_mul_ret(uint8_t calc, uint8_t a, uint8_t b) {
uint8_t ret, ret2;
if (a == 0)
static uint8_t field_mul_ret(uint8_t calc, uint8_t a, uint8_t b) {
uint8_t ret, ret2;
if (a == 0)
@@
-108,7
+112,7
@@
static uint8_t field_invert(uint8_t a) {
}
// We disable lots of optimizations that result in non-constant runtime (+/- branch delays)
}
// We disable lots of optimizations that result in non-constant runtime (+/- branch delays)
-static uint8_t field_pow_ret(uint8_t calc, uint8_t a, uint8_t e) __attribute__((optimize("-O0")))
__attribute__((noinline))
;
+static uint8_t field_pow_ret(uint8_t calc, uint8_t a, uint8_t e) __attribute__((optimize("-O0")))
noinline
;
static uint8_t field_pow_ret(uint8_t calc, uint8_t a, uint8_t e) {
uint8_t ret, ret2;
if (a == 0)
static uint8_t field_pow_ret(uint8_t calc, uint8_t a, uint8_t e) {
uint8_t ret, ret2;
if (a == 0)