Commit Graph

1302 Commits

Author SHA1 Message Date
gbeauche
159acc29b0 Cope with assembler updates. 2008-02-16 22:15:00 +00:00
gbeauche
50ed43d6f0 Use D suffix for 64-bit real, even though L is the actual GNU assembler suffix. 2008-02-16 22:14:41 +00:00
gbeauche
f6aecb472d Add FPU instructions. 2008-02-16 19:01:42 +00:00
gbeauche
736975460b Add MMX instructions 2008-02-12 14:42:09 +00:00
gbeauche
8083bc1bd3 - Fix tests for 32-bit code generation
- Simplify parse_imm() and factor out failure messages to show_instruction()
2008-02-12 09:55:36 +00:00
gbeauche
d03033c19f Fix decoding of 64-bit values on 32-bit hosts. Improve register decoding speed
by more than 2x, aka use a big switch/tree to lookup the register ID from string.
2008-02-12 00:45:24 +00:00
gbeauche
5adc268bcc Fix and add other SSE conversion instructions. 2008-02-11 19:05:17 +00:00
gbeauche
382b44ffaf Add more tests in mem,reg cases: scale factor 8, base-only (e.g. mov (%breg),%dreg). Don't test for %rip relative addressing yet, need to improve the parser first. 2008-02-11 17:17:56 +00:00
gbeauche
250366fd94 Use symbolic constants for Jcc and SETcc instructions. Don't emit extraneous REX bits for JMP and CALL instructions. 2008-02-11 16:50:40 +00:00
gbeauche
3ea69bfc5c - Fix CMPSD, COMISS, COMISD, UCOMISS, UCOMISD, MOVD/MOVQ %xmm,%reg
- Rename X86_SSE_CC_NE to X86_SSE_CC_NEQ (match Intel reference manual)
- Rename MOVDLX to MOVDXD (%Xmm register as Destination)
- Rename MOVDQX to MOVQXD (%Xmm register as Destination)
- Rename MOVDXL to MOVDXS (%Xmm register as Source)
- Rename MOVDXQ to MOVQXS (%Xmm register as Source)
2008-02-11 16:13:47 +00:00
gbeauche
f8e11d9aba Enable/disable some tests at compile time. Show status while verifying hundred thousands variants. 2008-02-11 13:21:15 +00:00
gbeauche
1ad1f0a795 Fix for newer binutils (2.17). Skip extraneous REX prefix (FIXME?) in disassembly,
fix decoding for pushq/popq.
2008-02-11 10:14:16 +00:00
nigel
5f0e7847d5 Remove a few 'warning: NULL used in arithmetic' 2008-02-04 01:02:58 +00:00
nigel
2b4e8b9cbb Add a dummy Screen_fault_handler so this builds again,
whitespace changes, set a working directory other than /,
allow the file ROM to be opened from the bundle.
2008-02-04 01:00:53 +00:00
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
gbeauche
b05833a86b Fix JIT for 68020/68030 emulation mode. 2007-06-15 08:09:01 +00:00
gbeauche
3f535d30da Add support for comma-separated elements in "jitblacklist" item. 2007-06-15 07:55:03 +00:00
gbeauche
0a7fe2eaf8 Workaround video mode switch problems. IOW, make sure to always allocate
the frame buffer at the same base address.
2007-06-14 14:45:54 +00:00
gbeauche
b1900fbd06 Handle "idlewait" option. 2007-06-13 16:11:31 +00:00
gbeauche
31a754b2e6 Raise INTFLAG_1HZ in RTCInterrupt() 2007-06-13 16:10:05 +00:00
gbeauche
f20c1ca30b Remove dead code, B2 doesn't use valid_address() 2007-06-13 15:57:46 +00:00
gbeauche
03833e4c56 Fix autogen.sh to automatically include the local m4 directory, used as a
fallback if system-wide defs are not found.
2007-06-13 13:27:40 +00:00
gbeauche
4ec66db185 Add MIPS files from cxmon. 2007-06-07 11:52:14 +00:00
gbeauche
974f086a8c Arrangements for Linux/mips. 2007-06-05 13:15:57 +00:00
asvitkine
5bbda1a589 byteswap styled text (clipboard) on little endian host OS X 2007-02-18 21:11:41 +00:00
asvitkine
e2cde00af4 fix compile warning & potential buffer overflow at the same time 2007-01-24 05:42:23 +00:00
asvitkine
f12f5173be macroman_to_host_encoding - so it works the other way around too 2007-01-24 02:37:06 +00:00
asvitkine
ab86a395da Since Guest and Host OS may use different text encodings for filenames,
I am adding functionality to support this. For the moment, I've only
added the platform-specific conversion for MacOSX (ie: UTF8 -> MacRoman),
but others can be added later.
2007-01-22 17:14:06 +00:00
asvitkine
efa4fee4ac cleanup: use get_device_path() since we already have it, instead of doing
the same thing manually with duplicated code
2007-01-22 14:58:33 +00:00
asvitkine
dc68e99f7c fix compile warnings w/ slirp caused by not including stdlib 2007-01-22 14:48:40 +00:00
asvitkine
48907db336 Ok, now this works properly (Fix resolution switching without affecting audio). 2007-01-22 00:36:32 +00:00
asvitkine
268af8086b back out my previous change, it breaks audio 2007-01-22 00:32:25 +00:00
asvitkine
473a3f2e22 Fix for resolution switching corruption under SDL (Mac OS X). 2007-01-21 19:33:13 +00:00
asvitkine
a3c2413f3b ignore disks on which you can't get size 2007-01-21 18:06:39 +00:00
asvitkine
16bb0823b8 some documentation of status codes not yet implemented 2007-01-21 17:40:00 +00:00
asvitkine
28d7af3820 newline in error msgs 2007-01-21 17:27:15 +00:00
asvitkine
e9fbc36368 fix compile warnings on OS X 2007-01-21 17:10:49 +00:00
asvitkine
10b342e064 Byteswapping fixes for Mac OS X x86 2007-01-21 17:04:47 +00:00
gbeauche
3c100abdb2 Fix CMOV emulation on x86_64 in case the CPU doesn't support that instruction
(which is very unlikely).
2007-01-14 13:23:36 +00:00
gbeauche
8d2f2a335b The older code generator is now deprecated on x86-32 too. 2007-01-14 13:07:22 +00:00
gbeauche
1f2e561a6f Use SAHF_SETO_PROFITABLE wherever possible on x86-64, it's faster. This can't
be the default because some very ancient CPUs don't support LAHF in long mode
2007-01-14 12:23:29 +00:00
gbeauche
2e95c43bf2 Remove the 33-bit addressing hack as it's overly complex for not much gain.
Rather, use an address override prefix (0x67) though Intel Core optimization
reference guide says to avoid LCP prefixes. In practise, impact on performance
is measurably marginal on e.g. Speedometer tests.
2007-01-13 18:21:30 +00:00
gbeauche
9e252b413e Fix 64-bit builds in REAL_ADDRESSING mode with gcc4.1. 2007-01-13 17:21:08 +00:00
nigel
a8e7114df2 Do'h. Checked in and shipped a DEBUG=1. Thanks to Steve Green for his fast eyes. 2006-08-01 03:31:46 +00:00
nigel
9a3097705d Clarify CD insertion state, add widescreen suggestion 2006-07-31 11:10:59 +00:00
nigel
1b25d07fd6 Final doco changes before a new release 2006-07-31 10:51:24 +00:00
nigel
acb3384366 Sound done, VOSF pointless, Cut/paste half working, CD insert 2006-07-31 10:10:48 +00:00
nigel
9e9e20325e Use Gwenole's clip_macosx.cpp instead of the dummy version 2006-07-31 08:52:33 +00:00
nigel
ecf2403c46 ether_unix.cpp somehow pulls something in that needs mem_banks.
If it isn't compiled in this directory, the wrong config.h is used.
2006-07-31 08:47:52 +00:00
nigel
1dad46a8ad Project file updates for the new audio source files. 2006-07-29 02:24:15 +00:00
nigel
c68e5d916d Working audio output by Daniel Sumorok.
Not quite the way I wanted to do it but it will do for now.
(on a real Mac, the real audio hardware should be able to pull/grab the data
 from our buffers - an extra thread with its own set of buffers is wasteful!)
2006-07-28 13:42:29 +00:00