Exemplo n.º 1
0
int x86_format_operand( x86_op_t *op, char *buf, int len,
                        enum x86_asm_format format ){
	x86_insn_t *insn;

        if ( ! op || ! buf || len < 1 ) {
                return(0);
        }

	/* insn is stored in x86_op_t since .21-pre3 */
	insn = (x86_insn_t *) op->insn;

        memset( buf, 0, len );

        switch ( format ) {
                case att_syntax:
                        return format_operand_att( op, insn, buf, len );
                case xml_syntax:
                        return format_operand_xml( op, insn, buf, len );
                case raw_syntax:
                        return format_operand_raw( op, insn, buf, len );
                case native_syntax:
                case intel_syntax:
                default:
                        return format_operand_native( op, insn, buf, len );
        }
}
Exemplo n.º 2
0
int x86_format_operand( x86_op_t *op, x86_insn_t *insn, char *buf, int len,
                        enum x86_asm_format format ) {

    if ( ! op || ! buf || len < 1 ) {
        return(0);
    }

    memset( buf, 0, len );

    switch ( format ) {
    case att_syntax:
        return format_operand_att( op, insn, buf, len );
    case xml_syntax:
        return format_operand_xml( op, insn, buf, len );
    case raw_syntax:
        return format_operand_raw( op, insn, buf, len );
    case native_syntax:
    case intel_syntax:
    default:
        return format_operand_native( op, insn, buf, len );
    }
}