Lines Matching refs:op

16 static void apply_seg( x86_op_t *op, unsigned int prefixes ) {  in apply_seg()  argument
22 op->flags |= op_cs_seg; break; in apply_seg()
24 op->flags |= op_ss_seg; break; in apply_seg()
26 op->flags |= op_ds_seg; break; in apply_seg()
28 op->flags |= op_es_seg; break; in apply_seg()
30 op->flags |= op_fs_seg; break; in apply_seg()
32 op->flags |= op_gs_seg; break; in apply_seg()
39 x86_op_t *op, x86_insn_t *insn, in decode_operand_value() argument
68 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
72 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
76 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
80 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
84 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
90 ia32_reg_decode( modrm, op, REG_CTRL_OFFSET ); in decode_operand_value()
93 ia32_reg_decode( modrm, op, REG_DEBUG_OFFSET ); in decode_operand_value()
96 ia32_reg_decode( modrm, op, gen_regs ); in decode_operand_value()
99 ia32_reg_decode( modrm, op, REG_MMX_OFFSET ); in decode_operand_value()
102 ia32_reg_decode( modrm, op, REG_SEG_OFFSET ); in decode_operand_value()
105 ia32_reg_decode( modrm, op, REG_TEST_OFFSET ); in decode_operand_value()
108 ia32_reg_decode( modrm, op, REG_SIMD_OFFSET ); in decode_operand_value()
113 op->type = op_absolute; in decode_operand_value()
117 &op->data.absolute.segment, 2 ); in decode_operand_value()
120 &op->data.absolute.offset.off32, 4 ); in decode_operand_value()
124 &op->data.absolute.offset.off16, 2 ); in decode_operand_value()
130 op->type = op_immediate; in decode_operand_value()
133 if ( op->flags & op_signed ) { in decode_operand_value()
134 x86_imm_signsized(buf, buf_len, &op->data.byte, in decode_operand_value()
137 x86_imm_sized(buf, buf_len, &op->data.byte, in decode_operand_value()
146 op->flags |= op_signed; in decode_operand_value()
149 op->type = op_relative_near; in decode_operand_value()
151 &op->data.relative_near, 1); in decode_operand_value()
154 op->type = op_relative_far; in decode_operand_value()
156 &op->data.relative_far, op_size ); in decode_operand_value()
164 op->type = op_offset; in decode_operand_value()
165 op->flags |= op_pointer; in decode_operand_value()
166 x86_imm_sized( buf, buf_len, &op->data.offset, in decode_operand_value()
174 op->type = op_register; in decode_operand_value()
175 op->flags |= op_hardcode; in decode_operand_value()
176 ia32_handle_register( &op->data.reg, REG_FLAGS_INDEX ); in decode_operand_value()
179 op->type = op_expression; in decode_operand_value()
180 op->flags |= op_hardcode; in decode_operand_value()
181 op->flags |= op_ds_seg | op_pointer | op_string; in decode_operand_value()
182 ia32_handle_register( &op->data.expression.base, in decode_operand_value()
186 op->type = op_expression; in decode_operand_value()
187 op->flags |= op_hardcode; in decode_operand_value()
188 op->flags |= op_es_seg | op_pointer | op_string; in decode_operand_value()
189 ia32_handle_register( &op->data.expression.base, in decode_operand_value()
193 op->type = op_register; in decode_operand_value()
194 op->flags |= op_hardcode; in decode_operand_value()
195 ia32_handle_register( &op->data.reg, in decode_operand_value()
199 op->type = op_register; in decode_operand_value()
200 op->flags |= op_hardcode; in decode_operand_value()
201 ia32_handle_register( &op->data.reg, in decode_operand_value()
205 op->type = op_register; in decode_operand_value()
206 op->flags |= op_hardcode; in decode_operand_value()
207 ia32_handle_register( &op->data.reg, in decode_operand_value()
211 op->type = op_register; in decode_operand_value()
212 op->flags |= op_hardcode; in decode_operand_value()
213 ia32_handle_register( &op->data.reg, in decode_operand_value()
217 op->type = op_immediate; in decode_operand_value()
218 op->data.dword = op_value; in decode_operand_value()
219 op->flags |= op_hardcode; in decode_operand_value()
225 op->type = op_unused; /* this shouldn't happen! */ in decode_operand_value()
233 x86_op_t *op ){ in decode_operand_size() argument
249 op->datatype = (size == 4) ? op_word : op_byte; in decode_operand_size()
254 op->datatype = (size == 4) ? op_bounds32 : op_bounds16; in decode_operand_size()
258 op->datatype = (size == 4) ? op_dword : op_word; in decode_operand_size()
265 op->datatype = (size == 4) ? op_descr32 : op_descr16; in decode_operand_size()
269 op->datatype = op_byte; in decode_operand_size()
273 op->datatype = op_word; in decode_operand_size()
277 op->datatype = op_dword; in decode_operand_size()
284 op->datatype = (insn->addr_size == 4) ? in decode_operand_size()
289 op->datatype = op_qword; in decode_operand_size()
293 op->datatype = op_dqword; in decode_operand_size()
298 op->datatype = op_ssimd; in decode_operand_size()
303 op->datatype = op_dsimd; in decode_operand_size()
311 op->datatype = op_sssimd; in decode_operand_size()
319 op->datatype = op_sdsimd; in decode_operand_size()
323 op->datatype = op_qword; in decode_operand_size()
327 op->datatype = op_dword; in decode_operand_size()
331 op->datatype = op_sreal; in decode_operand_size()
335 op->datatype = op_dreal; in decode_operand_size()
339 op->datatype = op_extreal; in decode_operand_size()
343 op->datatype = op_bcd; in decode_operand_size()
347 op->datatype = (size == 28)? op_fpuenv32: op_fpuenv16; in decode_operand_size()
351 op->datatype = (size == 108)? in decode_operand_size()
356 op->datatype = op_fpregset; in decode_operand_size()
360 op->datatype = op_fpreg; in decode_operand_size()
364 op->datatype = (size == 4) ? op_dword : op_word; in decode_operand_size()
368 op->datatype = op_none; in decode_operand_size()
373 op->datatype = (size == 4) ? op_dword : op_word; in decode_operand_size()
384 x86_op_t *op; in ia32_decode_operand() local
397 op = x86_operand_new( insn ); in ia32_decode_operand()
400 op->access = (enum x86_op_access) OP_PERM(raw_flags); in ia32_decode_operand()
401 op->flags = (enum x86_op_flags) (OP_FLAGS(raw_flags) >> 12); in ia32_decode_operand()
404 op_size = decode_operand_size(op_type, insn, op); in ia32_decode_operand()
416 size = decode_operand_value( buf, buf_len, op, insn, addr_meth, in ia32_decode_operand()
420 if ( op->type == op_expression || op->type == op_offset ) { in ia32_decode_operand()
421 apply_seg(op, prefixes); in ia32_decode_operand()