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

Subversion Repositories or1k

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

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
//#include <_ansi.h>
12
 
13
/* Register access macros */
14
#define REG8(add) *((volatile unsigned char *)(add))
15
#define REG16(add) *((volatile unsigned short *)(add))
16
#define REG32(add) *((volatile unsigned long *)(add))
17
 
18
 
19
/* For writing into SPR. */
20
void mtspr(unsigned long spr, unsigned long value);
21
 
22
/* For reading SPR. */
23
unsigned long mfspr(unsigned long spr);
24
 
25
/* Function to be called at entry point - not defined here.  */
26
int main (int, char **);
27
 
28
/* Prints out a value */
29
void report(unsigned long value);
30
 
31
/* return value by making a syscall */
32
extern void exit (int i) __attribute__ ((__noreturn__));
33
 
34
/* memcpy clone */
35
extern void *memcpy (void *__restrict __dest,
36
                     __const void *__restrict __src, size_t __n);
37
int memcmp (void *__restrict dstvoid,
38
              __const void *__restrict srcvoid, size_t length);
39
extern void *memchr (void *__restrict dstvoid,
40
              __const char data, size_t length);
41
 
42
extern int strlen (__const char *srcvoid);
43
extern int strcmp (const char *s1, const char *s2);
44
extern char *strcpy (char *dst0, char *src0);
45
 
46
extern unsigned long timestamp;
47
extern void reset_timer (void);
48
extern unsigned long get_timer (unsigned long base);
49
extern void set_timer (unsigned long t);
50
 
51
#endif

powered by: WebSVN 2.1.0

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