/arch/powerpc/lib/ |
D | code-patching.c | 21 static int __patch_instruction(unsigned int *exec_addr, unsigned int instr, in __patch_instruction() argument 26 __put_user_asm(instr, patch_addr, err, "stw"); in __patch_instruction() 36 int raw_patch_instruction(unsigned int *addr, unsigned int instr) in raw_patch_instruction() argument 38 return __patch_instruction(addr, instr, addr); in raw_patch_instruction() 139 static int do_patch_instruction(unsigned int *addr, unsigned int instr) in do_patch_instruction() argument 153 return raw_patch_instruction(addr, instr); in do_patch_instruction() 166 __patch_instruction(addr, instr, patch_addr); in do_patch_instruction() 179 static int do_patch_instruction(unsigned int *addr, unsigned int instr) in do_patch_instruction() argument 181 return raw_patch_instruction(addr, instr); in do_patch_instruction() 186 int patch_instruction(unsigned int *addr, unsigned int instr) in patch_instruction() argument [all …]
|
D | test_emulate_step.c | 463 unsigned int instr; member 474 .instr = PPC_INST_NOP, 486 .instr = TEST_ADD(20, 21, 22), 494 .instr = TEST_ADD(20, 21, 22), 502 .instr = TEST_ADD(20, 21, 22), 510 .instr = TEST_ADD(20, 21, 22), 518 .instr = TEST_ADD(20, 21, 22), 526 .instr = TEST_ADD(20, 21, 22), 534 .instr = TEST_ADD(20, 21, 22), 542 .instr = TEST_ADD(20, 21, 22), [all …]
|
D | sstep.c | 82 static nokprobe_inline int branch_taken(unsigned int instr, in branch_taken() argument 86 unsigned int bo = (instr >> 21) & 0x1f; in branch_taken() 97 bi = (instr >> 16) & 0x1f; in branch_taken() 122 static nokprobe_inline unsigned long dform_ea(unsigned int instr, in dform_ea() argument 128 ra = (instr >> 16) & 0x1f; in dform_ea() 129 ea = (signed short) instr; /* sign-extend */ in dform_ea() 140 static nokprobe_inline unsigned long dsform_ea(unsigned int instr, in dsform_ea() argument 146 ra = (instr >> 16) & 0x1f; in dsform_ea() 147 ea = (signed short) (instr & ~3); /* sign-extend */ in dsform_ea() 157 static nokprobe_inline unsigned long dqform_ea(unsigned int instr, in dqform_ea() argument [all …]
|
/arch/powerpc/include/asm/ |
D | probes.h | 16 #define IS_TW(instr) (((instr) & 0xfc0007fe) == 0x7c000008) argument 17 #define IS_TD(instr) (((instr) & 0xfc0007fe) == 0x7c000088) argument 18 #define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000) argument 19 #define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000) argument 22 #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ argument 23 IS_TWI(instr) || IS_TDI(instr)) 25 #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) argument
|
D | disassemble.h | 90 static inline unsigned make_dsisr(unsigned instr) in make_dsisr() argument 96 dsisr = (instr & 0x03ff0000) >> 16; in make_dsisr() 98 if (IS_XFORM(instr)) { in make_dsisr() 100 dsisr |= (instr & 0x00000006) << 14; in make_dsisr() 102 dsisr |= (instr & 0x00000040) << 8; in make_dsisr() 104 dsisr |= (instr & 0x00000780) << 3; in make_dsisr() 107 dsisr |= (instr & 0x04000000) >> 12; in make_dsisr() 109 dsisr |= (instr & 0x78000000) >> 17; in make_dsisr() 111 if (IS_DSFORM(instr)) in make_dsisr() 112 dsisr |= (instr & 0x00000003) << 18; in make_dsisr()
|
D | code-patching.h | 30 int patch_instruction(unsigned int *addr, unsigned int instr); 31 int raw_patch_instruction(unsigned int *addr, unsigned int instr); 38 static inline int patch_instruction_site(s32 *site, unsigned int instr) in patch_instruction_site() argument 40 return patch_instruction((unsigned int *)patch_site_addr(site), instr); in patch_instruction_site() 59 int instr_is_relative_branch(unsigned int instr); 60 int instr_is_relative_link_branch(unsigned int instr); 61 int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr); 62 unsigned long branch_target(const unsigned int *instr); 65 extern bool is_conditional_branch(unsigned int instr);
|
D | sstep.h | 18 #define IS_MTMSRD(instr) (((instr) & 0xfc0007be) == 0x7c000124) argument 19 #define IS_RFID(instr) (((instr) & 0xfc0007fe) == 0x4c000024) argument 20 #define IS_RFI(instr) (((instr) & 0xfc0007fe) == 0x4c000064) argument 135 unsigned int instr); 152 extern int emulate_step(struct pt_regs *regs, unsigned int instr);
|
/arch/unicore32/mm/ |
D | alignment.c | 198 do_alignment_finish_ldst(unsigned long addr, unsigned long instr, in do_alignment_finish_ldst() argument 201 if (!LDST_U_BIT(instr)) in do_alignment_finish_ldst() 204 if (!LDST_P_BIT(instr)) in do_alignment_finish_ldst() 207 if (!LDST_P_BIT(instr) || LDST_W_BIT(instr)) in do_alignment_finish_ldst() 208 regs->uregs[RN_BITS(instr)] = addr; in do_alignment_finish_ldst() 212 do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, in do_alignment_ldrhstrh() argument 215 unsigned int rd = RD_BITS(instr); in do_alignment_ldrhstrh() 218 if ((instr & 0x4b003fe0) == 0x40000120) in do_alignment_ldrhstrh() 221 if (LDST_L_BIT(instr)) { in do_alignment_ldrhstrh() 226 if (instr & 0x80) in do_alignment_ldrhstrh() [all …]
|
/arch/arm/mm/ |
D | alignment.c | 327 do_alignment_finish_ldst(unsigned long addr, u32 instr, struct pt_regs *regs, union offset_union of… in do_alignment_finish_ldst() argument 329 if (!LDST_U_BIT(instr)) in do_alignment_finish_ldst() 332 if (!LDST_P_BIT(instr)) in do_alignment_finish_ldst() 335 if (!LDST_P_BIT(instr) || LDST_W_BIT(instr)) in do_alignment_finish_ldst() 336 regs->uregs[RN_BITS(instr)] = addr; in do_alignment_finish_ldst() 340 do_alignment_ldrhstrh(unsigned long addr, u32 instr, struct pt_regs *regs) in do_alignment_ldrhstrh() argument 342 unsigned int rd = RD_BITS(instr); in do_alignment_ldrhstrh() 349 if (LDST_L_BIT(instr)) { in do_alignment_ldrhstrh() 354 if (instr & 0x40) in do_alignment_ldrhstrh() 364 if (LDST_L_BIT(instr)) { in do_alignment_ldrhstrh() [all …]
|
/arch/alpha/lib/ |
D | stacktrace.c | 4 typedef unsigned int instr; typedef 34 (((instr)(INSTR) >= BR_OP) | ((instr)(INSTR) < LDA_OP) | \ 35 ((((instr)(INSTR) ^ 0x60000000) < 0x20000000) & \ 36 (((instr)(INSTR) & 0x0c000000) != 0))) 48 static instr * 49 display_stored_regs(instr * pro_pc, unsigned char * sp) in display_stored_regs() 51 instr * ret_pc = 0; in display_stored_regs() 61 ret_pc = (instr *)value; in display_stored_regs() 67 static instr * 68 seek_prologue(instr * pc) in seek_prologue() [all …]
|
/arch/arm/include/asm/ |
D | domain.h | 133 #define TUSER(instr) TUSERCOND(instr, ) argument 134 #define TUSERCOND(instr, cond) #instr "t" #cond argument 136 #define TUSER(instr) TUSERCOND(instr, ) argument 137 #define TUSERCOND(instr, cond) #instr #cond argument 147 #define TUSER(instr) instr ## t argument 149 #define TUSER(instr) instr argument
|
D | unified.h | 37 #define W(instr) instr.w 39 #define WASM(instr) #instr ".w" argument 50 #define W(instr) instr 52 #define WASM(instr) #instr
|
D | assembler.h | 253 #define ALT_SMP(instr...) \ 254 9998: instr 260 #define ALT_UP(instr...) \ 263 9997: instr ;\ 278 #define ALT_SMP(instr...) 279 #define ALT_UP(instr...) instr 373 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER() 376 \instr\()b\t\cond\().w \reg, [\ptr, #\off] 378 \instr\t\cond\().w \reg, [\ptr, #\off] 389 .macro usracc, instr, reg, ptr, inc, cond, rept, abort [all …]
|
/arch/arm64/kernel/ |
D | trace-events-emulation.h | 12 TP_PROTO(const char *instr, u64 addr), 13 TP_ARGS(instr, addr), 16 __string(instr, instr) 21 __assign_str(instr, instr); 25 TP_printk("instr=\"%s\" addr=0x%llx", __get_str(instr), __entry->addr)
|
D | armv8_deprecated.c | 371 static int swp_handler(struct pt_regs *regs, u32 instr) in swp_handler() argument 379 type = instr & TYPE_SWPB; in swp_handler() 381 switch (aarch32_check_condition(instr, regs->pstate)) { in swp_handler() 394 rn = aarch32_insn_extract_reg_num(instr, A32_RN_OFFSET); in swp_handler() 395 rt2 = aarch32_insn_extract_reg_num(instr, A32_RT2_OFFSET); in swp_handler() 399 destreg = aarch32_insn_extract_reg_num(instr, A32_RT_OFFSET); in swp_handler() 403 aarch32_insn_extract_reg_num(instr, A32_RT2_OFFSET), data); in swp_handler() 460 static int cp15barrier_handler(struct pt_regs *regs, u32 instr) in cp15barrier_handler() argument 464 switch (aarch32_check_condition(instr, regs->pstate)) { in cp15barrier_handler() 477 switch (aarch32_insn_mcr_extract_crm(instr)) { in cp15barrier_handler() [all …]
|
/arch/s390/kernel/ |
D | nospec-branch.c | 102 u8 *instr, *thunk, *br; in __nospec_revert() local 108 instr = (u8 *) epo + *epo; in __nospec_revert() 109 if (instr[0] == 0xc0 && (instr[1] & 0x0f) == 0x04) in __nospec_revert() 111 else if (instr[0] == 0xc0 && (instr[1] & 0x0f) == 0x05) in __nospec_revert() 115 thunk = instr + (*(int *)(instr + 2)) * 2; in __nospec_revert() 135 insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); in __nospec_revert() 145 insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); in __nospec_revert() 158 s390_kernel_write(instr, insnbuf, 6); in __nospec_revert()
|
/arch/powerpc/kernel/ |
D | align.c | 107 unsigned int instr) in emulate_spe() argument 120 instr = (instr >> 1) & 0x1f; in emulate_spe() 125 nb = spe_aligninfo[instr].len; in emulate_spe() 126 flags = spe_aligninfo[instr].flags; in emulate_spe() 144 switch (instr) { in emulate_spe() 191 switch (instr) { in emulate_spe() 296 unsigned int instr; in fix_alignment() local 306 if (unlikely(__get_user(instr, (unsigned int __user *)regs->nip))) in fix_alignment() 312 instr = swab32(instr); in fix_alignment() 316 if ((instr >> 26) == 0x4) { in fix_alignment() [all …]
|
/arch/arm/kernel/ |
D | traps.c | 420 int call_undef_hook(struct pt_regs *regs, unsigned int instr) in call_undef_hook() argument 424 int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; in call_undef_hook() 428 if ((instr & hook->instr_mask) == hook->instr_val && in call_undef_hook() 433 return fn ? fn(regs, instr) : 1; in call_undef_hook() 438 unsigned int instr; in do_undefinstr() local 446 instr = __mem_to_opcode_thumb16(((u16 *)pc)[0]); in do_undefinstr() 447 if (is_wide_instruction(instr)) { in do_undefinstr() 450 instr = __opcode_thumb32_compose(instr, inst2); in do_undefinstr() 454 instr = __mem_to_opcode_arm(*(u32 *) pc); in do_undefinstr() 456 if (get_user(instr, (u16 __user *)pc)) in do_undefinstr() [all …]
|
D | swp_emulate.c | 159 static int swp_handler(struct pt_regs *regs, unsigned int instr) in swp_handler() argument 166 res = arm_check_condition(instr, regs->ARM_cpsr); in swp_handler() 187 address = regs->uregs[EXTRACT_REG_NUM(instr, RN_OFFSET)]; in swp_handler() 188 data = regs->uregs[EXTRACT_REG_NUM(instr, RT2_OFFSET)]; in swp_handler() 189 destreg = EXTRACT_REG_NUM(instr, RT_OFFSET); in swp_handler() 191 type = instr & TYPE_SWPB; in swp_handler() 194 EXTRACT_REG_NUM(instr, RN_OFFSET), address, in swp_handler() 195 destreg, EXTRACT_REG_NUM(instr, RT2_OFFSET), data); in swp_handler()
|
/arch/arm/lib/ |
D | bitops.h | 6 .macro bitop, name, instr 22 \instr r2, r2, r3 31 .macro testop, name, instr, store 49 \instr r2, r2, r3 @ toggle bit 61 .macro bitop, name, instr 72 \instr r2, r2, r3 88 .macro testop, name, instr, store 99 \instr r2, r2, r0, lsl r3
|
/arch/powerpc/kvm/ |
D | book3s_hv_tm_builtin.c | 22 u32 instr = vcpu->arch.emul_inst; in kvmhv_p9_tm_emulation_early() local 26 switch (instr & 0xfc0007ff) { in kvmhv_p9_tm_emulation_early() 53 if (instr & (1 << 11)) in kvmhv_p9_tm_emulation_early() 64 rs = (instr >> 21) & 0x1f; in kvmhv_p9_tm_emulation_early() 86 if (instr & (1 << 21)) in kvmhv_p9_tm_emulation_early()
|
/arch/arm/mach-s3c24xx/include/mach/ |
D | io.h | 36 #define DECLARE_DYN_OUT(sz,fnsuffix,instr) \ argument 44 "str" instr " %1, [%0, #0 ] @ out" #fnsuffix \ 51 #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ argument 59 "ldr" instr " %1, [%0, #0 ] @ in" #fnsuffix \ 71 #define DECLARE_IO(sz,fnsuffix,instr) \ argument 72 DECLARE_DYN_IN(sz,fnsuffix,instr) \ 73 DECLARE_DYN_OUT(sz,fnsuffix,instr)
|
/arch/x86/um/ |
D | ptrace_32.c | 29 unsigned short instr; in is_syscall() local 32 n = copy_from_user(&instr, (void __user *) addr, sizeof(instr)); in is_syscall() 39 n = access_process_vm(current, addr, &instr, sizeof(instr), in is_syscall() 41 if (n != sizeof(instr)) { in is_syscall() 48 return (instr == 0x80cd) || (instr == 0x340f); in is_syscall()
|
/arch/microblaze/kernel/ |
D | unwind.c | 63 static inline long get_frame_size(unsigned long instr) in get_frame_size() argument 65 return abs((s16)(instr & 0xFFFF)); in get_frame_size() 87 unsigned long instr; in find_frame_creation() local 93 instr = *pc; in find_frame_creation() 96 if ((instr & 0xFFFF0000) != 0x30210000) in find_frame_creation() 99 frame_size = get_frame_size(instr); in find_frame_creation()
|
/arch/x86/kernel/ |
D | alternative.c | 341 static void __init_or_module noinline optimize_nops(struct alt_instr *a, u8 *instr) in optimize_nops() argument 347 if (instr[i] != 0x90) in optimize_nops() 352 add_nops(instr + (a->instrlen - a->padlen), a->padlen); in optimize_nops() 355 DUMP_BYTES(instr, a->instrlen, "%px: [%d:%d) optimized NOPs: ", in optimize_nops() 356 instr, a->instrlen - a->padlen, a->padlen); in optimize_nops() 373 u8 *instr, *replacement; in apply_alternatives() local 389 instr = (u8 *)&a->instr_offset + a->instr_offset; in apply_alternatives() 395 optimize_nops(a, instr); in apply_alternatives() 403 instr, instr, a->instrlen, in apply_alternatives() 406 DUMP_BYTES(instr, a->instrlen, "%px: old_insn: ", instr); in apply_alternatives() [all …]
|