Commit Graph

256 Commits

Author SHA1 Message Date
gbeauche
5678c1d37d Detect SSE3 & SSE4. 2006-04-01 22:14:33 +00:00
gbeauche
b288f6278e Helper macros to annotate likely branch directions. Colateral effect: this
also fixes build with GCC 4.1 (ppc-dyngen-ops.cpp) since the branches are
re-ordered in a way there is now only one exit-point in op_jump_next_A0().
2006-04-01 21:41:19 +00:00
gbeauche
d475faf4ba Copy constants to 32-bit addressable data pool. This fixes -pie builds on
x86_64: program resides above 32-bit barrier and JIT generated code wants
(knowingly) to access globals directly.
2006-01-28 22:03:31 +00:00
gbeauche
d9b4b31490 Merge from KPX: new exit() handling code 2006-01-28 22:00:10 +00:00
gbeauche
e0589a097e fix new/delete mismatch in slow_allocator, also use that for lazy_allocator 2006-01-28 21:59:41 +00:00
gbeauche
022d09375f Merge from KPX: new exit() handling code; make "syscall" illegal for MacOS
emulation (SheepShaver)
2006-01-28 21:57:52 +00:00
gbeauche
f8c3b2c6bb no-stack-frame optimization for linux/i386 too since it now works there too 2006-01-22 20:07:47 +00:00
gbeauche
f32e053178 Apply the no-stack-frame optimization in op_invoke_*() to MacOS X for Intel
templates. This avoids mis-aligninment of the stack, and useless reservation
of space on it for function args. Indeed, we now pre-allocate 16 stack-slots
in op_execute() for this purpose.
2006-01-22 00:12:39 +00:00
gbeauche
1f195045a1 __DATA,__data section may be empty (MacOS X 10.4.4 for Intel) 2006-01-22 00:07:22 +00:00
gbeauche
46ee842be3 don't trigger interrupt through deleted cpu object (XXX may need locks) 2006-01-21 17:18:53 +00:00
gbeauche
a9468a9644 fix encoding of lis r0,0x9e00 2006-01-19 22:24:09 +00:00
gbeauche
d85590c972 adapt for older MIPSpro preprocessor 2006-01-18 23:50:16 +00:00
gbeauche
357467c97b <cpu/jit/dyngen-exec.h> is necessary because it contains the definitions of
DYNGEN_FAST_DISPATCH for the direct_chaining_possible() test... [otherwise,
it was a performance regression]
2006-01-18 23:45:31 +00:00
gbeauche
73c6d2d2c0 apply the no-stack-frame optimization in op_invoke_*() to MacOS X hosts too 2006-01-18 23:06:48 +00:00
gbeauche
1313fe589b fix for MacOS X/ppc (simply for completeness, the CPU emulator is not used
natively by default)
2006-01-18 23:00:59 +00:00
gbeauche
2e7f194ff2 add generic roundf() from glibc (for IRIX/mips with older libm) 2006-01-17 23:09:18 +00:00
gbeauche
0a9a210c30 Disable direct block chaining if DYNGEN_FAST_DISPATCH is not defined. Note
this is a workaround prior to enabling it on mips and the future JIT.
2005-12-12 21:44:50 +00:00
gbeauche
6416914c15 fix overflows for lve[bhw]x input values and vector values on 64-bit hosts 2005-12-11 20:57:45 +00:00
gbeauche
4866e89c3a factor out and fix mips case for external function invocation as t9 shall
be set so that gp can be recomputed in the called function
2005-12-11 17:25:42 +00:00
gbeauche
92f7738f80 - Add possibility to skip a test category (ALU, FPU, VMX). This will only
generate target code without executing it, and not comparing results
- Fix aligned_vector_t, we can't rely on THIS pointer to be 16-byte aligned
- Also fix dummy_vector alignment
2005-12-11 17:21:07 +00:00
gbeauche
37ee682c0f fix for mipspro compilers 2005-12-11 17:15:12 +00:00
gbeauche
63d4506a4d add "fast" pointers to non-virtual member functions for MIPSpro compilers 2005-12-11 17:12:59 +00:00
gbeauche
dd2b9a95d5 Align PowerPC registers struct manually, i.e. don't depend on non-portable
compiler extensions (e.g. GCC __attribute__((aligned(N)))).
2005-12-06 22:25:13 +00:00
gbeauche
d8aa8a7459 Port JIT to IRIX/mips (initial code from QEMU) 2005-12-05 22:24:13 +00:00
gbeauche
1670c6e84d ahem, forget this extra difference between multiarch & jit dispatcher 2005-12-05 22:10:46 +00:00
gbeauche
ecc90b0916 Better mechanism to dispatch arch-dependent JIT headers as we can't use
raw arch names (e.g. mips expands to 1, thus not finding the header)
2005-12-05 20:37:46 +00:00
gbeauche
45cb124844 We really need a way to specify a member alignment for AltiVec emulation
testing. Extra fixlets for IRIX/mips and other CPU emulator in non-JIT mode
2005-12-04 17:45:41 +00:00
gbeauche
8c12552fda GCC fixes for IRIX/mips (unsupported __generic intrinsic and probably not
using the fixincludes-patched internal/math_core.h file)
2005-12-04 17:44:21 +00:00
gbeauche
f75d445700 Some compilers don't permit the use of C99 extensions from C++. This is the
case for MIPSPro (IRIX) for fegetround(), isinf() et al., though they are
available in the math library.
2005-12-04 16:10:01 +00:00
gbeauche
28ed73f212 Fix build in pure interpreter mode (IRIX/mips) 2005-12-04 16:07:52 +00:00
gbeauche
b17b4d7584 dos2unix 2005-12-04 15:53:55 +00:00
gbeauche
90670c2652 warning fixes, aka don't redefine log2() et al. if already defined (Win32) 2005-11-27 20:20:25 +00:00
gbeauche
c1c4345594 fix regression introduced from JIT/Mach support 2005-11-27 20:14:22 +00:00
gbeauche
d27fdd7afb cleanupsCVS: ---------------------------------------------------------------------- 2005-11-27 20:02:06 +00:00
gbeauche
a0c918ae5d ahem, fix typo :) 2005-07-25 20:03:07 +00:00
gbeauche
74e4b16079 fix for gcc < 3.3.6 on x86 2005-07-25 19:45:26 +00:00
gbeauche
2b72c5e047 Fix for broken MacOS X headers (at least in 10.2) when compiling with the
CPU emulator.
2005-07-14 18:09:30 +00:00
gbeauche
d8dc5827d3 Initial JIT support for Darwin/x86. Seems there is still a problem though. 2005-07-11 07:06:31 +00:00
gbeauche
d08df6e659 Darwin/x86 fixes 2005-07-11 06:52:51 +00:00
gbeauche
6eacaf2e82 Fix asm clobbers for newer gcc 4.0.1, don't use -msse to enable xmm clobbers
(likewise for -mmmx vs. mmx registers). Instead, since GCC won't generate
MMX/SSE code without explicit intrinsics use of vectorization, we know
those register won't be clobbered outside of the __asm__ code. So, it's safe
as is (we could also remove all sse/mmx clobbers).
2005-07-09 21:53:26 +00:00
gbeauche
97726bd1e7 Minor tweaks to support compilation of ether.cpp within MacOS. i.e. mostly
migrate the Ethernet driver to the MacOS side. This is enabled for
DIRECT_ADDRESSING cases. I didn't want to alter much of ether.cpp (as it
would have required to support that mode). Of course, in REAL_ADDRESSING
mode (the default) and for debugging purposes, the old driver is still
available.
2005-07-03 22:02:01 +00:00
gbeauche
9c16ab1514 Remove obsolete and broken Cygwin/X11 hacks. Forbid builds of the Windows
version from within the Unix/ directory.
2005-07-03 13:39:06 +00:00
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