Search
lxdream.org :: lxdream/src/x86dasm/x86dasm.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/x86dasm/x86dasm.h
changeset 925:7cbcc51db63d
prev561:533f6b478071
next968:6fb1481859a4
author nkeynes
date Sun Dec 14 07:50:48 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Setup a 'proper' stackframe in translated blocks. This doesn't affect performance noticeably,
but does ensure that
a) The stack is aligned correctly on OS X with no extra effort, and
b) We can't mess up the stack and crash that way anymore.
Replace all PUSH/POP instructions (outside of prologue/epilogue) with ESP-rel moves to stack
local variables.
Finally merge ia32mac and ia32abi together, since they're pretty much the same now anyway (and
thereby simplifying maintenance a good deal)
view annotate diff log raw
     1 /**
     2  * $Id$
     3  *
     4  * Wrapper around i386-dis to supply the same behaviour as the other
     5  * disassembly functions.
     6  *
     7  * Copyright (c) 2005 Nathan Keynes.
     8  *
     9  * This program is free software; you can redistribute it and/or modify
    10  * it under the terms of the GNU General Public License as published by
    11  * the Free Software Foundation; either version 2 of the License, or
    12  * (at your option) any later version.
    13  *
    14  * This program is distributed in the hope that it will be useful,
    15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17  * GNU General Public License for more details.
    18  */
    20 #include <stdio.h>
    21 #include "cpu.h"
    22 #include "mem.h"
    23 extern const struct cpu_desc_struct x86_cpu_desc;
    25 typedef struct x86_symbol {
    26     const char *name;
    27     void *ptr;
    28 } x86_symbol;
    30 void x86_disasm_block( FILE *out, void *block, uint32_t len );
    31 void x86_set_symtab( x86_symbol *symtab, int num_symbols );
    32 void x86_disasm_init(unsigned char *buf, uintptr_t vma, int buflen);
    33 uintptr_t x86_disasm_instruction( uintptr_t pc, char *buf, int len, char *opcode );
.