cpu.h (b0f9690e78827d55a508c73432c73f057f59fd41) | cpu.h (74433bf083b0766aba81534f92de13194f23ff3e) |
---|---|
1/* 2 * m68k virtual CPU header 3 * 4 * Copyright (c) 2005-2007 CodeSourcery 5 * Written by Paul Brook 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 7 unchanged lines hidden (view full) --- 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 19 */ 20 21#ifndef M68K_CPU_H 22#define M68K_CPU_H 23 | 1/* 2 * m68k virtual CPU header 3 * 4 * Copyright (c) 2005-2007 CodeSourcery 5 * Written by Paul Brook 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 7 unchanged lines hidden (view full) --- 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 19 */ 20 21#ifndef M68K_CPU_H 22#define M68K_CPU_H 23 |
24#define TARGET_LONG_BITS 32 25 26#define CPUArchState struct CPUM68KState 27 | |
28#include "qemu-common.h" 29#include "exec/cpu-defs.h" 30#include "cpu-qom.h" 31 | 24#include "qemu-common.h" 25#include "exec/cpu-defs.h" 26#include "cpu-qom.h" 27 |
28#define CPUArchState struct CPUM68KState 29 |
|
32#define OS_BYTE 0 33#define OS_WORD 1 34#define OS_LONG 2 35#define OS_SINGLE 3 36#define OS_DOUBLE 4 37#define OS_EXTENDED 5 38#define OS_PACKED 6 39#define OS_UNSIZED 7 --- 37 unchanged lines hidden (view full) --- 77#define M68K_DTTR0 0 78#define M68K_DTTR1 1 79#define M68K_ITTR0 2 80#define M68K_ITTR1 3 81 82#define M68K_MAX_TTR 2 83#define TTR(type, index) ttr[((type & ACCESS_CODE) == ACCESS_CODE) * 2 + index] 84 | 30#define OS_BYTE 0 31#define OS_WORD 1 32#define OS_LONG 2 33#define OS_SINGLE 3 34#define OS_DOUBLE 4 35#define OS_EXTENDED 5 36#define OS_PACKED 6 37#define OS_UNSIZED 7 --- 37 unchanged lines hidden (view full) --- 75#define M68K_DTTR0 0 76#define M68K_DTTR1 1 77#define M68K_ITTR0 2 78#define M68K_ITTR1 3 79 80#define M68K_MAX_TTR 2 81#define TTR(type, index) ttr[((type & ACCESS_CODE) == ACCESS_CODE) * 2 + index] 82 |
85#define NB_MMU_MODES 2 | |
86#define TARGET_INSN_START_EXTRA_WORDS 1 87 88typedef CPU_LDoubleU FPReg; 89 90typedef struct CPUM68KState { 91 uint32_t dregs[8]; 92 uint32_t aregs[8]; 93 uint32_t pc; --- 403 unchanged lines hidden (view full) --- 497{ 498 return (env->features & (1u << feature)) != 0; 499} 500 501void m68k_cpu_list(void); 502 503void register_m68k_insns (CPUM68KState *env); 504 | 83#define TARGET_INSN_START_EXTRA_WORDS 1 84 85typedef CPU_LDoubleU FPReg; 86 87typedef struct CPUM68KState { 88 uint32_t dregs[8]; 89 uint32_t aregs[8]; 90 uint32_t pc; --- 403 unchanged lines hidden (view full) --- 494{ 495 return (env->features & (1u << feature)) != 0; 496} 497 498void m68k_cpu_list(void); 499 500void register_m68k_insns (CPUM68KState *env); 501 |
505/* Coldfire Linux uses 8k pages 506 * and m68k linux uses 4k pages 507 * use the smallest one 508 */ 509#define TARGET_PAGE_BITS 12 510 | |
511enum { 512 /* 1 bit to define user level / supervisor access */ 513 ACCESS_SUPER = 0x01, 514 /* 1 bit to indicate direction */ 515 ACCESS_STORE = 0x02, 516 /* 1 bit to indicate debug access */ 517 ACCESS_DEBUG = 0x04, 518 /* PTEST instruction */ 519 ACCESS_PTEST = 0x08, 520 /* Type of instruction that generated the access */ 521 ACCESS_CODE = 0x10, /* Code fetch access */ 522 ACCESS_DATA = 0x20, /* Data load/store access */ 523}; 524 | 502enum { 503 /* 1 bit to define user level / supervisor access */ 504 ACCESS_SUPER = 0x01, 505 /* 1 bit to indicate direction */ 506 ACCESS_STORE = 0x02, 507 /* 1 bit to indicate debug access */ 508 ACCESS_DEBUG = 0x04, 509 /* PTEST instruction */ 510 ACCESS_PTEST = 0x08, 511 /* Type of instruction that generated the access */ 512 ACCESS_CODE = 0x10, /* Code fetch access */ 513 ACCESS_DATA = 0x20, /* Data load/store access */ 514}; 515 |
525#define TARGET_PHYS_ADDR_SPACE_BITS 32 526#define TARGET_VIRT_ADDR_SPACE_BITS 32 527 | |
528#define M68K_CPU_TYPE_SUFFIX "-" TYPE_M68K_CPU 529#define M68K_CPU_TYPE_NAME(model) model M68K_CPU_TYPE_SUFFIX 530#define CPU_RESOLVING_TYPE TYPE_M68K_CPU 531 532#define cpu_signal_handler cpu_m68k_signal_handler 533#define cpu_list m68k_cpu_list 534 535/* MMU modes definitions */ --- 44 unchanged lines hidden --- | 516#define M68K_CPU_TYPE_SUFFIX "-" TYPE_M68K_CPU 517#define M68K_CPU_TYPE_NAME(model) model M68K_CPU_TYPE_SUFFIX 518#define CPU_RESOLVING_TYPE TYPE_M68K_CPU 519 520#define cpu_signal_handler cpu_m68k_signal_handler 521#define cpu_list m68k_cpu_list 522 523/* MMU modes definitions */ --- 44 unchanged lines hidden --- |