Commit Graph

1163 Commits

Author SHA1 Message Date
gbeauche
3f15f4ed26 64-bit Mach exceptions support. Note that mach_exc_server() et al. must be
explicitly generated from mig. The advantage of that is to provide a "fast"
path for x86_64 on Leopard too (fault address in code[1]).

By "fast", this means +33% faster wrt. explicitly thread_get_state() but
still pretty slow (40 usec/fault). This is on par with the i386 code path though.
2008-01-20 22:24:53 +00:00
gbeauche
68668bb4e2 Add support for Windows/ia64. 2008-01-20 17:09:34 +00:00
gbeauche
62697e13c1 Err, restore a reasonnable value for the emulators. ;-) 2008-01-20 11:52:13 +00:00
gbeauche
a4209f5db0 Arrangements for the SIGSEGV perf tester. 2008-01-20 11:51:08 +00:00
gbeauche
2bdb300da1 HPPA support. 2008-01-20 00:39:51 +00:00
gbeauche
acd35671b8 HP-UX does support 32-bit memory mappings. 2008-01-20 00:38:52 +00:00
gbeauche
88ea04a365 Add support for HP-UX/ia64. It would be best to use libunwind so that to
handle stacked registers access with ease...
2008-01-19 22:27:29 +00:00
gbeauche
3615be1d4d Use fixed-size integer types, especially for 64-bit quantities. HP-UX for IPF
is essentially an ILP32 platform but machine registers are 64-bit wide. Make
IA64_SET_GR() set the NaT bit at the same time as the register value.
2008-01-19 22:25:27 +00:00
gbeauche
b5ac45434a Fix build on 64-bit Vista. 2008-01-17 23:19:01 +00:00
gbeauche
69376f61ca Wrap the Windows write-watch API. 2008-01-16 22:36:35 +00:00
gbeauche
ef39e46cb2 Fix build on MacOS X Leopard.
Leopard kernel faster? This is pure marketing hype. For 32-bit applications,
Mach exception recovery is 60% slower. For 64-bit applications, this is up
to 40% faster though. In any case, MacOS X remains pretty slow wrt. Linux...
2008-01-14 19:29:29 +00:00
gbeauche
df3475ed16 64-bit Windows support 2008-01-12 23:01:40 +00:00
gbeauche
f5e5da6916 LLP64 fixes (64-bit Windows) 2008-01-12 21:43:02 +00:00
gbeauche
b1fa25128a Make it possible to override the Mach fault recovery scheme through an
environment variable: SIGSEGV_MACH_FAULT. It can be set to "direct" to
assume the fault address comes from code[1] argument, or "slow" to use
the slow path through thread_get_status(EXCEPTION_STATE)->faultvaddr.
2008-01-07 22:44:39 +00:00
gbeauche
58ff9aba45 The Linux kernel actually allows to restart execution from the specified slot
in the bundle. This is faster and more accurate as this avoids emulation.

Also clean-up code so that to prepare the use of lib uaccess on hpux/ia64.
XXX: this will need explicit use of uint64_t to define registers because
HP/UX is ILP32 capable and all registers are 64-bit capable so "unsigned long"
won't fit.
2008-01-06 17:22:19 +00:00
gbeauche
8aadf8e455 Further comment the ia64 decoder and (minimal) emulator. 2008-01-06 16:36:00 +00:00
gbeauche
57ae6ed470 Add initial support for instruction skipping on Linux/ia64. It was more
complex than expected but it was fun to play with. Who designed this ISA?
I'd love to see how the decoder is implemented in HW, by all means it is
not "simplified" unless I missed some pattern...
2008-01-06 16:25:03 +00:00
gbeauche
a56e4b9be0 Hack around over-optimized labels-as-values extension from GCC. 2008-01-06 16:19:27 +00:00
gbeauche
e08bb16edf ISO C++ conformance fixes: remove superfluous coma at the end of enum definitions. 2008-01-06 16:10:30 +00:00
nigel
85dfeb1522 Corrent HTML for the accent on Gwenolé's name 2008-01-06 05:14:50 +00:00
gbeauche
a93bec88fd Don't clobber "sip" arg from our sigsegv_info wrapper (renamed to SIP). 2008-01-05 08:35:08 +00:00
nigel
6069d6814c Replace mention to 1_prepare_files.sh script with discrete commands 2008-01-02 23:19:54 +00:00
gbeauche
c578952735 Add macros for SSSE3 instructions encoding (PSHUFB in particular). 2008-01-01 21:48:41 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
26f9b1d38b Fix instruction skipping on MacOS X in the fast path case. 2007-12-31 18:07:01 +00:00
gbeauche
b5ac365858 Add support for 64-bit MacOS X for PowerPC (untested beyond "it compiles"). 2007-12-31 06:59:39 +00:00
gbeauche
9fa1bbd972 According to kernel sources, that is XNU 344.49 (10.2.8), XNU 517.12.7 (10.3.9),
XNU 792.21.3 (10.4.10) and XNU 1228 (10.5.0), exception handler code[1] always
contains the fault address nowadays. So make it the default fast path but keep
provisions to check that at run-time first.

This yields a nearly 4x improvement in SIGSEGV recovery but MacOS X is still
suboptimal wrt. Linux, so VOSF is still not possible with frameskip == 0.

XXX: the ppc kernel had bugs that caused DAR (put into code[1]) to be incorrectly
decoded. This would need a broader test audience or more careful audit of the
sources changes.
2007-12-30 12:11:17 +00:00
gbeauche
7e7827a886 More overrides for MacOS X. 2007-12-30 09:15:32 +00:00
gbeauche
016dfddd79 Sync with the new SIGSEGV API. 2007-12-30 08:47:34 +00:00
gbeauche
902079ec8e Improve API for systems that require explicit calls to functions to retrieve
the memory addresses that triggered a SIGSEGV (e.g. MacOS X).
2007-12-30 08:45:18 +00:00
gbeauche
25c5b9599e Update to slirp sources from QEMU 0.9.0:
- fix UDP (Jason Wessel)
- enable TCP_NODELAY for slirp redirection (Daniel Jacobowitz)
2007-11-03 16:36:35 +00:00
gbeauche
b899d55068 Don't raise SIGPIPE, let errno be set to EPIPE. i.e. this fixes slirp ethernet
mode with no listening port on the remote host.
2007-11-03 11:31:36 +00:00
gbeauche
d7eb0f4d6d Update to slirp sources from QEMU 0.8.2:
- set slirp client hostname
- fix slirp redirection on systems without a useful host IP address
- separate alias_addr (10.0.2.2) from our_addr (Ed Swierk)
- fix 32+ KB packets handling (Ed Swierk)
- fix UDP broadcast translation error
- solaris port (Ben Taylor)
2007-11-03 11:11:42 +00:00
gbeauche
c3a75ac75a Add VERSION file so that to track differences from "upstream" slirp sources, i.e. QEMU. 2007-11-03 10:01:27 +00:00
gbeauche
d83c11faa2 Host OS name representation must be large enough to handle any kind of native
encoding (e.g. UTF-8 on MacOS X).
2007-11-03 09:59:39 +00:00
gbeauche
9000d4f54c Rewrite ExtFS support for MacOS X. This implementation uses xattrs (metadata)
on Tiger+ to store FInfo and FXInfo. Otherwise, plain old .finfo/ helpers are
used. "Safe" flags and fields are always synchronized to/from MacOS X.

BTW, CFString leak was fixed at the same time.
2007-11-01 15:33:22 +00:00
asvitkine
a70c79b3cb support for prefs stuff 2007-07-28 15:45:12 +00:00
gbeauche
a5778cd5cb Fix xBCD instruction for 68040 emulation: the NV flags shall not be affected. 2007-06-30 08:00:31 +00:00
gbeauche
35bf8b2c25 Use NSIMAGE graphics mode for MacOS X on Intel platforms for now. Otherwise
it's crashing in some Apple code.
2007-06-30 07:33:30 +00:00
gbeauche
7f2dfe7f4f Fix LSL & LSR instructions so that they preserve the X flags when the
shift count is 0. Likewise for ASR + another improvement to avoid shifting
by halves (propagated bit is reset to original's when necessary).
2007-06-29 16:53:04 +00:00
gbeauche
9c13d5cda9 Implement CMOV.B and CMOV.W translations. Only the latter has a native
x86 equivalent however.
2007-06-29 16:36:03 +00:00
gbeauche
b3f62598b7 More human readable instruction names (from e-uae). 2007-06-29 16:32:05 +00:00
gbeauche
e3f9d46556 Improve heuristic for VOSF profitability: we should not spend more than
the half of a video interrupt quantum for updating the screen. Also improve
the wording of the result.
2007-06-16 07:24:39 +00:00
gbeauche
320b4ccd61 Add Darwin/x86_64 support. Fix EDX register index for i386 insn decoder. 2007-06-16 06:21:57 +00:00
gbeauche
e9c5625ada Fix REAL_ADDRESSING mode on MacOS X, aka move Mach defines to config_macosx.h
and fix lowmem (BLESS) to handle other-endian binaries.
2007-06-15 22:54:24 +00:00
gbeauche
41df47a596 Disable cxmon by default for MacOS X builds. Add hackery to cross-compile
a working 10.2/ppc binary.
2007-06-15 21:46:25 +00:00
gbeauche
92ff210e4f Enable universal builds with --enable-universal
Move arch-dependent definitions to config_macosx.h, i.e. make them compile
time instead of configure time. Support IEEE FPU emulation core only.
2007-06-15 17:11:46 +00:00
gbeauche
7015458281 Fix cxmon files inclusion. Drop support for non ppc & x86 MacOS X arches.
Make JIT files & defs selection at build-time, not configure-time (FATs).

NOTE: be careful, larger changes are yet to come.
2007-06-15 10:11:28 +00:00
gbeauche
e2e8558ff1 Build MacOS X binaries only from the command line. Prepare the configure
scripts as follows: [NO_CONFIGURE=1] ../Unix/autogen.sh

Second round will be to build FAT binaries.
2007-06-15 09:16:58 +00:00
gbeauche
9617ca3033 Fix MOVEC for 68020/68030 emulation (MSP & ISP are supported control regs). 2007-06-15 08:10:48 +00:00