OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [include/] [support.h] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 809 simons
/* Support file for or32 tests.  This file should is included
2
   in each test. It calls main() function and add support for
3
   basic functions */
4
 
5
#ifndef SUPPORT_H
6
#define SUPPORT_H
7
 
8
#include <stdarg.h>
9
#include <stddef.h>
10
#include <limits.h>
11
 
12
/* Register access macros */
13
#define REG8(add) *((volatile unsigned char *)(add))
14
#define REG16(add) *((volatile unsigned short *)(add))
15
#define REG32(add) *((volatile unsigned long *)(add))
16
 
17
/* For writing into SPR. */
18
void mtspr(unsigned long spr, unsigned long value);
19
 
20
/* For reading SPR. */
21
unsigned long mfspr(unsigned long spr);
22
 
23
/* Function to be called at entry point - not defined here.  */
24
int main (int, char **);
25
 
26
/* Prints out a value */
27
void report(unsigned long value);
28
 
29
/* return value by making a syscall */
30
extern void exit (int i) __attribute__ ((__noreturn__));
31
 
32 816 markom
/* some stdlib functions */
33
extern void *memcpy (void *dest, const void *src, unsigned long n);
34
extern void *memmove (void *dest, const void *src, unsigned long n);
35
int memcmp (void *dstvoid, const void *srcvoid, unsigned long length);
36
extern void *memchr (void * dstvoid, const char data, unsigned long length);
37
extern unsigned long strtoul (const char *str, char **endptr, int base);
38
extern int strlen (const char *src);
39 809 simons
extern int strcmp (const char *s1, const char *s2);
40
extern char *strcpy (char *dst0, char *src0);
41
 
42 816 markom
#define isspace(c) ((c) == ' ' || (c) == '\t')
43
 
44 809 simons
extern unsigned long timestamp;
45
extern void reset_timer (void);
46
extern unsigned long get_timer (unsigned long base);
47
extern void set_timer (unsigned long t);
48
 
49
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.