Commit Graph

661 Commits

Author SHA1 Message Date
gbeauche
5d7ef13a9c Fix gen_op_invoke*() for 64-bit offsets on x86-64. Drop CPUPARAM since it's
now cached to a host register.
2006-07-09 15:19:32 +00:00
gbeauche
a5296875f1 Optimize alignment routine for x86 & x86_64. 2006-07-09 15:18:08 +00:00
gbeauche
d75a91497d Fix debugging of generated code to include the block chainer trampoline. 2006-07-09 15:17:15 +00:00
gbeauche
7d5898f97a Some minor optimizations: xchg (unused), movdqa in sse2 code. 2006-07-09 12:19:50 +00:00
gbeauche
abc911eaa7 Remove use of global register A0 (now aliased to T0). This makes it possible
to cache the CPU context pointer to a register and thus rendering generated
code CPU context independent. Not useful to SheepShaver, but it is for
another project for threads emulation on plain x86-32.

Note: AltiVec performance may drop a little on x86 but this will be restored
(and even improved) in the future.
2006-07-09 12:15:48 +00:00
gbeauche
d0a64733ef Use -fno-align-functions to really disable function alignment (a value of 0
used the default alignment, e.g. 16 bytes on x86_64). This is purely cosmetics
and only helps reading the resulting disassembly.
2006-07-06 00:07:47 +00:00
gbeauche
d5bd143e40 Remove obsolete vminfp & vmaxfp (too long sequences) 2006-07-06 00:04:33 +00:00
gbeauche
c677dff47a Add more micro asm optimisations to x86{,-64} (mulhw, mulhwu, slw, srw, cntlzw
and subf* series). Also now enable the optimzations on x86_64 by default.
2006-07-06 00:01:04 +00:00
gbeauche
e39e80b44b cosmetics 2006-07-04 23:27:06 +00:00
gbeauche
0123552ddc Use extra precision (e.g. long double) for fma operations though this
inhibits some underflow conditions.
2006-07-04 23:23:42 +00:00
gbeauche
98dea63921 Fix fmadd et al. to set FPSCR[VXISI] only if any of the multiply operands
is an inifinity (2.1.5 -- don't set based on the intermediate result)
2006-07-04 23:20:46 +00:00
gbeauche
e020d63591 Fix frsp FPSCR[OX] condition 2006-07-04 23:17:37 +00:00
gbeauche
78952866b4 Fix mtfsb0 & mtfsb1 (VEX's xlc_dbl_u32 + code review) 2006-07-04 10:41:48 +00:00
gbeauche
c022ff87e6 remove dead code (fdivs was never used) 2006-07-04 08:58:40 +00:00
gbeauche
9f6edc436b Fix mismerge from kpx branch 2006-07-04 08:54:53 +00:00
gbeauche
7efab4276f Improve FPU emulation accurracy. However, PPC_ENABLE_FPU_EXCEPTIONS is still
set to 0 until generated code is optimized enough (current slow down factor
is 3x vs. previous core, expectations are about 50% slower FP code).

The main benefit is exception bits are accurate. All glibc test-fenv,
test-arith{,f}, test-double, test-float pass on ppc, and mostly on x86_64
with gcc 4.0.1. Yes, this is also compiler dependent.

FIXME: find a real Mac application that depends on precise FPSCR bits... I
think I don't want to care optimizing yet until someone shows me a real world
application.
2006-07-04 07:19:18 +00:00
gbeauche
0a74d0559a Fix fnmadds & fnmsubs emulation + try to provide optimized fma routines for
better precision
2006-07-04 07:06:18 +00:00
gbeauche
dc88ee271d Use lrint() for fctiw on x86-64. This is because some glibc use AMD optimized
math library where floor(), ceil() et al. don't set the inexact flag correctly
2006-07-04 06:59:28 +00:00
gbeauche
dc3df920c5 Fix fctiw emulation (VEX's jm-ppc-test -f, handle current rounding mode) 2006-07-04 06:58:24 +00:00
gbeauche
de5389bc0e Fix vminfp & vmaxfp emulation (VEX's jm-ppc-test -a, triggered nan bugs) 2006-07-04 04:47:04 +00:00
gbeauche
39ee6ba1aa Fix vctsxs & vctuxs emulation (VEX's jm-ppc-test -a, triggered inf/nan bugs) 2006-07-04 04:37:15 +00:00
gbeauche
0a2f9d3f03 Add fsel instruction emulation (VEX's jm-ppc-test -f) 2006-07-04 04:25:02 +00:00
gbeauche
635ee55a5d Fix floating-point single precision load/store (VEX's jm-ppc-test -f) 2006-07-04 04:21:02 +00:00
gbeauche
d9eb35f026 updates 2006-05-14 20:46:19 +00:00
gbeauche
e339993b22 Updates. It's high time for a new snapshot. 2006-05-14 17:14:09 +00:00
gbeauche
c512377a12 Add 1GB item to GUI 2006-05-14 16:14:29 +00:00
gbeauche
bd6ec66354 Add missing "etherguid" prefs item for Basilisk II Ethernet support (b2ether). 2006-05-14 16:13:16 +00:00
gbeauche
3f3891ab31 Move up NATMEM_OFFSET to 0x11000000. This is arbitrarily determined to be
the base of the largest free block. Turns out SDL libraries are loaded around
0x10000000 so we have some luck here.
2006-05-14 15:58:11 +00:00
gbeauche
8a27c90e15 Temporary workaround for Windows (shndx_text is not unique...) 2006-05-14 14:12:57 +00:00
gbeauche
d26f8ad8e2 Fix for DIRECT_ADDRESSING mode (Windows) 2006-05-14 13:48:05 +00:00
gbeauche
7ef09b90bb NQD dirty boxes, BeOS backend -- no-op. 2006-05-14 08:35:35 +00:00
gbeauche
5e4c2b7bb9 NQD dirty boxes, X11 backend. 2006-05-14 08:32:33 +00:00
gbeauche
757f849ad0 Optimize generated code to NQD & CheckLoad functions. They don't call into
68k or MacOS code, so they don't need to be a termination point. i.e. don't
split into two basic blocks and thus avoid a full hash search.

Also add missing NQD_unknown_hook NativeOp from previous commit.
2006-05-14 07:21:10 +00:00
gbeauche
74a5024be4 NQD dirty boxes, generic code
+ while we are at it, also rename a few NQD related NativeOps.
2006-05-13 17:12:18 +00:00
gbeauche
484469962b Don't let SDL catch SIGINT and SIGTERM signals. This is not suitable for
SheepShaver since we are typically translating SDL_QUIT events to PowerOff()
on MacOS side. And, if MacOS is not fully booted, it's not really convenient
to shut it down, even with ctrl-C. i.e. you had to kill -9 it.
2006-05-09 19:53:31 +00:00
gbeauche
0af4721cb6 Don't read from 0xf8000090 during MacOS (8.5, 9.0) installation. Is this an
OpenFirmware check for OldWorld 604-based machines?

XXX I have code pending that makes it possible to use PowerMac ID #3035 and
model 510 (PowerMac G3 Series). However, I have a regression with one of my
MacOS 8.6 disks. This is non-standard anyway since it was installed from the
iMac DV 8.6 discs ("yellow" not generic) with MOL -- SheepShaver can't cope
with it.

So I am not surprised it breaks. Otherwise, 8.5 -> 9.0.4 were fine with it.

BTW, the "regression" is Native Resource Manager is not installed and the
boot gets mad later. FWIW, it's the same as for MacOS 9.1. A resource is
very likely not loaded.
2006-05-08 23:32:58 +00:00
gbeauche
0a37b8f5e9 Fix MacOS X GUI (new fake DarwinSys*() functions) 2006-05-08 17:20:20 +00:00
gbeauche
8bd38cff75 Also nuke MacOS X GUI binary and bundle for make clean 2006-05-08 17:19:45 +00:00
gbeauche
12195c32b5 Define UNALIGNED_PROFITABLE on x86 platforms 2006-05-07 16:54:58 +00:00
gbeauche
75f3bdea68 Fix NQD_bitblt_hook() to perform sign check correctly 2006-05-07 10:49:48 +00:00
gbeauche
bc13355b57 Add linker scripts from Basilisk II and make it possible to allocate up to
1 GB of Mac memory. Only tested on Linux/x86_64 so far but with a somewhat
interesting (MacOS, ROM, RAM size) matrix.

XXX: It should be possible to allocate up to 1.5 GB by relocating the ROM
base to something like 0x60800000.
2006-05-06 10:42:51 +00:00
gbeauche
6da4032ab7 Add a few FE0A opcode patches. This slightly improves stability. 2006-05-06 10:30:00 +00:00
gbeauche
80c87484f3 Add 'nsrd' 1 and 'gpch' 650 patches for MacOS 7.5.3 Revision 2.2 2006-05-06 09:23:28 +00:00
gbeauche
3bd5d0c787 Instructions that trap are now an end-of-block condition. This should avoid
the compilation of illegal instructions and thus stopping execution earlier.
2006-05-06 07:19:39 +00:00
gbeauche
e88961bc45 Review MacOS 8.6 vs 9.0 patches:
- 'boot' 3: set boot stack pointer only once at the correct place
- 'gpch' 750: fix FE0A opcode replacement (selector #$0a is virt2phys on pgidx)
- 'gpch' 750: remove bogus patch for SonyVars
- Mark patches "9.0" verified accordingly vs. 8.6
2006-05-05 19:05:24 +00:00
gbeauche
4578abcbd4 Add native GetNamedResource() and Get1NamedResource() patches for PPC Unix.
Only tested on MacOS X so far. It shouldn't be a problem for Linux/PowerPC.
2006-05-03 22:11:49 +00:00
gbeauche
812682fda6 update 2006-05-03 21:53:47 +00:00
gbeauche
f3ba2f0d64 Don't access ROM85 as it it was a pointer to a ROM version number (8.0, 8.1)
aka. fix bogus AppleShare extension, it was trying to dereference 0x3fff.

XXX: why is this code called in the first place?
2006-05-03 21:53:33 +00:00
gbeauche
21f35a34f0 Add patches for native GetNamedResource() and Get1NamedResource(). This will
be useful to fix a bug in the AppleShare extension (see DRVR .AFPTranslator
in Basilisk II)

Unrelated improvement: call sheepshaver_cpu::get_resource() directly, don't
get it through another global function.
2006-05-03 21:45:14 +00:00
gbeauche
0f5f874e11 Huh, committed wrong changelog for configure.ac, it should have been the
following: fix build of the CPU emulator (check for additional math functions)
2006-05-02 19:36:57 +00:00