URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [branches/] [oc/] [orpmon/] [include/] [support.h] - Rev 1771
Go to most recent revision | Compare with Previous | Blame | View Log
/* Support file for or32 tests. This file should is included in each test. It calls main() function and add support for basic functions */ #ifndef SUPPORT_H #define SUPPORT_H #include <stdarg.h> #include <stddef.h> #include <limits.h> //#include <_ansi.h> /* Register access macros */ #define REG8(add) *((volatile unsigned char *)(add)) #define REG16(add) *((volatile unsigned short *)(add)) #define REG32(add) *((volatile unsigned long *)(add)) /* For writing into SPR. */ void mtspr(unsigned long spr, unsigned long value); /* For reading SPR. */ unsigned long mfspr(unsigned long spr); /* Function to be called at entry point - not defined here. */ int main (int, char **); /* Prints out a value */ void report(unsigned long value); /* return value by making a syscall */ extern void exit (int i) __attribute__ ((__noreturn__)); /* memcpy clone */ extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n); int memcmp (void *__restrict dstvoid, __const void *__restrict srcvoid, size_t length); extern void *memchr (void *__restrict dstvoid, __const char data, size_t length); extern int strlen (__const char *srcvoid); extern int strcmp (const char *s1, const char *s2); extern char *strcpy (char *dst0, char *src0); extern unsigned long timestamp; extern void reset_timer (void); extern unsigned long get_timer (unsigned long base); extern void set_timer (unsigned long t); #endif
Go to most recent revision | Compare with Previous | Blame | View Log