diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2013-08-29 05:05:48 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 11:16:48 -0400 |
commit | 648ae35c54b147c3b25d212f2936bb1cb91ea7d0 (patch) | |
tree | 32b1571120c4b0984968e924225375f2a248cdb1 /arch/s390/kernel | |
parent | f616d6760716f702b3aa459fd20c8d8cce693abd (diff) |
s390/dis: move common definitions to a header file
The patch moves some of the definitions to a
header file. No functional changes involved.
I have retained the Copyright Statement from the
original file.
Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com>
[Heiko Carstens: rename s390-dis.h to dis.h]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/dis.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 5fb278eb5e46..ce554f3ec445 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kdebug.h> | 23 | #include <linux/kdebug.h> |
24 | 24 | ||
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/dis.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <linux/atomic.h> | 28 | #include <linux/atomic.h> |
28 | #include <asm/mathemu.h> | 29 | #include <asm/mathemu.h> |
@@ -37,17 +38,6 @@ | |||
37 | #define ONELONG "%016lx: " | 38 | #define ONELONG "%016lx: " |
38 | #endif /* CONFIG_64BIT */ | 39 | #endif /* CONFIG_64BIT */ |
39 | 40 | ||
40 | #define OPERAND_GPR 0x1 /* Operand printed as %rx */ | ||
41 | #define OPERAND_FPR 0x2 /* Operand printed as %fx */ | ||
42 | #define OPERAND_AR 0x4 /* Operand printed as %ax */ | ||
43 | #define OPERAND_CR 0x8 /* Operand printed as %cx */ | ||
44 | #define OPERAND_DISP 0x10 /* Operand printed as displacement */ | ||
45 | #define OPERAND_BASE 0x20 /* Operand printed as base register */ | ||
46 | #define OPERAND_INDEX 0x40 /* Operand printed as index register */ | ||
47 | #define OPERAND_PCREL 0x80 /* Operand printed as pc-relative symbol */ | ||
48 | #define OPERAND_SIGNED 0x100 /* Operand printed as signed value */ | ||
49 | #define OPERAND_LENGTH 0x200 /* Operand printed as length (+1) */ | ||
50 | |||
51 | enum { | 41 | enum { |
52 | UNUSED, /* Indicates the end of the operand list */ | 42 | UNUSED, /* Indicates the end of the operand list */ |
53 | R_8, /* GPR starting at position 8 */ | 43 | R_8, /* GPR starting at position 8 */ |
@@ -155,18 +145,6 @@ enum { | |||
155 | INSTR_S_00, INSTR_S_RD, | 145 | INSTR_S_00, INSTR_S_RD, |
156 | }; | 146 | }; |
157 | 147 | ||
158 | struct s390_operand { | ||
159 | int bits; /* The number of bits in the operand. */ | ||
160 | int shift; /* The number of bits to shift. */ | ||
161 | int flags; /* One bit syntax flags. */ | ||
162 | }; | ||
163 | |||
164 | struct s390_insn { | ||
165 | const char name[5]; | ||
166 | unsigned char opfrag; | ||
167 | unsigned char format; | ||
168 | }; | ||
169 | |||
170 | static const struct s390_operand operands[] = | 148 | static const struct s390_operand operands[] = |
171 | { | 149 | { |
172 | [UNUSED] = { 0, 0, 0 }, | 150 | [UNUSED] = { 0, 0, 0 }, |
@@ -1608,11 +1586,6 @@ static unsigned int extract_operand(unsigned char *code, | |||
1608 | return val; | 1586 | return val; |
1609 | } | 1587 | } |
1610 | 1588 | ||
1611 | static inline int insn_length(unsigned char code) | ||
1612 | { | ||
1613 | return ((((int) code + 64) >> 7) + 1) << 1; | ||
1614 | } | ||
1615 | |||
1616 | static struct s390_insn *find_insn(unsigned char *code) | 1589 | static struct s390_insn *find_insn(unsigned char *code) |
1617 | { | 1590 | { |
1618 | unsigned char opfrag = code[1]; | 1591 | unsigned char opfrag = code[1]; |