Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CertiCompil
CompCert-KVX
Commits
472a0e03
Commit
472a0e03
authored
Jan 30, 2019
by
David Monniaux
Browse files
same format as the others
parent
b8a398d3
Changes
2
Show whitespace changes
Inline
Side-by-side
test/monniaux/bitsliced-tea/Makefile
View file @
472a0e03
all
:
$(CC)
-Wall
-O2
-D__BSTEA_MAIN_
-o
bstea_test bstea_test.c bstea.c
CFLAGS
=
-Wall
-O3
K1C_CC
=
k1-mbr-gcc
K1C_CFLAGS
=
-Wall
-O3
-std
=
c99
K1C_CCOMP
=
../../../ccomp
K1C_CCOMPFLAGS
=
-Wall
-O3
-D__thread
=
-D__int128
=
int
PRODUCTS
=
bstea.host bstea.gcc.k1c.out bstea.ccomp.k1c.out bstea.ccomp.k1c.s bstea.gcc.k1c.s bstea.gcc.k1c bstea.ccomp.k1c
all
:
$(PRODUCTS)
%.gcc.k1c.s
:
%.c
$(K1C_CC)
$(K1C_CFLAGS)
-S
$<
-o
$@
%.gcc.k1c.o
:
%.gcc.k1c.s
$(K1C_CC)
$(K1C_CFLAGS)
-c
$<
-o
$@
%.ccomp.k1c.s
:
%.c
$(K1C_CCOMP)
$(K1C_CCOMPFLAGS)
-S
$<
-o
$@
%.ccomp.k1c.o
:
%.ccomp.k1c.s
$(K1C_CCOMP)
$(K1C_CCOMPFLAGS)
-c
$<
-o
$@
bstea.host
:
bstea.c bstea_run.c bstea.h ../clock.c
$(CC)
$(CFLAGS)
bstea.c bstea_run.c ../clock.c
-o
$@
bstea.gcc.k1c.s bstea.ccomp.k1c.s bstea_run.gcc.k1c.s
:
bstea.h
bstea.gcc.k1c
:
bstea.gcc.k1c.o bstea_run.gcc.k1c.o ../clock.gcc.k1c.o
$(K1C_CC)
$(K1C_CFLAGS)
$+
-o
$@
bstea.ccomp.k1c
:
bstea.ccomp.k1c.o bstea_run.gcc.k1c.o ../clock.gcc.k1c.o
$(K1C_CCOMP)
$(K1C_CCOMPFLAGS)
$+
-o
$@
%.k1c.out
:
%.k1c
k1-cluster
--cycle-based
--
$<
|
tee
$@
clean
:
rm
-f
bstea_test
$(RM)
-f
$(PRODUCTS)
bstea.gcc.k1c.o bstea.ccomp.k1c.o bstea_run.gcc.k1c.o bstea_run.gcc.k1c.s
.PHONY
:
clean
test/monniaux/bitsliced-tea/bstea_
test
.c
→
test/monniaux/bitsliced-tea/bstea_
run
.c
View file @
472a0e03
...
...
@@ -4,7 +4,7 @@
#include "bstea.h"
#include "../clock.h"
/* pack and unpack a single value all over the data path */
static
void
pack
(
uint32_t
*
v
,
size_t
len
,
vector_width_t
*
bv
)
{
...
...
@@ -71,6 +71,8 @@ static void test_vectors() {
0x41ea3a0a
,
0x4e8e7829
}
}
};
for
(
i
=
0
;
i
<
sizeof
(
testv
)
/
sizeof
(
tvector_t
);
++
i
)
{
clock_start
();
for
(
j
=
0
;
j
<
TEA_BLOCK_SIZE
;
++
j
)
v
[
j
]
=
0
;
for
(
j
=
0
;
j
<
TEA_KEY_SIZE
;
++
j
)
k
[
j
]
=
0
;
...
...
@@ -108,17 +110,14 @@ static void test_vectors() {
&&
testv
[
i
].
key
[
2
]
==
key
[
2
]
\
&&
testv
[
i
].
key
[
3
]
==
key
[
3
]
);
clock_stop
();
printf
(
"test vector, %i,
\t
[PASSED]
\n
"
,
i
);
}
}
#ifdef __BSTEA_MAIN_
int
main
(
int
argc
,
char
*
argv
[])
{
test_vectors
();
print_total_clock
();
return
0
;
}
#endif
/* __BSTEA_MAIN_ */
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