Commit 79383c9c082e5d56618968237dad806d0eb615f3
1 parent
c8f9349a
Fix some warnings that would be generated by gcc -Wredundant-decls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
39 changed files
with
64 additions
and
148 deletions
block.c
| @@ -56,7 +56,6 @@ static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num, | @@ -56,7 +56,6 @@ static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num, | ||
| 56 | static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, | 56 | static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, |
| 57 | const uint8_t *buf, int nb_sectors); | 57 | const uint8_t *buf, int nb_sectors); |
| 58 | 58 | ||
| 59 | -BlockDriverState *bdrv_first; | ||
| 60 | static BlockDriver *first_drv; | 59 | static BlockDriver *first_drv; |
| 61 | 60 | ||
| 62 | int path_is_absolute(const char *path) | 61 | int path_is_absolute(const char *path) |
exec-all.h
| @@ -57,8 +57,7 @@ typedef void (GenOpFunc1)(long); | @@ -57,8 +57,7 @@ typedef void (GenOpFunc1)(long); | ||
| 57 | typedef void (GenOpFunc2)(long, long); | 57 | typedef void (GenOpFunc2)(long, long); |
| 58 | typedef void (GenOpFunc3)(long, long, long); | 58 | typedef void (GenOpFunc3)(long, long, long); |
| 59 | 59 | ||
| 60 | -extern FILE *logfile; | ||
| 61 | -extern int loglevel; | 60 | +#include "qemu-log.h" |
| 62 | 61 | ||
| 63 | void gen_intermediate_code(CPUState *env, struct TranslationBlock *tb); | 62 | void gen_intermediate_code(CPUState *env, struct TranslationBlock *tb); |
| 64 | void gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb); | 63 | void gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb); |
| @@ -290,6 +289,8 @@ extern int tb_invalidated_flag; | @@ -290,6 +289,8 @@ extern int tb_invalidated_flag; | ||
| 290 | void tlb_fill(target_ulong addr, int is_write, int mmu_idx, | 289 | void tlb_fill(target_ulong addr, int is_write, int mmu_idx, |
| 291 | void *retaddr); | 290 | void *retaddr); |
| 292 | 291 | ||
| 292 | +#include "softmmu_defs.h" | ||
| 293 | + | ||
| 293 | #define ACCESS_TYPE (NB_MMU_MODES + 1) | 294 | #define ACCESS_TYPE (NB_MMU_MODES + 1) |
| 294 | #define MEMSUFFIX _code | 295 | #define MEMSUFFIX _code |
| 295 | #define env cpu_single_env | 296 | #define env cpu_single_env |
hw/arm-misc.h
| @@ -34,6 +34,9 @@ struct arm_boot_info { | @@ -34,6 +34,9 @@ struct arm_boot_info { | ||
| 34 | void arm_load_kernel(CPUState *env, struct arm_boot_info *info); | 34 | void arm_load_kernel(CPUState *env, struct arm_boot_info *info); |
| 35 | 35 | ||
| 36 | /* armv7m_nvic.c */ | 36 | /* armv7m_nvic.c */ |
| 37 | + | ||
| 38 | +/* Multiplication factor to convert from system clock ticks to qemu timer | ||
| 39 | + ticks. */ | ||
| 37 | int system_clock_scale; | 40 | int system_clock_scale; |
| 38 | qemu_irq *armv7m_nvic_init(CPUState *env); | 41 | qemu_irq *armv7m_nvic_init(CPUState *env); |
| 39 | 42 |
hw/armv7m_nvic.c
| @@ -50,10 +50,6 @@ typedef struct { | @@ -50,10 +50,6 @@ typedef struct { | ||
| 50 | #define SYSTICK_CLKSOURCE (1 << 2) | 50 | #define SYSTICK_CLKSOURCE (1 << 2) |
| 51 | #define SYSTICK_COUNTFLAG (1 << 16) | 51 | #define SYSTICK_COUNTFLAG (1 << 16) |
| 52 | 52 | ||
| 53 | -/* Multiplication factor to convert from system clock ticks to qemu timer | ||
| 54 | - ticks. */ | ||
| 55 | -int system_clock_scale; | ||
| 56 | - | ||
| 57 | /* Conversion factor from qemu timer to SysTick frequencies. */ | 53 | /* Conversion factor from qemu timer to SysTick frequencies. */ |
| 58 | static inline int64_t systick_scale(nvic_state *s) | 54 | static inline int64_t systick_scale(nvic_state *s) |
| 59 | { | 55 | { |
hw/isa.h
| 1 | +#ifndef HW_ISA_H | ||
| 2 | +#define HW_ISA_H | ||
| 1 | /* ISA bus */ | 3 | /* ISA bus */ |
| 2 | 4 | ||
| 3 | extern target_phys_addr_t isa_mem_base; | 5 | extern target_phys_addr_t isa_mem_base; |
| @@ -22,3 +24,4 @@ void DMA_init (int high_page_enable); | @@ -22,3 +24,4 @@ void DMA_init (int high_page_enable); | ||
| 22 | void DMA_register_channel (int nchan, | 24 | void DMA_register_channel (int nchan, |
| 23 | DMA_transfer_handler transfer_handler, | 25 | DMA_transfer_handler transfer_handler, |
| 24 | void *opaque); | 26 | void *opaque); |
| 27 | +#endif |
hw/usb.h
| @@ -235,8 +235,6 @@ int usb_generic_handle_packet(USBDevice *s, USBPacket *p); | @@ -235,8 +235,6 @@ int usb_generic_handle_packet(USBDevice *s, USBPacket *p); | ||
| 235 | int set_usb_string(uint8_t *buf, const char *str); | 235 | int set_usb_string(uint8_t *buf, const char *str); |
| 236 | void usb_send_msg(USBDevice *dev, int msg); | 236 | void usb_send_msg(USBDevice *dev, int msg); |
| 237 | 237 | ||
| 238 | -void usb_packet_complete(USBPacket *p); | ||
| 239 | - | ||
| 240 | /* usb hub */ | 238 | /* usb hub */ |
| 241 | USBDevice *usb_hub_init(int nb_ports); | 239 | USBDevice *usb_hub_init(int nb_ports); |
| 242 | 240 |
linux-user/arm/nwfpe/fpa11_cprt.c
| @@ -27,8 +27,6 @@ | @@ -27,8 +27,6 @@ | ||
| 27 | //#include "fpmodule.h" | 27 | //#include "fpmodule.h" |
| 28 | //#include "fpmodule.inl" | 28 | //#include "fpmodule.inl" |
| 29 | 29 | ||
| 30 | -void SetRoundingMode(const unsigned int opcode); | ||
| 31 | - | ||
| 32 | unsigned int PerformFLT(const unsigned int opcode); | 30 | unsigned int PerformFLT(const unsigned int opcode); |
| 33 | unsigned int PerformFIX(const unsigned int opcode); | 31 | unsigned int PerformFIX(const unsigned int opcode); |
| 34 | 32 |
linux-user/arm/syscall.h
linux-user/m68k/syscall.h
linux-user/main.c
| @@ -477,9 +477,6 @@ void cpu_loop(CPUX86State *env) | @@ -477,9 +477,6 @@ void cpu_loop(CPUX86State *env) | ||
| 477 | 477 | ||
| 478 | #ifdef TARGET_ARM | 478 | #ifdef TARGET_ARM |
| 479 | 479 | ||
| 480 | -/* XXX: find a better solution */ | ||
| 481 | -extern void tb_invalidate_page_range(abi_ulong start, abi_ulong end); | ||
| 482 | - | ||
| 483 | static void arm_cache_flush(abi_ulong start, abi_ulong last) | 480 | static void arm_cache_flush(abi_ulong start, abi_ulong last) |
| 484 | { | 481 | { |
| 485 | abi_ulong addr, last1; | 482 | abi_ulong addr, last1; |
linux-user/qemu.h
| @@ -199,8 +199,7 @@ int get_osversion(void); | @@ -199,8 +199,7 @@ int get_osversion(void); | ||
| 199 | void fork_start(void); | 199 | void fork_start(void); |
| 200 | void fork_end(int child); | 200 | void fork_end(int child); |
| 201 | 201 | ||
| 202 | -extern int loglevel; | ||
| 203 | -extern FILE *logfile; | 202 | +#include "qemu-log.h" |
| 204 | 203 | ||
| 205 | /* strace.c */ | 204 | /* strace.c */ |
| 206 | void print_syscall(int num, | 205 | void print_syscall(int num, |
linux-user/syscall.c
| @@ -269,10 +269,6 @@ extern int personality(int); | @@ -269,10 +269,6 @@ extern int personality(int); | ||
| 269 | extern int flock(int, int); | 269 | extern int flock(int, int); |
| 270 | extern int setfsuid(int); | 270 | extern int setfsuid(int); |
| 271 | extern int setfsgid(int); | 271 | extern int setfsgid(int); |
| 272 | -extern int setresuid(uid_t, uid_t, uid_t); | ||
| 273 | -extern int getresuid(uid_t *, uid_t *, uid_t *); | ||
| 274 | -extern int setresgid(gid_t, gid_t, gid_t); | ||
| 275 | -extern int getresgid(gid_t *, gid_t *, gid_t *); | ||
| 276 | extern int setgroups(int, gid_t *); | 272 | extern int setgroups(int, gid_t *); |
| 277 | 273 | ||
| 278 | #define ERRNO_TABLE_SIZE 1200 | 274 | #define ERRNO_TABLE_SIZE 1200 |
monitor.c
| @@ -2687,8 +2687,6 @@ static void term_read(void *opaque, const uint8_t *buf, int size) | @@ -2687,8 +2687,6 @@ static void term_read(void *opaque, const uint8_t *buf, int size) | ||
| 2687 | readline_handle_byte(buf[i]); | 2687 | readline_handle_byte(buf[i]); |
| 2688 | } | 2688 | } |
| 2689 | 2689 | ||
| 2690 | -static void monitor_start_input(void); | ||
| 2691 | - | ||
| 2692 | static void monitor_handle_command1(void *opaque, const char *cmdline) | 2690 | static void monitor_handle_command1(void *opaque, const char *cmdline) |
| 2693 | { | 2691 | { |
| 2694 | monitor_handle_command(cmdline); | 2692 | monitor_handle_command(cmdline); |
qemu-log.h
0 โ 100644
slirp/debug.c
| @@ -16,8 +16,6 @@ int dostats = 0; | @@ -16,8 +16,6 @@ int dostats = 0; | ||
| 16 | #endif | 16 | #endif |
| 17 | int slirp_debug = 0; | 17 | int slirp_debug = 0; |
| 18 | 18 | ||
| 19 | -extern char *strerror _P((int)); | ||
| 20 | - | ||
| 21 | /* Carry over one item from main.c so that the tty's restored. | 19 | /* Carry over one item from main.c so that the tty's restored. |
| 22 | * Only done when the tty being used is /dev/tty --RedWolf */ | 20 | * Only done when the tty being used is /dev/tty --RedWolf */ |
| 23 | #ifndef CONFIG_QEMU | 21 | #ifndef CONFIG_QEMU |
slirp/mbuf.c
| @@ -28,7 +28,7 @@ int mbuf_max = 0; | @@ -28,7 +28,7 @@ int mbuf_max = 0; | ||
| 28 | * Find a nice value for msize | 28 | * Find a nice value for msize |
| 29 | * XXX if_maxlinkhdr already in mtu | 29 | * XXX if_maxlinkhdr already in mtu |
| 30 | */ | 30 | */ |
| 31 | -#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) | 31 | +#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) |
| 32 | 32 | ||
| 33 | void | 33 | void |
| 34 | m_init() | 34 | m_init() |
| @@ -54,7 +54,7 @@ m_get() | @@ -54,7 +54,7 @@ m_get() | ||
| 54 | DEBUG_CALL("m_get"); | 54 | DEBUG_CALL("m_get"); |
| 55 | 55 | ||
| 56 | if (m_freelist.m_next == &m_freelist) { | 56 | if (m_freelist.m_next == &m_freelist) { |
| 57 | - m = (struct mbuf *)malloc(MSIZE); | 57 | + m = (struct mbuf *)malloc(SLIRP_MSIZE); |
| 58 | if (m == NULL) goto end_error; | 58 | if (m == NULL) goto end_error; |
| 59 | mbuf_alloced++; | 59 | mbuf_alloced++; |
| 60 | if (mbuf_alloced > MBUF_THRESH) | 60 | if (mbuf_alloced > MBUF_THRESH) |
| @@ -71,7 +71,7 @@ m_get() | @@ -71,7 +71,7 @@ m_get() | ||
| 71 | m->m_flags = (flags | M_USEDLIST); | 71 | m->m_flags = (flags | M_USEDLIST); |
| 72 | 72 | ||
| 73 | /* Initialise it */ | 73 | /* Initialise it */ |
| 74 | - m->m_size = MSIZE - sizeof(struct m_hdr); | 74 | + m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr); |
| 75 | m->m_data = m->m_dat; | 75 | m->m_data = m->m_dat; |
| 76 | m->m_len = 0; | 76 | m->m_len = 0; |
| 77 | m->m_nextpkt = 0; | 77 | m->m_nextpkt = 0; |
slirp/misc.h
| @@ -17,7 +17,7 @@ struct ex_list { | @@ -17,7 +17,7 @@ struct ex_list { | ||
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | extern struct ex_list *exec_list; | 19 | extern struct ex_list *exec_list; |
| 20 | -extern u_int curtime, time_fasttimo, last_slowtimo; | 20 | +extern u_int time_fasttimo, last_slowtimo; |
| 21 | 21 | ||
| 22 | extern int (*lprint_print) _P((void *, const char *, va_list)); | 22 | extern int (*lprint_print) _P((void *, const char *, va_list)); |
| 23 | extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; | 23 | extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; |
slirp/slirp_config.h
| @@ -128,10 +128,10 @@ | @@ -128,10 +128,10 @@ | ||
| 128 | #undef HAVE_SYS_STROPTS_H | 128 | #undef HAVE_SYS_STROPTS_H |
| 129 | 129 | ||
| 130 | /* Define to whatever your compiler thinks inline should be */ | 130 | /* Define to whatever your compiler thinks inline should be */ |
| 131 | -#define inline inline | 131 | +//#define inline inline |
| 132 | 132 | ||
| 133 | /* Define to whatever your compiler thinks const should be */ | 133 | /* Define to whatever your compiler thinks const should be */ |
| 134 | -#define const const | 134 | +//#define const const |
| 135 | 135 | ||
| 136 | /* Define if your compiler doesn't like prototypes */ | 136 | /* Define if your compiler doesn't like prototypes */ |
| 137 | #undef NO_PROTOTYPES | 137 | #undef NO_PROTOTYPES |
| @@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
| 170 | #undef HAVE_SETENV | 170 | #undef HAVE_SETENV |
| 171 | 171 | ||
| 172 | /* Define if you have index() */ | 172 | /* Define if you have index() */ |
| 173 | -#undef HAVE_INDEX | 173 | +#define HAVE_INDEX |
| 174 | 174 | ||
| 175 | /* Define if you have bcmp() */ | 175 | /* Define if you have bcmp() */ |
| 176 | #undef HAVE_BCMP | 176 | #undef HAVE_BCMP |
| @@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
| 182 | #define HAVE_MEMMOVE | 182 | #define HAVE_MEMMOVE |
| 183 | 183 | ||
| 184 | /* Define if you have gethostid */ | 184 | /* Define if you have gethostid */ |
| 185 | -#undef HAVE_GETHOSTID | 185 | +#define HAVE_GETHOSTID |
| 186 | 186 | ||
| 187 | /* Define if you DON'T have unix-domain sockets */ | 187 | /* Define if you DON'T have unix-domain sockets */ |
| 188 | #undef NO_UNIX_SOCKETS | 188 | #undef NO_UNIX_SOCKETS |
slirp/socket.c
| @@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
| 8 | #define WANT_SYS_IOCTL_H | 8 | #define WANT_SYS_IOCTL_H |
| 9 | #include <slirp.h> | 9 | #include <slirp.h> |
| 10 | #include "ip_icmp.h" | 10 | #include "ip_icmp.h" |
| 11 | -#include "main.h" | ||
| 12 | #ifdef __sun__ | 11 | #ifdef __sun__ |
| 13 | #include <sys/filio.h> | 12 | #include <sys/filio.h> |
| 14 | #endif | 13 | #endif |
softmmu_defs.h
0 โ 100644
| 1 | +#ifndef SOFTMMU_DEFS_H | ||
| 2 | +#define SOFTMMU_DEFS_H | ||
| 3 | + | ||
| 4 | +uint8_t REGPARM __ldb_mmu(target_ulong addr, int mmu_idx); | ||
| 5 | +void REGPARM __stb_mmu(target_ulong addr, uint8_t val, int mmu_idx); | ||
| 6 | +uint16_t REGPARM __ldw_mmu(target_ulong addr, int mmu_idx); | ||
| 7 | +void REGPARM __stw_mmu(target_ulong addr, uint16_t val, int mmu_idx); | ||
| 8 | +uint32_t REGPARM __ldl_mmu(target_ulong addr, int mmu_idx); | ||
| 9 | +void REGPARM __stl_mmu(target_ulong addr, uint32_t val, int mmu_idx); | ||
| 10 | +uint64_t REGPARM __ldq_mmu(target_ulong addr, int mmu_idx); | ||
| 11 | +void REGPARM __stq_mmu(target_ulong addr, uint64_t val, int mmu_idx); | ||
| 12 | + | ||
| 13 | +uint8_t REGPARM __ldb_cmmu(target_ulong addr, int mmu_idx); | ||
| 14 | +void REGPARM __stb_cmmu(target_ulong addr, uint8_t val, int mmu_idx); | ||
| 15 | +uint16_t REGPARM __ldw_cmmu(target_ulong addr, int mmu_idx); | ||
| 16 | +void REGPARM __stw_cmmu(target_ulong addr, uint16_t val, int mmu_idx); | ||
| 17 | +uint32_t REGPARM __ldl_cmmu(target_ulong addr, int mmu_idx); | ||
| 18 | +void REGPARM __stl_cmmu(target_ulong addr, uint32_t val, int mmu_idx); | ||
| 19 | +uint64_t REGPARM __ldq_cmmu(target_ulong addr, int mmu_idx); | ||
| 20 | +void REGPARM __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx); | ||
| 21 | + | ||
| 22 | +#endif |
softmmu_exec.h
| @@ -9,6 +9,8 @@ | @@ -9,6 +9,8 @@ | ||
| 9 | #define ldul_executive ldl_executive | 9 | #define ldul_executive ldl_executive |
| 10 | #define ldul_supervisor ldl_supervisor | 10 | #define ldul_supervisor ldl_supervisor |
| 11 | 11 | ||
| 12 | +#include "softmmu_defs.h" | ||
| 13 | + | ||
| 12 | #define ACCESS_TYPE 0 | 14 | #define ACCESS_TYPE 0 |
| 13 | #define MEMSUFFIX MMU_MODE0_SUFFIX | 15 | #define MEMSUFFIX MMU_MODE0_SUFFIX |
| 14 | #define DATA_SIZE 1 | 16 | #define DATA_SIZE 1 |
softmmu_header.h
| @@ -70,10 +70,6 @@ | @@ -70,10 +70,6 @@ | ||
| 70 | #define ADDR_READ addr_read | 70 | #define ADDR_READ addr_read |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | -DATA_TYPE REGPARM glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr, | ||
| 74 | - int mmu_idx); | ||
| 75 | -void REGPARM glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int mmu_idx); | ||
| 76 | - | ||
| 77 | #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \ | 73 | #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \ |
| 78 | (ACCESS_TYPE < NB_MMU_MODES) && defined(ASM_SOFTMMU) | 74 | (ACCESS_TYPE < NB_MMU_MODES) && defined(ASM_SOFTMMU) |
| 79 | 75 |
target-alpha/exec.h
| @@ -74,8 +74,6 @@ static always_inline void regs_to_env(void) | @@ -74,8 +74,6 @@ static always_inline void regs_to_env(void) | ||
| 74 | 74 | ||
| 75 | int cpu_alpha_handle_mmu_fault (CPUState *env, uint64_t address, int rw, | 75 | int cpu_alpha_handle_mmu_fault (CPUState *env, uint64_t address, int rw, |
| 76 | int mmu_idx, int is_softmmu); | 76 | int mmu_idx, int is_softmmu); |
| 77 | -int cpu_alpha_mfpr (CPUState *env, int iprn, uint64_t *valp); | ||
| 78 | -int cpu_alpha_mtpr (CPUState *env, int iprn, uint64_t val, uint64_t *oldvalp); | ||
| 79 | 77 | ||
| 80 | void do_interrupt (CPUState *env); | 78 | void do_interrupt (CPUState *env); |
| 81 | 79 |
target-arm/exec.h
| @@ -61,5 +61,3 @@ static inline int cpu_halted(CPUState *env) { | @@ -61,5 +61,3 @@ static inline int cpu_halted(CPUState *env) { | ||
| 61 | void cpu_loop_exit(void); | 61 | void cpu_loop_exit(void); |
| 62 | 62 | ||
| 63 | void raise_exception(int); | 63 | void raise_exception(int); |
| 64 | - | ||
| 65 | -uint32_t helper_neon_mul_p8(uint32_t op1, uint32_t op2); |
target-arm/translate.c
| @@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
| 29 | #include "exec-all.h" | 29 | #include "exec-all.h" |
| 30 | #include "disas.h" | 30 | #include "disas.h" |
| 31 | #include "tcg-op.h" | 31 | #include "tcg-op.h" |
| 32 | +#include "qemu-log.h" | ||
| 32 | 33 | ||
| 33 | #define GEN_HELPER 1 | 34 | #define GEN_HELPER 1 |
| 34 | #include "helpers.h" | 35 | #include "helpers.h" |
| @@ -72,10 +73,6 @@ typedef struct DisasContext { | @@ -72,10 +73,6 @@ typedef struct DisasContext { | ||
| 72 | #define DISAS_WFI 4 | 73 | #define DISAS_WFI 4 |
| 73 | #define DISAS_SWI 5 | 74 | #define DISAS_SWI 5 |
| 74 | 75 | ||
| 75 | -/* XXX: move that elsewhere */ | ||
| 76 | -extern FILE *logfile; | ||
| 77 | -extern int loglevel; | ||
| 78 | - | ||
| 79 | static TCGv cpu_env; | 76 | static TCGv cpu_env; |
| 80 | /* We reuse the same 64-bit temporaries for efficiency. */ | 77 | /* We reuse the same 64-bit temporaries for efficiency. */ |
| 81 | static TCGv cpu_V0, cpu_V1, cpu_M0; | 78 | static TCGv cpu_V0, cpu_V1, cpu_M0; |
target-cris/exec.h
| @@ -46,7 +46,6 @@ static inline void regs_to_env(void) | @@ -46,7 +46,6 @@ static inline void regs_to_env(void) | ||
| 46 | 46 | ||
| 47 | int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, | 47 | int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, |
| 48 | int mmu_idx, int is_softmmu); | 48 | int mmu_idx, int is_softmmu); |
| 49 | -void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr); | ||
| 50 | 49 | ||
| 51 | #if !defined(CONFIG_USER_ONLY) | 50 | #if !defined(CONFIG_USER_ONLY) |
| 52 | #include "softmmu_exec.h" | 51 | #include "softmmu_exec.h" |
target-i386/exec.h
| @@ -31,8 +31,7 @@ | @@ -31,8 +31,7 @@ | ||
| 31 | 31 | ||
| 32 | register struct CPUX86State *env asm(AREG0); | 32 | register struct CPUX86State *env asm(AREG0); |
| 33 | 33 | ||
| 34 | -extern FILE *logfile; | ||
| 35 | -extern int loglevel; | 34 | +#include "qemu-log.h" |
| 36 | 35 | ||
| 37 | #define EAX (env->regs[R_EAX]) | 36 | #define EAX (env->regs[R_EAX]) |
| 38 | #define ECX (env->regs[R_ECX]) | 37 | #define ECX (env->regs[R_ECX]) |
| @@ -58,13 +57,10 @@ extern int loglevel; | @@ -58,13 +57,10 @@ extern int loglevel; | ||
| 58 | #include "cpu.h" | 57 | #include "cpu.h" |
| 59 | #include "exec-all.h" | 58 | #include "exec-all.h" |
| 60 | 59 | ||
| 61 | -void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); | ||
| 62 | void cpu_x86_update_cr3(CPUX86State *env, target_ulong new_cr3); | 60 | void cpu_x86_update_cr3(CPUX86State *env, target_ulong new_cr3); |
| 63 | void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4); | 61 | void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4); |
| 64 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, | 62 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, |
| 65 | int is_write, int mmu_idx, int is_softmmu); | 63 | int is_write, int mmu_idx, int is_softmmu); |
| 66 | -void tlb_fill(target_ulong addr, int is_write, int mmu_idx, | ||
| 67 | - void *retaddr); | ||
| 68 | void __hidden cpu_lock(void); | 64 | void __hidden cpu_lock(void); |
| 69 | void __hidden cpu_unlock(void); | 65 | void __hidden cpu_unlock(void); |
| 70 | void do_interrupt(int intno, int is_int, int error_code, | 66 | void do_interrupt(int intno, int is_int, int error_code, |
| @@ -120,16 +116,6 @@ static inline void svm_check_intercept(uint32_t type) | @@ -120,16 +116,6 @@ static inline void svm_check_intercept(uint32_t type) | ||
| 120 | #define floatx_round_to_int floatx80_round_to_int | 116 | #define floatx_round_to_int floatx80_round_to_int |
| 121 | #define floatx_compare floatx80_compare | 117 | #define floatx_compare floatx80_compare |
| 122 | #define floatx_compare_quiet floatx80_compare_quiet | 118 | #define floatx_compare_quiet floatx80_compare_quiet |
| 123 | -#define sin sinl | ||
| 124 | -#define cos cosl | ||
| 125 | -#define sqrt sqrtl | ||
| 126 | -#define pow powl | ||
| 127 | -#define log logl | ||
| 128 | -#define tan tanl | ||
| 129 | -#define atan2 atan2l | ||
| 130 | -#define floor floorl | ||
| 131 | -#define ceil ceill | ||
| 132 | -#define ldexp ldexpl | ||
| 133 | #else | 119 | #else |
| 134 | #define floatx_to_int32 float64_to_int32 | 120 | #define floatx_to_int32 float64_to_int32 |
| 135 | #define floatx_to_int64 float64_to_int64 | 121 | #define floatx_to_int64 float64_to_int64 |
| @@ -148,16 +134,6 @@ static inline void svm_check_intercept(uint32_t type) | @@ -148,16 +134,6 @@ static inline void svm_check_intercept(uint32_t type) | ||
| 148 | #define floatx_compare_quiet float64_compare_quiet | 134 | #define floatx_compare_quiet float64_compare_quiet |
| 149 | #endif | 135 | #endif |
| 150 | 136 | ||
| 151 | -extern CPU86_LDouble sin(CPU86_LDouble x); | ||
| 152 | -extern CPU86_LDouble cos(CPU86_LDouble x); | ||
| 153 | -extern CPU86_LDouble sqrt(CPU86_LDouble x); | ||
| 154 | -extern CPU86_LDouble pow(CPU86_LDouble, CPU86_LDouble); | ||
| 155 | -extern CPU86_LDouble log(CPU86_LDouble x); | ||
| 156 | -extern CPU86_LDouble tan(CPU86_LDouble x); | ||
| 157 | -extern CPU86_LDouble atan2(CPU86_LDouble, CPU86_LDouble); | ||
| 158 | -extern CPU86_LDouble floor(CPU86_LDouble x); | ||
| 159 | -extern CPU86_LDouble ceil(CPU86_LDouble x); | ||
| 160 | - | ||
| 161 | #define RC_MASK 0xc00 | 137 | #define RC_MASK 0xc00 |
| 162 | #define RC_NEAR 0x000 | 138 | #define RC_NEAR 0x000 |
| 163 | #define RC_DOWN 0x400 | 139 | #define RC_DOWN 0x400 |
target-i386/helper.h
| @@ -186,7 +186,6 @@ DEF_HELPER(void, helper_frndint, (void)) | @@ -186,7 +186,6 @@ DEF_HELPER(void, helper_frndint, (void)) | ||
| 186 | DEF_HELPER(void, helper_fscale, (void)) | 186 | DEF_HELPER(void, helper_fscale, (void)) |
| 187 | DEF_HELPER(void, helper_fsin, (void)) | 187 | DEF_HELPER(void, helper_fsin, (void)) |
| 188 | DEF_HELPER(void, helper_fcos, (void)) | 188 | DEF_HELPER(void, helper_fcos, (void)) |
| 189 | -DEF_HELPER(void, helper_fxam_ST0, (void)) | ||
| 190 | DEF_HELPER(void, helper_fstenv, (target_ulong ptr, int data32)) | 189 | DEF_HELPER(void, helper_fstenv, (target_ulong ptr, int data32)) |
| 191 | DEF_HELPER(void, helper_fldenv, (target_ulong ptr, int data32)) | 190 | DEF_HELPER(void, helper_fldenv, (target_ulong ptr, int data32)) |
| 192 | DEF_HELPER(void, helper_fsave, (target_ulong ptr, int data32)) | 191 | DEF_HELPER(void, helper_fsave, (target_ulong ptr, int data32)) |
target-m68k/exec.h
| @@ -44,8 +44,6 @@ int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw, | @@ -44,8 +44,6 @@ int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw, | ||
| 44 | #include "softmmu_exec.h" | 44 | #include "softmmu_exec.h" |
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | -void cpu_m68k_flush_flags(CPUM68KState *env, int cc_op); | ||
| 48 | - | ||
| 49 | void cpu_loop_exit(void); | 47 | void cpu_loop_exit(void); |
| 50 | 48 | ||
| 51 | static inline int cpu_halted(CPUState *env) { | 49 | static inline int cpu_halted(CPUState *env) { |
target-m68k/translate.c
| @@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
| 30 | #include "exec-all.h" | 30 | #include "exec-all.h" |
| 31 | #include "disas.h" | 31 | #include "disas.h" |
| 32 | #include "tcg-op.h" | 32 | #include "tcg-op.h" |
| 33 | +#include "qemu-log.h" | ||
| 33 | 34 | ||
| 34 | #define GEN_HELPER 1 | 35 | #define GEN_HELPER 1 |
| 35 | #include "helpers.h" | 36 | #include "helpers.h" |
| @@ -157,9 +158,6 @@ typedef struct DisasContext { | @@ -157,9 +158,6 @@ typedef struct DisasContext { | ||
| 157 | static void *gen_throws_exception; | 158 | static void *gen_throws_exception; |
| 158 | #define gen_last_qop NULL | 159 | #define gen_last_qop NULL |
| 159 | 160 | ||
| 160 | -extern FILE *logfile; | ||
| 161 | -extern int loglevel; | ||
| 162 | - | ||
| 163 | #define OS_BYTE 0 | 161 | #define OS_BYTE 0 |
| 164 | #define OS_WORD 1 | 162 | #define OS_WORD 1 |
| 165 | #define OS_LONG 2 | 163 | #define OS_LONG 2 |
target-mips/exec.h
| @@ -33,9 +33,6 @@ void cpu_loop_exit(void); | @@ -33,9 +33,6 @@ void cpu_loop_exit(void); | ||
| 33 | void do_raise_exception_err (uint32_t exception, int error_code); | 33 | void do_raise_exception_err (uint32_t exception, int error_code); |
| 34 | void do_raise_exception (uint32_t exception); | 34 | void do_raise_exception (uint32_t exception); |
| 35 | 35 | ||
| 36 | -void cpu_dump_state(CPUState *env, FILE *f, | ||
| 37 | - int (*cpu_fprintf)(FILE *f, const char *fmt, ...), | ||
| 38 | - int flags); | ||
| 39 | void cpu_mips_irqctrl_init (void); | 36 | void cpu_mips_irqctrl_init (void); |
| 40 | uint32_t cpu_mips_get_random (CPUState *env); | 37 | uint32_t cpu_mips_get_random (CPUState *env); |
| 41 | uint32_t cpu_mips_get_count (CPUState *env); | 38 | uint32_t cpu_mips_get_count (CPUState *env); |
target-ppc/translate_init.c
| @@ -8941,8 +8941,6 @@ static void dump_ppc_sprs (CPUPPCState *env) | @@ -8941,8 +8941,6 @@ static void dump_ppc_sprs (CPUPPCState *env) | ||
| 8941 | #include <stdlib.h> | 8941 | #include <stdlib.h> |
| 8942 | #include <string.h> | 8942 | #include <string.h> |
| 8943 | 8943 | ||
| 8944 | -int fflush (FILE *stream); | ||
| 8945 | - | ||
| 8946 | /* Opcode types */ | 8944 | /* Opcode types */ |
| 8947 | enum { | 8945 | enum { |
| 8948 | PPC_DIRECT = 0, /* Opcode routine */ | 8946 | PPC_DIRECT = 0, /* Opcode routine */ |
tcg/arm/tcg-target.c
| @@ -808,15 +808,8 @@ static void tcg_out_div_helper(TCGContext *s, int cond, const TCGArg *args, | @@ -808,15 +808,8 @@ static void tcg_out_div_helper(TCGContext *s, int cond, const TCGArg *args, | ||
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | #ifdef CONFIG_SOFTMMU | 810 | #ifdef CONFIG_SOFTMMU |
| 811 | -extern void __ldb_mmu(void); | ||
| 812 | -extern void __ldw_mmu(void); | ||
| 813 | -extern void __ldl_mmu(void); | ||
| 814 | -extern void __ldq_mmu(void); | ||
| 815 | - | ||
| 816 | -extern void __stb_mmu(void); | ||
| 817 | -extern void __stw_mmu(void); | ||
| 818 | -extern void __stl_mmu(void); | ||
| 819 | -extern void __stq_mmu(void); | 811 | + |
| 812 | +#include "../../softmmu_defs.h" | ||
| 820 | 813 | ||
| 821 | static void *qemu_ld_helpers[4] = { | 814 | static void *qemu_ld_helpers[4] = { |
| 822 | __ldb_mmu, | 815 | __ldb_mmu, |
tcg/hppa/tcg-target.c
| @@ -345,15 +345,8 @@ static inline void tcg_out_call(TCGContext *s, void *func) | @@ -345,15 +345,8 @@ static inline void tcg_out_call(TCGContext *s, void *func) | ||
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | #if defined(CONFIG_SOFTMMU) | 347 | #if defined(CONFIG_SOFTMMU) |
| 348 | -extern void __ldb_mmu(void); | ||
| 349 | -extern void __ldw_mmu(void); | ||
| 350 | -extern void __ldl_mmu(void); | ||
| 351 | -extern void __ldq_mmu(void); | ||
| 352 | - | ||
| 353 | -extern void __stb_mmu(void); | ||
| 354 | -extern void __stw_mmu(void); | ||
| 355 | -extern void __stl_mmu(void); | ||
| 356 | -extern void __stq_mmu(void); | 348 | + |
| 349 | +#include "../../softmmu_defs.h" | ||
| 357 | 350 | ||
| 358 | static void *qemu_ld_helpers[4] = { | 351 | static void *qemu_ld_helpers[4] = { |
| 359 | __ldb_mmu, | 352 | __ldb_mmu, |
tcg/i386/tcg-target.c
| @@ -404,15 +404,8 @@ static void tcg_out_brcond2(TCGContext *s, | @@ -404,15 +404,8 @@ static void tcg_out_brcond2(TCGContext *s, | ||
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | #if defined(CONFIG_SOFTMMU) | 406 | #if defined(CONFIG_SOFTMMU) |
| 407 | -extern void __ldb_mmu(void); | ||
| 408 | -extern void __ldw_mmu(void); | ||
| 409 | -extern void __ldl_mmu(void); | ||
| 410 | -extern void __ldq_mmu(void); | ||
| 411 | - | ||
| 412 | -extern void __stb_mmu(void); | ||
| 413 | -extern void __stw_mmu(void); | ||
| 414 | -extern void __stl_mmu(void); | ||
| 415 | -extern void __stq_mmu(void); | 407 | + |
| 408 | +#include "../../softmmu_defs.h" | ||
| 416 | 409 | ||
| 417 | static void *qemu_ld_helpers[4] = { | 410 | static void *qemu_ld_helpers[4] = { |
| 418 | __ldb_mmu, | 411 | __ldb_mmu, |
tcg/ppc/tcg-target.c
| @@ -454,15 +454,8 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) | @@ -454,15 +454,8 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) | ||
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | #if defined(CONFIG_SOFTMMU) | 456 | #if defined(CONFIG_SOFTMMU) |
| 457 | -extern void __ldb_mmu(void); | ||
| 458 | -extern void __ldw_mmu(void); | ||
| 459 | -extern void __ldl_mmu(void); | ||
| 460 | -extern void __ldq_mmu(void); | ||
| 461 | - | ||
| 462 | -extern void __stb_mmu(void); | ||
| 463 | -extern void __stw_mmu(void); | ||
| 464 | -extern void __stl_mmu(void); | ||
| 465 | -extern void __stq_mmu(void); | 457 | + |
| 458 | +#include "../../softmmu_defs.h" | ||
| 466 | 459 | ||
| 467 | static void *qemu_ld_helpers[4] = { | 460 | static void *qemu_ld_helpers[4] = { |
| 468 | __ldb_mmu, | 461 | __ldb_mmu, |
tcg/ppc64/tcg-target.c
| @@ -509,15 +509,8 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) | @@ -509,15 +509,8 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) | ||
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | #if defined (CONFIG_SOFTMMU) | 511 | #if defined (CONFIG_SOFTMMU) |
| 512 | -extern void __ldb_mmu(void); | ||
| 513 | -extern void __ldw_mmu(void); | ||
| 514 | -extern void __ldl_mmu(void); | ||
| 515 | -extern void __ldq_mmu(void); | ||
| 516 | - | ||
| 517 | -extern void __stb_mmu(void); | ||
| 518 | -extern void __stw_mmu(void); | ||
| 519 | -extern void __stl_mmu(void); | ||
| 520 | -extern void __stq_mmu(void); | 512 | + |
| 513 | +#include "../../softmmu_defs.h" | ||
| 521 | 514 | ||
| 522 | static void *qemu_ld_helpers[4] = { | 515 | static void *qemu_ld_helpers[4] = { |
| 523 | __ldb_mmu, | 516 | __ldb_mmu, |
tcg/sparc/tcg-target.c
| @@ -472,16 +472,8 @@ void tcg_target_qemu_prologue(TCGContext *s) | @@ -472,16 +472,8 @@ void tcg_target_qemu_prologue(TCGContext *s) | ||
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | #if defined(CONFIG_SOFTMMU) | 474 | #if defined(CONFIG_SOFTMMU) |
| 475 | -extern void __ldb_mmu(void); | ||
| 476 | -extern void __ldw_mmu(void); | ||
| 477 | -extern void __ldl_mmu(void); | ||
| 478 | -extern void __ldq_mmu(void); | ||
| 479 | - | ||
| 480 | -extern void __stb_mmu(void); | ||
| 481 | -extern void __stw_mmu(void); | ||
| 482 | -extern void __stl_mmu(void); | ||
| 483 | -extern void __stq_mmu(void); | ||
| 484 | 475 | ||
| 476 | +#include "../../softmmu_defs.h" | ||
| 485 | 477 | ||
| 486 | static const void * const qemu_ld_helpers[4] = { | 478 | static const void * const qemu_ld_helpers[4] = { |
| 487 | __ldb_mmu, | 479 | __ldb_mmu, |
tcg/x86_64/tcg-target.c
| @@ -467,16 +467,8 @@ static void tcg_out_brcond(TCGContext *s, int cond, | @@ -467,16 +467,8 @@ static void tcg_out_brcond(TCGContext *s, int cond, | ||
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | #if defined(CONFIG_SOFTMMU) | 469 | #if defined(CONFIG_SOFTMMU) |
| 470 | -extern void __ldb_mmu(void); | ||
| 471 | -extern void __ldw_mmu(void); | ||
| 472 | -extern void __ldl_mmu(void); | ||
| 473 | -extern void __ldq_mmu(void); | ||
| 474 | - | ||
| 475 | -extern void __stb_mmu(void); | ||
| 476 | -extern void __stw_mmu(void); | ||
| 477 | -extern void __stl_mmu(void); | ||
| 478 | -extern void __stq_mmu(void); | ||
| 479 | 470 | ||
| 471 | +#include "../../softmmu_defs.h" | ||
| 480 | 472 | ||
| 481 | static void *qemu_ld_helpers[4] = { | 473 | static void *qemu_ld_helpers[4] = { |
| 482 | __ldb_mmu, | 474 | __ldb_mmu, |