applied uncrustify to csr source

master
Anton Lydike 3 years ago
parent c5afa93bb3
commit 5128b0376f

@ -6,9 +6,11 @@
#error "You set TIMECMP_IN_MEMORY but did not provide a memory addres in TIMECMP_MEM_ADDR!" #error "You set TIMECMP_IN_MEMORY but did not provide a memory addres in TIMECMP_MEM_ADDR!"
#endif #endif
void write_mtimecmp(unsigned long long int mtimecmp) { void write_mtimecmp(unsigned long long int mtimecmp)
{
unsigned int lo = mtimecmp; unsigned int lo = mtimecmp;
unsigned int hi = mtimecmp >> 32; unsigned int hi = mtimecmp >> 32;
__asm__ ( __asm__ (
"li t0, %0\n" "li t0, %0\n"
"sw %1, 0(t0)\n" "sw %1, 0(t0)\n"
@ -19,9 +21,11 @@ void write_mtimecmp(unsigned long long int mtimecmp) {
#else #else
void write_mtimecmp(unsigned long long int mtimecmp) { void write_mtimecmp(unsigned long long int mtimecmp)
{
unsigned int lower = mtimecmp; unsigned int lower = mtimecmp;
unsigned int higher = mtimecmp >> 32; unsigned int higher = mtimecmp >> 32;
__asm__ ( __asm__ (
"csrw %0, %2\n" "csrw %0, %2\n"
"csrw %1, %3" :: "csrw %1, %3" ::

@ -37,8 +37,10 @@
void write_mtimecmp(unsigned long long int mtimecmp); void write_mtimecmp(unsigned long long int mtimecmp);
inline __attribute__((always_inline)) unsigned long long int read_time() { inline __attribute__((always_inline)) unsigned long long int read_time()
{
unsigned int lower, higher; unsigned int lower, higher;
__asm__ ( __asm__ (
"csrr %0, %2\n" "csrr %0, %2\n"
"csrr %1, %3\n" "csrr %1, %3\n"

Loading…
Cancel
Save