Lines Matching refs:buffer
46 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelFormatInstruction() argument
49 ZYAN_ASSERT(buffer); in ZydisFormatterIntelFormatInstruction()
54 ZYAN_CHECK(formatter->func_print_prefixes(formatter, buffer, context)); in ZydisFormatterIntelFormatInstruction()
55 ZYAN_CHECK(formatter->func_print_mnemonic(formatter, buffer, context)); in ZydisFormatterIntelFormatInstruction()
58 ZYDIS_BUFFER_REMEMBER(buffer, state_mnemonic); in ZydisFormatterIntelFormatInstruction()
71 ZYDIS_BUFFER_REMEMBER(buffer, buffer_state); in ZydisFormatterIntelFormatInstruction()
75 ZYDIS_BUFFER_APPEND(buffer, DELIM_OPERAND); in ZydisFormatterIntelFormatInstruction()
78 ZYDIS_BUFFER_APPEND(buffer, DELIM_MNEMONIC); in ZydisFormatterIntelFormatInstruction()
87 status = formatter->func_pre_operand(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
90 ZYAN_CHECK(ZydisFormatterBufferRestore(buffer, buffer_state)); in ZydisFormatterIntelFormatInstruction()
102 status = formatter->func_format_operand_reg(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
105 status = formatter->func_format_operand_mem(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
108 status = formatter->func_format_operand_ptr(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
111 status = formatter->func_format_operand_imm(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
118 ZYAN_CHECK(ZydisFormatterBufferRestore(buffer, buffer_state)); in ZydisFormatterIntelFormatInstruction()
128 status = formatter->func_post_operand(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction()
131 ZYAN_CHECK(ZydisFormatterBufferRestore(buffer, buffer_state)); in ZydisFormatterIntelFormatInstruction()
148 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
153 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
157 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
159 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
180 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
183 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
185 ZYAN_CHECK(formatter->func_print_decorator(formatter, buffer, context, in ZydisFormatterIntelFormatInstruction()
197 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelFormatOperandMEM() argument
200 ZYAN_ASSERT(buffer); in ZydisFormatterIntelFormatOperandMEM()
207 ZYAN_CHECK(formatter->func_print_typecast(formatter, buffer, context)); in ZydisFormatterIntelFormatOperandMEM()
209 ZYAN_CHECK(formatter->func_print_segment(formatter, buffer, context)); in ZydisFormatterIntelFormatOperandMEM()
211 ZYDIS_BUFFER_APPEND(buffer, MEMORY_BEGIN_INTEL); in ZydisFormatterIntelFormatOperandMEM()
222 ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context)); in ZydisFormatterIntelFormatOperandMEM()
232 ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context, in ZydisFormatterIntelFormatOperandMEM()
239 ZYDIS_BUFFER_APPEND(buffer, ADD); in ZydisFormatterIntelFormatOperandMEM()
241 ZYAN_CHECK(formatter->func_print_register(formatter, buffer, context, in ZydisFormatterIntelFormatOperandMEM()
247 ZYDIS_BUFFER_APPEND(buffer, MUL); in ZydisFormatterIntelFormatOperandMEM()
248 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_IMMEDIATE); in ZydisFormatterIntelFormatOperandMEM()
249 ZYAN_CHECK(ZydisStringAppendDecU(&buffer->string, context->operand->mem.scale, 0, in ZydisFormatterIntelFormatOperandMEM()
255 ZYAN_CHECK(formatter->func_print_address_abs(formatter, buffer, context)); in ZydisFormatterIntelFormatOperandMEM()
258 ZYAN_CHECK(formatter->func_print_disp(formatter, buffer, context)); in ZydisFormatterIntelFormatOperandMEM()
262 ZYDIS_BUFFER_APPEND(buffer, MEMORY_END_INTEL); in ZydisFormatterIntelFormatOperandMEM()
267 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelPrintMnemonic() argument
270 ZYAN_ASSERT(buffer); in ZydisFormatterIntelPrintMnemonic()
277 ZYDIS_BUFFER_APPEND_CASE(buffer, INVALID_MNEMONIC, formatter->case_mnemonic); in ZydisFormatterIntelPrintMnemonic()
281 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_MNEMONIC); in ZydisFormatterIntelPrintMnemonic()
282 ZYAN_CHECK(ZydisStringAppendShortCase(&buffer->string, mnemonic, formatter->case_mnemonic)); in ZydisFormatterIntelPrintMnemonic()
285 return ZydisStringAppendShortCase(&buffer->string, &STR_FAR, formatter->case_mnemonic); in ZydisFormatterIntelPrintMnemonic()
294 return ZydisStringAppendShortCase(&buffer->string, &STR_SHORT, in ZydisFormatterIntelPrintMnemonic()
297 return ZydisStringAppendShortCase(&buffer->string, &STR_NEAR, in ZydisFormatterIntelPrintMnemonic()
308 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context, ZydisRegister reg) in ZydisFormatterIntelPrintRegister() argument
313 ZYAN_ASSERT(buffer); in ZydisFormatterIntelPrintRegister()
319 ZYDIS_BUFFER_APPEND_CASE(buffer, INVALID_REG, formatter->case_registers); in ZydisFormatterIntelPrintRegister()
323 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_REGISTER); in ZydisFormatterIntelPrintRegister()
324 return ZydisStringAppendShortCase(&buffer->string, str, formatter->case_registers); in ZydisFormatterIntelPrintRegister()
328 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelPrintDISP() argument
331 ZYAN_ASSERT(buffer); in ZydisFormatterIntelPrintDISP()
343 ZYDIS_BUFFER_APPEND(buffer, SUB); in ZydisFormatterIntelPrintDISP()
345 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_DISPLACEMENT); in ZydisFormatterIntelPrintDISP()
346 ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->disp_base, &buffer->string, in ZydisFormatterIntelPrintDISP()
356 ZYDIS_BUFFER_APPEND(buffer, ADD); in ZydisFormatterIntelPrintDISP()
358 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_DISPLACEMENT); in ZydisFormatterIntelPrintDISP()
359 ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->disp_base, &buffer->string, in ZydisFormatterIntelPrintDISP()
371 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelPrintTypecast() argument
374 ZYAN_ASSERT(buffer); in ZydisFormatterIntelPrintTypecast()
379 case 8: ZYDIS_BUFFER_APPEND(buffer, SIZE_8_INTEL ); break; in ZydisFormatterIntelPrintTypecast()
380 case 16: ZYDIS_BUFFER_APPEND(buffer, SIZE_16_INTEL ); break; in ZydisFormatterIntelPrintTypecast()
381 case 32: ZYDIS_BUFFER_APPEND(buffer, SIZE_32_INTEL ); break; in ZydisFormatterIntelPrintTypecast()
382 case 48: ZYDIS_BUFFER_APPEND(buffer, SIZE_48 ); break; in ZydisFormatterIntelPrintTypecast()
383 case 64: ZYDIS_BUFFER_APPEND(buffer, SIZE_64_INTEL ); break; in ZydisFormatterIntelPrintTypecast()
384 case 80: ZYDIS_BUFFER_APPEND(buffer, SIZE_80 ); break; in ZydisFormatterIntelPrintTypecast()
385 case 128: ZYDIS_BUFFER_APPEND(buffer, SIZE_128_INTEL); break; in ZydisFormatterIntelPrintTypecast()
386 case 256: ZYDIS_BUFFER_APPEND(buffer, SIZE_256_INTEL); break; in ZydisFormatterIntelPrintTypecast()
387 case 512: ZYDIS_BUFFER_APPEND(buffer, SIZE_512_INTEL); break; in ZydisFormatterIntelPrintTypecast()
400 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelFormatInstructionMASM() argument
403 ZYAN_ASSERT(buffer); in ZydisFormatterIntelFormatInstructionMASM()
411 return ZydisFormatterIntelFormatInstruction(formatter, buffer, context); in ZydisFormatterIntelFormatInstructionMASM()
415 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelPrintAddressMASM() argument
418 ZYAN_ASSERT(buffer); in ZydisFormatterIntelPrintAddressMASM()
447 ZYDIS_BUFFER_APPEND(buffer, ADDR_RELATIVE); in ZydisFormatterIntelPrintAddressMASM()
448 ZYDIS_STRING_APPEND_NUM_S(formatter, formatter->addr_base, &buffer->string, address, padding, in ZydisFormatterIntelPrintAddressMASM()