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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-armnommu/] [proc-armo/] [ptrace.h] - Blame information for rev 1777

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

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 * linux/include/asm-arm/proc-armo/ptrace.h
3
 *
4
 * Copyright (C) 1996 Russell King
5
 */
6
 
7
#ifndef __ASM_PROC_PTRACE_H
8
#define __ASM_PROC_PTRACE_H
9
 
10
/* this struct defines the way the registers are stored on the
11
   stack during a system call. */
12
 
13
struct pt_regs {
14
        long uregs[17];
15
};
16
 
17
#define ARM_pc          uregs[15]
18
#define ARM_lr          uregs[14]
19
#define ARM_sp          uregs[13]
20
#define ARM_ip          uregs[12]
21
#define ARM_fp          uregs[11]
22
#define ARM_r10         uregs[10]
23
#define ARM_r9          uregs[9]
24
#define ARM_r8          uregs[8]
25
#define ARM_r7          uregs[7]
26
#define ARM_r6          uregs[6]
27
#define ARM_r5          uregs[5]
28
#define ARM_r4          uregs[4]
29
#define ARM_r3          uregs[3]
30
#define ARM_r2          uregs[2]
31
#define ARM_r1          uregs[1]
32
#define ARM_r0          uregs[0]
33
#define ARM_ORIG_r0     uregs[16] /* -1 */
34
 
35
#define USR26_MODE      0x00
36
#define FIQ26_MODE      0x01
37
#define IRQ26_MODE      0x02
38
#define SVC26_MODE      0x03
39
#define MODE_MASK       0x03
40
#define F_BIT           (1 << 26)
41
#define I_BIT           (1 << 27)
42
#define CC_V_BIT        (1 << 28)
43
#define CC_C_BIT        (1 << 29)
44
#define CC_Z_BIT        (1 << 30)
45
#define CC_N_BIT        (1 << 31)
46
 
47
#define user_mode(regs) \
48
        (((regs)->ARM_pc & MODE_MASK) == USR26_MODE)
49
 
50
#define processor_mode(regs) \
51
        ((regs)->ARM_pc & MODE_MASK)
52
 
53
#define interrupts_enabled(regs) \
54
        (!((regs)->ARM_pc & I_BIT))
55
 
56
#define fast_interrupts_enabled(regs) \
57
        (!((regs)->ARM_pc & F_BIT))
58
 
59
#define condition_codes(regs) \
60
        ((regs)->ARM_pc & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT))
61
 
62
#define instruction_pointer(regs)       ((regs)->ARM_pc & 0x03fffffc)
63
#define pc_pointer(v)                   ((v) & 0x03fffffc)
64
 
65
#define valid_user_regs(regs) \
66
        (user_mode(regs) && ((regs)->ARM_sp & 3) == 0)
67
#endif
68
 

powered by: WebSVN 2.1.0

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