/linux-2.6.39/arch/x86/lib/ |
D | insn.c | 25 #define get_next(t, insn) \ argument 26 ({t r; r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; }) 28 #define peek_next(t, insn) \ argument 29 ({t r; r = *(t*)insn->next_byte; r; }) 31 #define peek_nbyte_next(t, insn, n) \ argument 32 ({t r; r = *(t*)((insn)->next_byte + n); r; }) 40 void insn_init(struct insn *insn, const void *kaddr, int x86_64) in insn_init() argument 42 memset(insn, 0, sizeof(*insn)); in insn_init() 43 insn->kaddr = kaddr; in insn_init() 44 insn->next_byte = kaddr; in insn_init() [all …]
|
/linux-2.6.39/arch/x86/include/asm/ |
D | insn.h | 36 struct insn { struct 100 static inline insn_byte_t insn_last_prefix(struct insn *insn) in insn_last_prefix() argument 102 return insn->prefixes.bytes[3]; in insn_last_prefix() 105 extern void insn_init(struct insn *insn, const void *kaddr, int x86_64); 106 extern void insn_get_prefixes(struct insn *insn); 107 extern void insn_get_opcode(struct insn *insn); 108 extern void insn_get_modrm(struct insn *insn); 109 extern void insn_get_sib(struct insn *insn); 110 extern void insn_get_displacement(struct insn *insn); 111 extern void insn_get_immediate(struct insn *insn); [all …]
|
/linux-2.6.39/arch/arm/kernel/ |
D | kprobes-decode.c | 66 #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) argument 68 #define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos)) argument 74 #define is_writeback(insn) ((insn ^ 0x01000000) & 0x01200000) argument 423 kprobe_opcode_t insn = p->opcode; in simulate_bbl() local 425 int disp = branch_displacement(insn); in simulate_bbl() 427 if (insn & (1 << 24)) in simulate_bbl() 435 kprobe_opcode_t insn = p->opcode; in simulate_blx1() local 437 int disp = branch_displacement(insn); in simulate_blx1() 440 regs->ARM_pc = iaddr + 8 + disp + ((insn >> 23) & 0x2); in simulate_blx1() 446 kprobe_opcode_t insn = p->opcode; in simulate_blx2bx() local [all …]
|
D | unwind.c | 70 unsigned long *insn; /* pointer to the current instructions word */ member 170 ret = (*ctrl->insn >> (ctrl->byte * 8)) & 0xff; in unwind_get_byte() 173 ctrl->insn++; in unwind_get_byte() 187 unsigned long insn = unwind_get_byte(ctrl); in unwind_exec_insn() local 189 pr_debug("%s: insn = %08lx\n", __func__, insn); in unwind_exec_insn() 191 if ((insn & 0xc0) == 0x00) in unwind_exec_insn() 192 ctrl->vrs[SP] += ((insn & 0x3f) << 2) + 4; in unwind_exec_insn() 193 else if ((insn & 0xc0) == 0x40) in unwind_exec_insn() 194 ctrl->vrs[SP] -= ((insn & 0x3f) << 2) + 4; in unwind_exec_insn() 195 else if ((insn & 0xf0) == 0x80) { in unwind_exec_insn() [all …]
|
/linux-2.6.39/arch/powerpc/xmon/ |
D | spu.h | 91 #define SIGNED_EXTRACT(insn,size,pos) (((int)((insn) << (32-size-pos))) >> (32-size)) argument 92 #define UNSIGNED_EXTRACT(insn,size,pos) (((insn) >> pos) & ((1 << size)-1)) argument 94 #define DECODE_INSN_RT(insn) (insn & 0x7f) argument 95 #define DECODE_INSN_RA(insn) ((insn >> 7) & 0x7f) argument 96 #define DECODE_INSN_RB(insn) ((insn >> 14) & 0x7f) argument 97 #define DECODE_INSN_RC(insn) ((insn >> 21) & 0x7f) argument 99 #define DECODE_INSN_I10(insn) SIGNED_EXTRACT(insn,10,14) argument 100 #define DECODE_INSN_U10(insn) UNSIGNED_EXTRACT(insn,10,14) argument 103 #define DECODE_INSN_I16(insn) SIGNED_EXTRACT(insn,16,7) argument 104 #define DECODE_INSN_U16(insn) UNSIGNED_EXTRACT(insn,16,7) argument [all …]
|
D | spu-dis.c | 55 get_index_for_opcode (unsigned int insn) in get_index_for_opcode() argument 58 unsigned int opcode = insn >> (32-11); in get_index_for_opcode() 94 print_insn_spu (unsigned long insn, unsigned long memaddr) in print_insn_spu() argument 101 index = get_index_for_opcode (insn); in print_insn_spu() 105 printf(".long 0x%x", insn); in print_insn_spu() 117 int fb = (insn >> (32-18)) & 0x7f; in print_insn_spu() 138 DECODE_INSN_RT (insn)); in print_insn_spu() 142 DECODE_INSN_RA (insn)); in print_insn_spu() 146 DECODE_INSN_RB (insn)); in print_insn_spu() 150 DECODE_INSN_RC (insn)); in print_insn_spu() [all …]
|
/linux-2.6.39/arch/m32r/kernel/ |
D | align.c | 38 #define REG1(insn) (((insn) & 0x0f00) >> 8) argument 39 #define REG2(insn) ((insn) & 0x000f) argument 81 static int emu_addi(unsigned short insn, struct pt_regs *regs) in emu_addi() argument 83 char imm = (char)(insn & 0xff); in emu_addi() 84 int dest = REG1(insn); in emu_addi() 94 static int emu_ldi(unsigned short insn, struct pt_regs *regs) in emu_ldi() argument 96 char imm = (char)(insn & 0xff); in emu_ldi() 98 set_reg(regs, REG1(insn), (int)imm); in emu_ldi() 103 static int emu_add(unsigned short insn, struct pt_regs *regs) in emu_add() argument 105 int dest = REG1(insn); in emu_add() [all …]
|
D | ptrace.c | 256 compute_next_pc_for_16bit_insn(unsigned long insn, unsigned long pc, in compute_next_pc_for_16bit_insn() argument 265 if (insn & 0x00008000) in compute_next_pc_for_16bit_insn() 268 insn &= 0x7fff; /* right slot */ in compute_next_pc_for_16bit_insn() 270 insn >>= 16; /* left slot */ in compute_next_pc_for_16bit_insn() 272 op = (insn >> 12) & 0xf; in compute_next_pc_for_16bit_insn() 273 op2 = (insn >> 8) & 0xf; in compute_next_pc_for_16bit_insn() 274 op3 = (insn >> 4) & 0xf; in compute_next_pc_for_16bit_insn() 281 disp = (long)(insn << 24) >> 22; in compute_next_pc_for_16bit_insn() 289 disp = (long)(insn << 24) >> 22; in compute_next_pc_for_16bit_insn() 296 disp = (long)(insn << 24) >> 22; in compute_next_pc_for_16bit_insn() [all …]
|
/linux-2.6.39/arch/sparc/kernel/ |
D | unaligned_32.c | 30 static inline enum direction decode_direction(unsigned int insn) in decode_direction() argument 32 unsigned long tmp = (insn >> 21) & 1; in decode_direction() 37 if(((insn>>19)&0x3f) == 15) in decode_direction() 45 static inline int decode_access_size(unsigned int insn) in decode_access_size() argument 47 insn = (insn >> 19) & 3; in decode_access_size() 49 if(!insn) in decode_access_size() 51 else if(insn == 3) in decode_access_size() 53 else if(insn == 2) in decode_access_size() 56 printk("Impossible unaligned trap. insn=%08x\n", insn); in decode_access_size() 63 static inline int decode_signedness(unsigned int insn) in decode_signedness() argument [all …]
|
D | visemul.c | 288 static void edge(struct pt_regs *regs, unsigned int insn, unsigned int opf) in edge() argument 293 maybe_flush_windows(RS1(insn), RS2(insn), RD(insn), 0); in edge() 294 orig_rs1 = rs1 = fetch_reg(RS1(insn), regs); in edge() 295 orig_rs2 = rs2 = fetch_reg(RS2(insn), regs); in edge() 344 store_reg(regs, rd_val, RD(insn)); in edge() 366 static void array(struct pt_regs *regs, unsigned int insn, unsigned int opf) in array() argument 371 maybe_flush_windows(RS1(insn), RS2(insn), RD(insn), 0); in array() 372 rs1 = fetch_reg(RS1(insn), regs); in array() 373 rs2 = fetch_reg(RS2(insn), regs); in array() 397 store_reg(regs, rd_val, RD(insn)); in array() [all …]
|
D | unaligned_64.c | 36 static inline enum direction decode_direction(unsigned int insn) in decode_direction() argument 38 unsigned long tmp = (insn >> 21) & 1; in decode_direction() 43 switch ((insn>>19)&0xf) { in decode_direction() 53 static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) in decode_access_size() argument 57 tmp = ((insn >> 19) & 0xf); in decode_access_size() 68 printk("Impossible unaligned trap. insn=%08x\n", insn); in decode_access_size() 81 static inline int decode_asi(unsigned int insn, struct pt_regs *regs) in decode_asi() argument 83 if (insn & 0x800000) { in decode_asi() 84 if (insn & 0x2000) in decode_asi() 87 return (unsigned char)(insn >> 5); /* imm_asi */ in decode_asi() [all …]
|
/linux-2.6.39/arch/mips/kernel/ |
D | branch.c | 28 union mips_instruction insn; in __compute_return_epc() local 38 if (__get_user(insn.word, addr)) { in __compute_return_epc() 43 switch (insn.i_format.opcode) { in __compute_return_epc() 48 switch (insn.r_format.func) { in __compute_return_epc() 50 regs->regs[insn.r_format.rd] = epc + 8; in __compute_return_epc() 53 regs->cp0_epc = regs->regs[insn.r_format.rs]; in __compute_return_epc() 64 switch (insn.i_format.rt) { in __compute_return_epc() 67 if ((long)regs->regs[insn.i_format.rs] < 0) in __compute_return_epc() 68 epc = epc + 4 + (insn.i_format.simmediate << 2); in __compute_return_epc() 76 if ((long)regs->regs[insn.i_format.rs] >= 0) in __compute_return_epc() [all …]
|
/linux-2.6.39/drivers/staging/comedi/kcomedilib/ |
D | kcomedilib_main.c | 83 static int comedi_do_insn(struct comedi_device *dev, struct comedi_insn *insn) in comedi_do_insn() argument 89 if (insn->subdev >= dev->n_subdevices) { in comedi_do_insn() 93 s = dev->subdevices + insn->subdev; in comedi_do_insn() 96 printk(KERN_ERR "%d not useable subdevice\n", insn->subdev); in comedi_do_insn() 103 ret = comedi_check_chanlist(s, 1, &insn->chanspec); in comedi_do_insn() 116 switch (insn->insn) { in comedi_do_insn() 118 ret = s->insn_bits(dev, s, insn, insn->data); in comedi_do_insn() 122 ret = s->insn_config(dev, s, insn, insn->data); in comedi_do_insn() 138 struct comedi_insn insn; in comedi_dio_config() local 140 memset(&insn, 0, sizeof(insn)); in comedi_dio_config() [all …]
|
/linux-2.6.39/arch/powerpc/math-emu/ |
D | math.c | 219 u32 insn = 0; in do_mathemu() local 227 if (get_user(insn, (u32 *)pc)) in do_mathemu() 231 switch (insn >> 26) { in do_mathemu() 233 idx = (insn >> 16) & 0x1f; in do_mathemu() 234 sdisp = (insn & 0xffff); in do_mathemu() 235 op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); in do_mathemu() 240 idx = (insn >> 16) & 0x1f; in do_mathemu() 241 sdisp = (insn & 0xffff); in do_mathemu() 242 op0 = (void *)¤t->thread.TS_FPR((insn >> 21) & 0x1f); in do_mathemu() 248 idx = (insn >> 16) & 0x1f; in do_mathemu() [all …]
|
/linux-2.6.39/arch/x86/tools/ |
D | test_get_len.c | 70 static void dump_insn(FILE *fp, struct insn *insn) in dump_insn() argument 73 dump_field(fp, "prefixes", "\t", &insn->prefixes); in dump_insn() 74 dump_field(fp, "rex_prefix", "\t", &insn->rex_prefix); in dump_insn() 75 dump_field(fp, "vex_prefix", "\t", &insn->vex_prefix); in dump_insn() 76 dump_field(fp, "opcode", "\t", &insn->opcode); in dump_insn() 77 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn() 78 dump_field(fp, "sib", "\t", &insn->sib); in dump_insn() 79 dump_field(fp, "displacement", "\t", &insn->displacement); in dump_insn() 80 dump_field(fp, "immediate1", "\t", &insn->immediate1); in dump_insn() 81 dump_field(fp, "immediate2", "\t", &insn->immediate2); in dump_insn() [all …]
|
/linux-2.6.39/arch/sparc/mm/ |
D | btfixup.c | 77 unsigned insn; in btfixup() local 142 insn = *addr; in btfixup() 145 insn = *(unsigned int *)q[1]; in btfixup() 146 if (!insn || insn == 1) in btfixup() 147 insn = *addr; in btfixup() 158 if ((insn & 0xc1c00000) == 0x01000000) { /* SETHI */ in btfixup() 159 *addr = (insn & 0xffc00000) | (p[1] >> 10); break; in btfixup() 160 } else if ((insn & 0xc1f82000) == 0x80102000) { /* OR X, %LO(i), Y */ in btfixup() 161 *addr = (insn & 0xffffe000) | (p[1] & 0x3ff); break; in btfixup() 162 } else if ((insn & 0xc0000000) != 0x40000000) { /* !CALL */ in btfixup() [all …]
|
D | fault_64.c | 97 u32 insn = 0; in get_user_insn() local 123 : "=r" (insn) in get_user_insn() 130 return insn; in get_user_insn() 157 unsigned int insn, int fault_code) in do_fault_siginfo() argument 168 addr = compute_effective_address(regs, insn, 0); in do_fault_siginfo() 181 static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) in get_fault_insn() argument 183 if (!insn) { in get_fault_insn() 187 insn = *(unsigned int *) regs->tpc; in get_fault_insn() 189 insn = get_user_insn(regs->tpc); in get_fault_insn() 192 return insn; in get_fault_insn() [all …]
|
/linux-2.6.39/drivers/staging/comedi/drivers/addi-data/ |
D | hwdrv_apci3xxx.c | 108 struct comedi_insn *insn, in i_APCI3XXX_AnalogInputConfigOperatingMode() argument 111 int i_ReturnValue = insn->n; in i_APCI3XXX_AnalogInputConfigOperatingMode() 121 if (insn->n == 4) { in i_APCI3XXX_AnalogInputConfigOperatingMode() 294 struct comedi_insn *insn, in i_APCI3XXX_InsnConfigAnalogInput() argument 297 int i_ReturnValue = insn->n; in i_APCI3XXX_InsnConfigAnalogInput() 303 if (insn->n >= 1) { in i_APCI3XXX_InsnConfigAnalogInput() 308 s, insn, data); in i_APCI3XXX_InsnConfigAnalogInput() 355 struct comedi_insn *insn, in i_APCI3XXX_InsnReadAnalogInput() argument 358 int i_ReturnValue = insn->n; in i_APCI3XXX_InsnReadAnalogInput() 359 unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec); in i_APCI3XXX_InsnReadAnalogInput() [all …]
|
D | hwdrv_apci1516.c | 77 struct comedi_insn *insn, unsigned int *data) in i_APCI1516_Read1DigitalInput() argument 81 ui_Channel = CR_CHAN(insn->chanspec); in i_APCI1516_Read1DigitalInput() 93 return insn->n; in i_APCI1516_Read1DigitalInput() 118 struct comedi_insn *insn, unsigned int *data) in i_APCI1516_ReadMoreDigitalInput() argument 125 ui_NoOfChannels = CR_CHAN(insn->chanspec); in i_APCI1516_ReadMoreDigitalInput() 146 return insn->n; in i_APCI1516_ReadMoreDigitalInput() 175 struct comedi_insn *insn, unsigned int *data) in i_APCI1516_ConfigDigitalOutput() argument 178 return insn->n; in i_APCI1516_ConfigDigitalOutput() 203 struct comedi_insn *insn, unsigned int *data) in i_APCI1516_WriteDigitalOutput() argument 206 unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */ in i_APCI1516_WriteDigitalOutput() [all …]
|
D | addi_common.h | 105 struct comedi_insn *insn, 109 struct comedi_insn *insn, 113 struct comedi_insn *insn, 117 struct comedi_insn *insn, 130 struct comedi_insn *insn, 134 struct comedi_insn *insn, 138 struct comedi_insn *insn, 144 struct comedi_insn *insn, 148 struct comedi_insn *insn, 152 struct comedi_insn *insn, [all …]
|
D | hwdrv_apci16xx.c | 94 struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) in i_APCI16XX_InsnConfigInitTTLIO() argument 96 int i_ReturnValue = insn->n; in i_APCI16XX_InsnConfigInitTTLIO() 106 if (insn->n >= 1) { in i_APCI16XX_InsnConfigInitTTLIO() 125 && ((unsigned char) (insn->n - 1) != b_NumberOfPort)) { in i_APCI16XX_InsnConfigInitTTLIO() 135 && ((unsigned char) (insn->n) != 2)) { in i_APCI16XX_InsnConfigInitTTLIO() 287 struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) in i_APCI16XX_InsnBitsReadTTLIO() argument 289 int i_ReturnValue = insn->n; in i_APCI16XX_InsnBitsReadTTLIO() 293 unsigned char b_SelectedPort = CR_RANGE(insn->chanspec); in i_APCI16XX_InsnBitsReadTTLIO() 294 unsigned char b_InputChannel = CR_CHAN(insn->chanspec); in i_APCI16XX_InsnBitsReadTTLIO() 302 if (insn->n >= 1) { in i_APCI16XX_InsnBitsReadTTLIO() [all …]
|
/linux-2.6.39/arch/x86/kernel/ |
D | kprobes.c | 115 } __attribute__((packed)) *insn; in __synthesize_relative_insn() local 117 insn = (struct __arch_relative_insn *)from; in __synthesize_relative_insn() 118 insn->raddr = (s32)((long)(to) - ((long)(from) + 5)); in __synthesize_relative_insn() 119 insn->op = op; in __synthesize_relative_insn() 131 static kprobe_opcode_t *__kprobes skip_prefixes(kprobe_opcode_t *insn) in skip_prefixes() argument 135 attr = inat_get_opcode_attribute((insn_byte_t)*insn); in skip_prefixes() 137 insn++; in skip_prefixes() 138 attr = inat_get_opcode_attribute((insn_byte_t)*insn); in skip_prefixes() 142 insn++; in skip_prefixes() 144 return insn; in skip_prefixes() [all …]
|
/linux-2.6.39/drivers/staging/comedi/drivers/ |
D | s526.c | 270 struct comedi_subdevice *s, struct comedi_insn *insn, 274 struct comedi_insn *insn, unsigned int *data); 276 struct comedi_subdevice *s, struct comedi_insn *insn, 280 struct comedi_insn *insn, unsigned int *data); 282 struct comedi_insn *insn, unsigned int *data); 284 struct comedi_insn *insn, unsigned int *data); 286 struct comedi_insn *insn, unsigned int *data); 289 struct comedi_insn *insn, unsigned int *data); 292 struct comedi_insn *insn, unsigned int *data); 515 struct comedi_subdevice *s, struct comedi_insn *insn, in s526_gpct_rinsn() argument [all …]
|
D | adl_pci8164.c | 87 struct comedi_insn *insn, 92 struct comedi_insn *insn, 97 struct comedi_insn *insn, 102 struct comedi_insn *insn, 107 struct comedi_insn *insn, 112 struct comedi_insn *insn, 117 struct comedi_insn *insn, 122 struct comedi_insn *insn, 234 struct comedi_insn *insn, in adl_pci8164_insn_read() argument 241 axis = CR_CHAN(insn->chanspec); in adl_pci8164_insn_read() [all …]
|
/linux-2.6.39/arch/tile/kernel/ |
D | backtrace.c | 89 const struct tile_decoded_instruction *insn = in find_matching_insn() local 92 if (insn->opcode->mnemonic != mnemonic) in find_matching_insn() 97 if (operand_values[j] != insn->operand_values[j]) { in find_matching_insn() 104 return insn; in find_matching_insn() 123 const struct tile_decoded_instruction *insn = in bt_has_addi_sp() local 125 if (insn == NULL) in bt_has_addi_sp() 126 insn = find_matching_insn(bundle, TILE_OPC_ADDLI, vals, 2); in bt_has_addi_sp() 128 if (insn == NULL) in bt_has_addi_sp() 129 insn = find_matching_insn(bundle, TILEGX_OPC_ADDXLI, vals, 2); in bt_has_addi_sp() 130 if (insn == NULL) in bt_has_addi_sp() [all …]
|