Lines Matching refs:code
7 fetch_store_raw(unsigned long val, struct fetch_insn *code, void *buf) in fetch_store_raw() argument
9 switch (code->size) { in fetch_store_raw()
29 fetch_apply_bitfield(struct fetch_insn *code, void *buf) in fetch_apply_bitfield() argument
31 switch (code->basesize) { in fetch_apply_bitfield()
33 *(u8 *)buf <<= code->lshift; in fetch_apply_bitfield()
34 *(u8 *)buf >>= code->rshift; in fetch_apply_bitfield()
37 *(u16 *)buf <<= code->lshift; in fetch_apply_bitfield()
38 *(u16 *)buf >>= code->rshift; in fetch_apply_bitfield()
41 *(u32 *)buf <<= code->lshift; in fetch_apply_bitfield()
42 *(u32 *)buf >>= code->rshift; in fetch_apply_bitfield()
45 *(u64 *)buf <<= code->lshift; in fetch_apply_bitfield()
46 *(u64 *)buf >>= code->rshift; in fetch_apply_bitfield()
57 process_fetch_insn(struct fetch_insn *code, void *rec,
72 process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val, in process_fetch_insn_bottom() argument
83 if (code->op == FETCH_OP_DEREF) { in process_fetch_insn_bottom()
85 ret = probe_mem_read(&val, (void *)val + code->offset, in process_fetch_insn_bottom()
87 } else if (code->op == FETCH_OP_UDEREF) { in process_fetch_insn_bottom()
90 (void *)val + code->offset, sizeof(val)); in process_fetch_insn_bottom()
95 code++; in process_fetch_insn_bottom()
98 s3 = code; in process_fetch_insn_bottom()
102 if (code->op == FETCH_OP_ST_STRING) { in process_fetch_insn_bottom()
103 ret = fetch_store_strlen(val + code->offset); in process_fetch_insn_bottom()
104 code++; in process_fetch_insn_bottom()
106 } else if (code->op == FETCH_OP_ST_USTRING) { in process_fetch_insn_bottom()
107 ret += fetch_store_strlen_user(val + code->offset); in process_fetch_insn_bottom()
108 code++; in process_fetch_insn_bottom()
114 switch (code->op) { in process_fetch_insn_bottom()
116 fetch_store_raw(val, code, dest); in process_fetch_insn_bottom()
119 probe_mem_read(dest, (void *)val + code->offset, code->size); in process_fetch_insn_bottom()
122 probe_mem_read_user(dest, (void *)val + code->offset, code->size); in process_fetch_insn_bottom()
126 ret = fetch_store_string(val + code->offset, dest, base); in process_fetch_insn_bottom()
130 ret = fetch_store_string_user(val + code->offset, dest, base); in process_fetch_insn_bottom()
135 code++; in process_fetch_insn_bottom()
138 if (code->op == FETCH_OP_MOD_BF) { in process_fetch_insn_bottom()
139 fetch_apply_bitfield(code, dest); in process_fetch_insn_bottom()
140 code++; in process_fetch_insn_bottom()
145 if (code->op == FETCH_OP_LP_ARRAY) { in process_fetch_insn_bottom()
147 if (++i < code->param) { in process_fetch_insn_bottom()
148 code = s3; in process_fetch_insn_bottom()
155 code--; in process_fetch_insn_bottom()
163 code++; in process_fetch_insn_bottom()
167 return code->op == FETCH_OP_END ? ret : -EILSEQ; in process_fetch_insn_bottom()
180 len = process_fetch_insn(arg->code, regs, NULL, NULL); in __get_data_size()
206 ret = process_fetch_insn(arg->code, rec, dl, base); in store_trace_args()