VirtualBox

Changeset 36170 in vbox for trunk/src/recompiler/exec-all.h


Ignore:
Timestamp:
Mar 4, 2011 12:49:02 PM (14 years ago)
Author:
vboxsync
Message:

rem: synced up to svn://svn.savannah.nongnu.org/qemu/trunk@6686 (repo UUID c046a42c-6fe2-441c-8c8c-71466251a162).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/exec-all.h

    r36140 r36170  
    1616 * You should have received a copy of the GNU Lesser General Public
    1717 * License along with this library; if not, write to the Free Software
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
    1919 */
    2020
     
    2727 * of the LGPL is applied is otherwise unspecified.
    2828 */
     29
     30#ifndef _EXEC_ALL_H_
     31#define _EXEC_ALL_H_
     32
     33#include "qemu-common.h"
    2934
    3035/* allow to see translation results - the slowdown should be negligible, so we leave it */
     
    7479extern target_ulong gen_opc_jump_pc[2];
    7580extern uint32_t gen_opc_hflags[OPC_BUF_SIZE];
    76 
    77 typedef void (GenOpFunc)(void);
    78 typedef void (GenOpFunc1)(long);
    79 typedef void (GenOpFunc2)(long, long);
    80 typedef void (GenOpFunc3)(long, long, long);
    8181
    8282#include "qemu-log.h"
     
    103103                              int cflags);
    104104void cpu_exec_init(CPUState *env);
     105void QEMU_NORETURN cpu_loop_exit(void);
    105106int page_unprotect(target_ulong address, unsigned long pc, void *puc);
    106107void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end,
     
    137138#endif
    138139
    139 #if defined(__powerpc__) || defined(__x86_64__) || defined(__arm__)
     140#if defined(_ARCH_PPC) || defined(__x86_64__) || defined(__arm__)
    140141#define USE_DIRECT_JUMP
    141142#endif
     
    220221#if defined(USE_DIRECT_JUMP)
    221222
    222 #if defined(__powerpc__)
     223#if defined(_ARCH_PPC)
    223224extern void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr);
    224225#define tb_set_jmp_target1 ppc_tb_set_jmp_target
     
    233234static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr)
    234235{
     236#if QEMU_GNUC_PREREQ(4, 1)
     237    void __clear_cache(char *beg, char *end);
     238#else
    235239    register unsigned long _beg __asm ("a1");
    236240    register unsigned long _end __asm ("a2");
    237241    register unsigned long _flg __asm ("a3");
     242#endif
    238243
    239244    /* we could use a ldr pc, [pc, #-4] kind of branch and avoid the flush */
    240245    *(uint32_t *)jmp_addr |= ((addr - (jmp_addr + 8)) >> 2) & 0xffffff;
    241246
     247#if QEMU_GNUC_PREREQ(4, 1)
     248    __clear_cache((char *) jmp_addr, (char *) jmp_addr + 4);
     249#else
    242250    /* flush icache */
    243251    _beg = jmp_addr;
     
    245253    _flg = 0;
    246254    __asm __volatile__ ("swi 0x9f0002" : : "r" (_beg), "r" (_end), "r" (_flg));
     255#endif
    247256}
    248257#endif
     
    286295
    287296TranslationBlock *tb_find_pc(unsigned long pc_ptr);
    288 
    289 #if defined(_WIN32)
    290 #define ASM_DATA_SECTION ".section \".data\"\n"
    291 #define ASM_PREVIOUS_SECTION ".section .text\n"
    292 #elif defined(__APPLE__)
    293 #define ASM_DATA_SECTION ".data\n"
    294 #define ASM_PREVIOUS_SECTION ".text\n"
    295 #else
    296 #define ASM_DATA_SECTION ".section \".data\"\n"
    297 #define ASM_PREVIOUS_SECTION ".previous\n"
    298 #endif
    299 
    300 #define ASM_OP_LABEL_NAME(n, opname) \
    301     ASM_NAME(__op_label) #n "." ASM_NAME(opname)
    302297
    303298extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
     
    432427
    433428#endif
     429
     430typedef void (CPUDebugExcpHandler)(CPUState *env);
     431
     432CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler);
     433#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette