blob: 3fa3f4848725c423bcfc526603b98f975f8037f1 [file] [log] [blame]
#pragma once
#define MAX_NUM_CORES 16 // it's safe to change this as needed
#ifndef __ASSEMBLER__
static __inline unsigned int read_fsr(void)
{
unsigned int fsr;
asm volatile ("mffsr %0" : "=r"(fsr));
return fsr;
}
static __inline void write_fsr(unsigned int fsr)
{
asm volatile ("mtfsr %0" :: "r"(fsr));
}
#endif /* !__ASSEMBLER__ */