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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-m68knommu/] [elf.h] - Blame information for rev 1778

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

Line No. Rev Author Line
1 199 simons
#ifndef __ASMm68k_ELF_H
2
#define __ASMm68k_ELF_H
3
 
4
/*
5
 * ELF register definitions..
6
 */
7
 
8
#include <asm/ptrace.h>
9
 
10
typedef unsigned long elf_greg_t;
11
 
12
#define ELF_NGREG 20 /* d1-d7/a0-a6/d0/usp/orig_d0/sr/pc/fmtvec */
13
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
14
 
15
typedef struct user_m68kfp_struct elf_fpregset_t;
16
 
17
/*
18
 * This is used to ensure we don't load something for the wrong architecture.
19
 */
20
#define elf_check_arch(x) ((x) == EM_68K)
21
 
22
/*
23
 * These are used to set parameters in the core dumps.
24
 */
25
#define ELF_CLASS       ELFCLASS32
26
#define ELF_DATA        ELFDATA2MSB;
27
#define ELF_ARCH        EM_68K
28
 
29
        /* For SVR4/m68k the function pointer to be registered with
30
           `atexit' is passed in %a1.  Although my copy of the ABI has
31
           no such statement, it is actually used on ASV.  */
32
#define ELF_PLAT_INIT(_r)       _r->a1 = 0
33
 
34
#define USE_ELF_CORE_DUMP
35
#define ELF_EXEC_PAGESIZE       4096
36
 
37
#define ELF_CORE_COPY_REGS(pr_reg, regs)                                \
38
        /* Bleech. */                                                   \
39
        pr_reg[0] = regs->d1;                                            \
40
        pr_reg[1] = regs->d2;                                           \
41
        pr_reg[2] = regs->d3;                                           \
42
        pr_reg[3] = regs->d4;                                           \
43
        pr_reg[4] = regs->d5;                                           \
44
        pr_reg[7] = regs->a0;                                           \
45
        pr_reg[8] = regs->a1;                                           \
46
        pr_reg[14] = regs->d0;                                          \
47
        pr_reg[15] = rdusp();                                           \
48
        pr_reg[16] = 0; /* orig_d0 */                                    \
49
        pr_reg[17] = regs->sr;                                          \
50
        pr_reg[18] = regs->pc;                                          \
51
        {                                                               \
52
          struct switch_stack *sw = ((struct switch_stack *)regs) - 1;  \
53
          pr_reg[5] = sw->d6;                                           \
54
          pr_reg[6] = sw->d7;                                           \
55
          pr_reg[9] = sw->a2;                                           \
56
          pr_reg[10] = sw->a3;                                          \
57
          pr_reg[11] = sw->a4;                                          \
58
          pr_reg[12] = sw->a5;                                          \
59
          pr_reg[13] = sw->a6;                                          \
60
        }
61
 
62
#endif

powered by: WebSVN 2.1.0

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