Index: configure =================================================================== RCS file: /cvsroot/qemu/qemu/configure,v retrieving revision 1.14 diff -u -d -w -B -b -d -p -r1.14 configure --- configure 15 Jun 2003 20:25:43 -0000 1.14 +++ configure 24 Jun 2003 19:19:23 -0000 @@ -190,7 +192,7 @@ echo "Standard options:" echo " --help print this message" echo " --prefix=PREFIX install in PREFIX [$prefix]" echo " --interp-prefix=PREFIX where to find shared libraries, etc. [$interp_prefix]" -echo " --target_cpu=CPU set target cpu (x86 or arm) [$target_cpu]" +echo " --target-cpu=CPU set target cpu (x86 ppc or arm) [$target_cpu]" echo "" echo "Advanced options (experts only):" echo " --source-path=PATH path of source code [$source_path]" Index: dyngen-exec.h =================================================================== RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v retrieving revision 1.1 diff -u -d -w -B -b -d -p -r1.1 dyngen-exec.h --- dyngen-exec.h 15 Jun 2003 19:46:57 -0000 1.1 +++ dyngen-exec.h 24 Jun 2003 19:19:23 -0000 @@ -17,6 +17,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#if !defined (__DYNGEN_EXEC_H__) +#define __DYNGEN_EXEC_H__ + typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; @@ -27,6 +30,19 @@ typedef signed short int16_t; typedef signed int int32_t; typedef signed long long int64_t; +# define INT8_MIN (-128) +# define INT16_MIN (-32767-1) +# define INT32_MIN (-2147483647-1) +# define INT64_MIN (-(int64_t)(9223372036854775807)-1) +# define INT8_MAX (127) +# define INT16_MAX (32767) +# define INT32_MAX (2147483647) +# define INT64_MAX ((int64_t)(9223372036854775807)) +# define UINT8_MAX (255) +# define UINT16_MAX (65535) +# define UINT32_MAX (4294967295U) +# define UINT64_MAX ((uint64_t)(18446744073709551615)) + #define bswap32(x) \ ({ \ uint32_t __x = (x); \ @@ -153,3 +169,5 @@ extern int __op_param1, __op_param2, __o #endif extern int __op_jmp0, __op_jmp1; + +#endif /* !defined (__DYNGEN_EXEC_H__) */ Index: dyngen.c =================================================================== RCS file: /cvsroot/qemu/qemu/dyngen.c,v retrieving revision 1.22 diff -u -d -w -B -b -d -p -r1.22 dyngen.c --- dyngen.c 15 Jun 2003 22:50:44 -0000 1.22 +++ dyngen.c 24 Jun 2003 19:19:24 -0000 @@ -25,6 +25,7 @@ #include #include +#define NO_STATIC_THUNK_FUNC #include "config.h" /* elf format definitions. We use these macros to test the CPU to @@ -456,8 +457,10 @@ void gen_code(const char *name, host_ulo { uint8_t *p; p = (void *)(p_end - 4); +#if 0 if (p == p_start) error("empty code for %s", name); +#endif if (get32((uint32_t *)p) != 0x4e800020) error("blr expected at the end of %s", name); copy_size = p - p_start; Index: exec.c =================================================================== RCS file: /cvsroot/qemu/qemu/exec.c,v retrieving revision 1.9 diff -u -d -w -B -b -d -p -r1.9 exec.c --- exec.c 24 Jun 2003 13:28:12 -0000 1.9 +++ exec.c 24 Jun 2003 19:19:25 -0000 @@ -26,7 +26,14 @@ #include #include +#include "config.h" +#if defined (TARGET_I386) #include "cpu-i386.h" +#elif defined (TARGET_ARM) +#include "cpu-arm.h" +#elif defined (TARGET_PPC) +#include "cpu-ppc.h" +#endif #include "exec.h" //#define DEBUG_TB_INVALIDATE Index: main.c =================================================================== RCS file: /cvsroot/qemu/qemu/main.c,v retrieving revision 1.32 diff -u -d -w -B -b -d -p -r1.32 main.c --- main.c 24 Jun 2003 13:30:31 -0000 1.32 +++ main.c 24 Jun 2003 19:19:25 -0000 @@ -26,7 +26,13 @@ #include "qemu.h" +#if defined (TARGET_I386) #include "cpu-i386.h" +#elif defined (TARGET_ARM) +#include "cpu-arm.h" +#elif defined (TARGET_PPC) +#include "cpu-ppc.h" +#endif #define DEBUG_LOGFILE "/tmp/qemu.log" Index: ppc-dis.c =================================================================== RCS file: /cvsroot/qemu/qemu/ppc-dis.c,v retrieving revision 1.1 diff -u -d -w -B -b -d -p -r1.1 ppc-dis.c --- ppc-dis.c 29 Apr 2003 20:38:27 -0000 1.1 +++ ppc-dis.c 24 Jun 2003 19:19:28 -0000 @@ -3074,7 +3074,8 @@ static int print_insn_powerpc(FILE *, un int print_insn_ppc (bfd_vma pc, disassemble_info *info) { - return print_insn_powerpc (info->stream, *(unsigned *)(long)pc, pc, + return print_insn_powerpc (info->stream, + (int)bfd_getb32((bfd_byte *)pc), pc, PPC_OPCODE_PPC | PPC_OPCODE_601); } Index: syscall.c =================================================================== RCS file: /cvsroot/qemu/qemu/syscall.c,v retrieving revision 1.34 diff -u -d -w -B -b -d -p -r1.34 syscall.c --- syscall.c 15 Jun 2003 19:56:46 -0000 1.34 +++ syscall.c 24 Jun 2003 19:19:31 -0000 @@ -2116,6 +2125,7 @@ long do_syscall(void *cpu_env, int num, } #endif break; +#ifdef TARGET_NR_getdents64 case TARGET_NR_getdents64: { struct dirent64 *dirp = (void *)arg2; @@ -2139,6 +2149,7 @@ long do_syscall(void *cpu_env, int num, } } break; +#endif case TARGET_NR__newselect: ret = do_select(arg1, (void *)arg2, (void *)arg3, (void *)arg4, (void *)arg5); @@ -2456,12 +2467,18 @@ long do_syscall(void *cpu_env, int num, case TARGET_NR_setfsgid32: ret = get_errno(setfsgid(arg1)); break; +#ifdef TARGET_NR_pivot_root case TARGET_NR_pivot_root: goto unimplemented; +#endif +#ifdef TARGET_NR_mincore case TARGET_NR_mincore: goto unimplemented; +#endif +#ifdef TARGET_NR_madvise case TARGET_NR_madvise: goto unimplemented; +#endif #if TARGET_LONG_BITS == 32 case TARGET_NR_fcntl64: { Index: thunk.h =================================================================== RCS file: /cvsroot/qemu/qemu/thunk.h,v retrieving revision 1.9 diff -u -d -w -B -b -d -p -r1.9 thunk.h --- thunk.h 15 Jun 2003 19:52:54 -0000 1.9 +++ thunk.h 24 Jun 2003 19:19:32 -0000 @@ -239,6 +239,7 @@ const argtype *thunk_convert(void *dst, extern StructEntry struct_entries[]; +#if !defined(NO_STATIC_THUNK_FUNC) static inline int thunk_type_size(const argtype *type_ptr, int is_host) { int type, size; @@ -311,6 +312,7 @@ static inline int thunk_type_align(const return -1; } } +#endif /* !defined(NO_STATIC_THUNK_FUNC) */ unsigned int target_to_host_bitmask(unsigned int x86_mask, bitmask_transtbl * trans_tbl);