Commit Graph

214 Commits

Author SHA1 Message Date
gbeauche
ec8661f431 Fix a damn silly bug. On some occasions, we could have spcflags() set to
EXEC_RETURN | HANDLE_INTERRUPT. And then, we handled the interrupt, but
EXEC_RETURN was set so we returned very quickly without completing the
interrupt routine. As a side effect, this occasionnaly hung the emulator
most likely with {ethernet,audio}-based applications that trigger a lot
of interrupts.

The fix is to always honour EXEC_RETURN flag at first, of course.
2005-06-30 15:29:11 +00:00
gbeauche
08c5f8b713 Improve idle wait mechanism. Now, the emulator thread can be suspended
(idle_wait) until events arrived and notified through TriggerInterrupt().
i.e. we no longer sleep a fixed amount of time on platforms that support
a thread wait/signal mechanism.
2005-06-30 10:17:58 +00:00
gbeauche
c9b044aeaf Completely avoid any form of nested interrupt processing. 2005-06-30 09:09:59 +00:00
gbeauche
55f5e3a41b Fix CR save/restore in EmulOp thunk. I don't know what it fixes for real
but that was definitely wrong to only preserve CR2 there.
2005-06-30 07:34:17 +00:00
gbeauche
b9b90fce11 fix last commit 2005-06-23 11:56:43 +00:00
gbeauche
2deca51ca4 Add code to gather some stats on register usage. 2005-06-23 11:37:01 +00:00
gbeauche
c41f403f56 Rework sheepshaver_cpu object allocation and get rid of POSIX'ish functions. 2005-06-22 16:38:15 +00:00
gbeauche
c4a7b10650 op_invoke*() symbols are expected to be in demangled form, i.e. "C" linkage 2005-06-22 16:35:59 +00:00
gbeauche
ae52321fe7 HOST_FLOAT_WORDS_BIG_ENDIAN is a tristate and, when defined, can still be
0, so little endian format. i.e. don't check that with a simple #ifdef...
2005-06-22 15:33:22 +00:00
gbeauche
32b5b4f0bd Integrate C++ demangler from libiberty so that to handle G++ 2.9X generated
symbols.
2005-06-22 15:30:54 +00:00
gbeauche
f226f793dd Extend internal math library from GNU libc to accomodate older systems
with glibc 2.2.X or simply no C99 capable C library. Fix vrfiz instruction
to really truncate on float values.
2005-06-22 12:32:32 +00:00
gbeauche
28a167b3bd Avoid <limits> to determine vector register numeric_limits<>. This fixes
build with ancient compilers like gcc "2.96".
2005-06-22 12:27:01 +00:00
gbeauche
3aa78832fc pointer-to-member-functions fixlets, NULL may be (void *)0 on ancient
compilers which is not suitable here.
2005-06-22 12:25:43 +00:00
gbeauche
46f9e6d2ea Support JIT on Mach/ppc platforms. Mach/i386 (Darwin/x86) is to follow. 2005-06-14 06:32:52 +00:00
gbeauche
1853c38130 fix inline asm for gcc4 2005-04-24 17:22:49 +00:00
gbeauche
8db2a3ef62 implement lvsl/lvsr instructions 2005-04-15 17:03:49 +00:00
gbeauche
35a29f57df rearrange for win32 cross-compilation 2005-03-24 23:38:10 +00:00
gbeauche
0db0d48bf0 Avoid the use of floating-point when loading/storing from/to memory. This
could have caused some rounding thus alterations to integer registers on
context switches when lfd/stfd instructions were used. e.g. cygwin compilers
defaulted to i686 code generation and exhibed this behaviour, you could also
see this behavior with -march=i586 -mtune=pentiumpro. GCC is perfectly right
to do those optimizations.
2005-03-20 23:07:11 +00:00
gbeauche
8071d90849 workaround weird bug lying somewhere in cygwin generated micro-ops for
FP load/store of doubles
2005-03-19 07:18:18 +00:00
gbeauche
068e2075fc fix for native compilation under windows 2005-03-17 23:45:28 +00:00
gbeauche
536c81f641 fix when cross-compiling or using cygwin 2005-03-17 23:44:48 +00:00
gbeauche
287296b363 it makes more sense to dump the crash dump header to stderr 2005-03-17 23:40:01 +00:00
gbeauche
cbf0c3debf shorten vsldoi native code by one instruction, aka. avoid superfluous
shuffle of stale vector value
2005-03-14 00:30:44 +00:00
gbeauche
4918fe8d2d default to 8 MB cache size on non-{alpha,powerpc} platforms 2005-03-13 23:41:42 +00:00
gbeauche
05a7453d54 MMX/SSE/SSE2 optimizations are now converted to full inline assembly code,
aka avoid use of (possibly broken) GCC intrinsics. Add some SSE2 optimizations.
Translate VSLDOI, MFVSCR, MTVSCR instructions. AltiVec Fractal Carbon now
shows more than 1 GFlops performance!
2005-03-13 12:49:30 +00:00
gbeauche
7cc49ca739 fix vsldoi implementation and testsuite 2005-03-13 11:38:35 +00:00
gbeauche
4d96076c62 fix SheepShaver wrappers in PowerPC CPU tester 2005-03-13 11:23:52 +00:00
gbeauche
48213aa5eb Revert to no nested native ppc interrupt processing, also filter out cases
where InterruptFlags is 0.
2005-03-05 18:33:30 +00:00
gbeauche
9019e71cfc Preserve all necessary registers on interrupt, thus also permitting nested
interrupts to occur. SheepShaver locks should now be reduced.
2005-03-05 15:25:10 +00:00
gbeauche
7df6429591 Support NetBSD 2.0 for x86:
- implement trunc() function, isless() and isgreater() macros
- execute genexec.pl through a real perl executable
- disable generation of debug info from dyngen u-ops
2005-02-13 15:32:11 +00:00
gbeauche
df0d5d2a41 Happy New Year 2005! 2005-01-30 21:48:22 +00:00
gbeauche
126e549397 add FP regs & state to preserved context on interrupt 2005-01-30 21:12:07 +00:00
gbeauche
4316979264 fix NULL pmf initialization 2005-01-22 23:24:28 +00:00
gbeauche
f5a9e6e110 add facility to debug basic blocks extracted from *-ops.o 2004-12-21 23:20:31 +00:00
gbeauche
8677229f60 exp2f/log2f implementations if not existing 2004-12-18 23:45:33 +00:00
gbeauche
0802f4d93d fix build on macosx, it's a native ppc arch too 2004-12-18 23:27:15 +00:00
gbeauche
a8a235345c implement mcrxr instruction 2004-12-18 22:13:47 +00:00
gbeauche
f9937854be ethernet seems to work with sheepnet, even on kernel 2.6/x86_64! 2004-12-18 18:40:04 +00:00
gbeauche
9e96bd8241 fix cntlzw masks, fix build with cygwin/gcc 2004-11-26 00:13:05 +00:00
gbeauche
6287978c19 enable build of the cpu tester from the SheepShaver tree 2004-11-25 19:14:15 +00:00
gbeauche
6d68826725 cope with cygwin assembler'isms 2004-11-25 00:29:36 +00:00
gbeauche
3caa663fc8 try to cope with cygwin assembler 2004-11-25 00:25:53 +00:00
gbeauche
a6109dbec5 fix i386 offsets for direct patching. Fix Cygwin support. 2004-11-25 00:24:07 +00:00
gbeauche
53dfcecb54 16-byte aligned memory allocator only for sheepshaver_cpu 2004-11-25 00:21:09 +00:00
gbeauche
73a3269ea5 Merge in Win32 (COFF) executable support from QEMU. Also add Mach parser
but it's unlikely to work, simply keep it in sync.
2004-11-24 23:07:55 +00:00
gbeauche
f6d5e64088 cosmetics (only include <stddef.h> for size_t definition) 2004-11-24 22:49:15 +00:00
gbeauche
061b9512f3 fix coff symbol table decoding 2004-11-24 22:48:38 +00:00
gbeauche
7114f0d4cd a.out definitions for the cygwin coff object analyzer 2004-11-23 23:18:54 +00:00
gbeauche
26a128bf6a use new ieeefp.hpp wrapping over <fenv.h> 2004-11-22 22:55:50 +00:00
gbeauche
ddcd7a8df8 Implement some <fenv.h> functions on systems that don't support them
yet. This includes Cygwin/x86. The code is derived from the GNU C Library.
2004-11-22 22:54:53 +00:00