Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
hal-cortexa.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include "
hal.h
"
3
4
void
hal_setup
(
const
enum
clock_mode
clock)
5
{
6
(void)clock;
7
//TODO figure out if we need to do someting here
8
}
9
10
uint64_t
hal_get_time
() {
11
12
#if defined(AARCH64)
13
14
uint64_t t;
15
asm
volatile
(
"mrs %0, PMCCNTR_EL0"
:
"=r"
(t));
16
return
t;
17
18
#elif defined(ARMV7l)
19
20
// TODO: this is actually a 32-bit counter, so it won't work for very long running schemes
21
// need to figure out a way to get a 64-bit cycle counter
22
unsigned
int
cc;
23
asm
volatile
(
"mrc p15, 0, %0, c9, c13, 0"
:
"=r"
(cc));
24
return
cc;
25
#elif defined(x8664)
26
uint64_t t = 0;
27
return
t;
28
#else
29
uint64_t t = 0;
30
return
t;
31
#endif
32
}
hal_get_time
uint64_t hal_get_time()
Definition
hal-cortexa.c:10
hal_setup
void hal_setup(const enum clock_mode clock)
Definition
hal-cortexa.c:4
hal.h
clock_mode
clock_mode
Definition
hal.h:7
E:
pqc-engineering-ssec-23
c-code
benchmarks
common
hal-cortexa.c
Generated by
1.14.0