1 /*
2 * include/asm-s390/s390-gdbregs.h
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
7 *
8 * used both by the linux kernel for remote debugging & gdb
9 */
10
11 /* Say how long (ordinary) registers are. This is a piece of bogosity
12 used in push_word and a few other places; REGISTER_RAW_SIZE is the
13 real way to know how big a register is. */
14 #ifndef _S390_GDBREGS_H
15 #define _S390_GDBREGS_H
16
17 #include <asm/s390-regs-common.h>
18 #define S390_MAX_INSTR_SIZE 6
19 #define NUM_REGS (2+NUM_GPRS+NUM_ACRS+NUM_CRS+1+NUM_FPRS)
20 #define FIRST_ACR (2+NUM_GPRS)
21 #define LAST_ACR (FIRST_ACR+NUM_ACRS-1)
22 #define FIRST_CR (FIRST_ACR+NUM_ACRS)
23 #define LAST_CR (FIRST_CR+NUM_CRS-1)
24
25 #define PSWM_REGNUM 0
26 #define PC_REGNUM 1
27 #define GP0_REGNUM 2 /* GPR register 0 */
28 #define GP_LAST_REGNUM (GP0_REGNUM+NUM_GPRS-1)
29 #define RETADDR_REGNUM (GP0_REGNUM+14) /* Usually return address */
30 #define SP_REGNUM (GP0_REGNUM+15) /* Contains address of top of stack */
31 #define FP_REGNUM SP_REGNUM /* needed in findvar.c still */
32 #define FRAME_REGNUM (GP0_REGNUM+11)
33 #define FPC_REGNUM (GP0_REGNUM+NUM_GPRS+NUM_ACRS+NUM_CRS)
34 #define FP0_REGNUM (FPC_REGNUM+1) /* FPR (Floating point) register 0 */
35 #define FPLAST_REGNUM (FP0_REGNUM+NUM_FPRS-1) /* Last floating point register */
36
37 /* The top of this structure is as similar as possible to a pt_regs structure to */
38 /* simplify code */
39 typedef struct
40 {
41 S390_REGS_COMMON
42 __u32 crs[NUM_CRS];
43 s390_fp_regs fp_regs;
44 } s390_gdb_regs __attribute__((packed));
45
46 #define REGISTER_NAMES \
47 { \
48 "pswm","pswa", \
49 "gpr0","gpr1","gpr2","gpr3","gpr4","gpr5","gpr6","gpr7", \
50 "gpr8","gpr9","gpr10","gpr11","gpr12","gpr13","gpr14","gpr15", \
51 "acr0","acr1","acr2","acr3","acr4","acr5","acr6","acr7", \
52 "acr8","acr9","acr10","acr11","acr12","acr13","acr14","acr15", \
53 "cr0","cr1","cr2","cr3","cr4","cr5","cr6","cr7", \
54 "cr8","cr9","cr10","cr11","cr12","cr13","cr14","cr15", \
55 "fpc", \
56 "fpr0","fpr1","fpr2","fpr3","fpr4","fpr5","fpr6","fpr7", \
57 "fpr8","fpr9","fpr10","fpr11","fpr12","fpr13","fpr14","fpr15" \
58 }
59
60 /* Index within `registers' of the first byte of the space for
61 register N. */
62
63 #define FP0_OFFSET ((PSW_MASK_SIZE+PSW_ADDR_SIZE)+ \
64 (GPR_SIZE*NUM_GPRS)+(ACR_SIZE+NUM_ACRS)+ \
65 (CR_SIZE*NUM_CRS)+(FPC_SIZE+FPC_PAD_SIZE))
66
67 #define REGISTER_BYTES \
68 ((FP0_OFFSET)+(FPR_SIZE*NUM_FPRS))
69
70 #define REGISTER_BYTE(N) ((N) < FP0_REGNUM ? (N)*4:(FP0_OFFSET+((N)-FP0_REGNUM)*FPR_SIZE))
71
72 #endif
73
74
75
76
77
78
79
80
81
82
83
84
85
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.