Commit Graph

359 Commits

Author SHA1 Message Date
gbeauche
9b99a095f0 MIPS instruction skipper. TODO: check LWL/LWR semantics. 2003-12-20 10:06:18 +00:00
gbeauche
fdf5970c28 Fix subterfuge mode on IRIX/mips. Get PC in both modes for Irix too 2003-12-20 07:43:56 +00:00
cebix
ea0d909ce5 run depmod after installing module 2003-11-28 15:49:16 +00:00
gbeauche
10c04e2654 Enable possibility to manually pass VM_MAP_32BIT & friends. This is needed
for the PowerPC "JIT1" engine.
2003-11-24 23:27:18 +00:00
gbeauche
45df157a5e Implement lazy icache range invalidation. Disable for now until it shows
a real benefit over only 2%
2003-11-21 14:20:01 +00:00
gbeauche
1af0362296 fix loff_t & caddr_t type checks 2003-11-21 14:16:02 +00:00
nigel
ee0958380c Compile fix for OS X (which does not define loff_t) 2003-11-18 11:14:43 +00:00
gbeauche
d4ad77d734 really fix writes to byte registers 2003-11-11 00:10:39 +00:00
gbeauche
4bce0876c0 fix configure tests. i.e. move up arch_insn_skipper_tests() 2003-11-10 23:54:31 +00:00
gbeauche
1169001df7 Extend x86 instruction skipper to AMD64. Add plenty of arch dependent
opcodes to test it. Also fix DEBUG output & writes (zero'ing) to %xH regs
2003-11-10 23:47:39 +00:00
gbeauche
9057fda327 - FreeBSD/i386 sigcontext subterfuge support for instruction skipper
- NetBSD/alpha support from Boehm GC
- NetBSD/i386 won't work in sigcontext subterfuge mode unless instruction
  is decoded more accurately to compute the effective address. Also note
  that NetBSD 1.6 does not support siginfo_t yet.
2003-10-21 23:10:19 +00:00
gbeauche
f8a0f363ea Solaris/SPARC support for SIGSEGV_FAULT_INSTRUCTION 2003-10-21 21:59:41 +00:00
gbeauche
75df809ff7 fix merge with Mach exception filters, we have preconditions to check 2003-10-13 20:15:41 +00:00
gbeauche
6a60d56bf2 indentation fixes, optimize handle_badaccess() to receive only necessary
data and don't copy a struct sigcontext again on x86.
2003-10-13 19:56:17 +00:00
gbeauche
14b51b9519 return something more convenient to debug on errors 2003-10-13 19:43:09 +00:00
gbeauche
45c30ba9f2 Merge in __PAGEZERO hack from Michael Z. Sliczniak so that REAL_ADDRESSING
mode can work under Darwin.
2003-10-12 22:39:59 +00:00
gbeauche
4641be3209 Really make sure VERSION & PACKAGE macros are defined when generating a
configure script with autoconf 2.52.
2003-10-12 21:58:02 +00:00
gbeauche
c04603adce Add hacks to disable "floppy" & "serial[ab]" entries that would cause
Basilisk II to hang on MacOS X as an X11 build. I am not sure this is
supposed to work in an Aqua build so I leave that enable there, assuming
<AvailabilityMacros.h> is included somehow, thus defining MAC_OS_X_VERSION_*
and friends.
2003-10-12 21:55:44 +00:00
gbeauche
46dc8c5391 Make sure reported fault instruction address falls into the expected code
range. This is a configure-time safety net that depends on the GCC "Labels
as Values" extension.
2003-10-12 21:41:19 +00:00
gbeauche
006f72c9fe Report failure to install the SIGSEGV handler correctly 2003-10-12 21:21:35 +00:00
gbeauche
cf3d36a3a7 Mach memory fault recovery from Michael Z. Sliczniak 2003-10-12 21:15:52 +00:00
gbeauche
b2fee2f576 Mach bad access recovery support from Michael Z. Sliczniak 2003-10-12 15:56:00 +00:00
gbeauche
192943f46c Fix vm_acquire() and friend on MacOS X 2003-10-12 11:00:12 +00:00
gbeauche
b66f5972f9 Make sure a 32-bit B2/JIT works reasonnably well on AMD64 too. This implies
to force RAMBaseHost < 0x80000000. This is empirically determined to work on
Linux/x86 and Linux/amd64.
2003-10-03 18:18:15 +00:00
gbeauche
f9dd276a47 use spinlocks on SheepShaver/Linux/PPC, and possibly others where spinlocks
are available. TODO: check the fastest & safest means to lock VOSF stuff.
2003-09-29 08:27:24 +00:00
gbeauche
23c4ebcdf3 really fix typo! 2003-09-29 08:04:22 +00:00
gbeauche
aa61c47591 fix typo 2003-09-29 08:02:04 +00:00
gbeauche
a48a804c15 New SIGSEGV API so that skip-instruction requests are more explicit. Yes,
that's api change, but that's cooler now for SheepShaver. ;-)
2003-09-29 07:02:58 +00:00
gbeauche
505455c8c4 Check for readline headers in the headers check section as otherwise, and
I don't exactly know why, AC_HEADER_STDC would fail with newer autoconf
versions.
2003-08-17 11:58:00 +00:00
gbeauche
ac027954dc Bring x86 instruction skipper back to life 2003-08-17 10:52:52 +00:00
gbeauche
797cb8825a Aliases for PACKAGE and VERSION used for localisation if compiling cxmon
now that we check for AM_GNU_GETTEXT. Yes, life sucks sometimes.
2003-08-17 10:35:18 +00:00
gbeauche
ff483b7800 #define log printf in B2 stubs 2003-08-17 10:20:22 +00:00
gbeauche
f40f7ab91f AM_GNU_GETTEXT for gnome stuff 2003-08-17 10:16:23 +00:00
cebix
91c9cf1879 fixed the test for GCC [Brian J. Johnson] 2003-07-25 13:45:25 +00:00
cebix
2257e7be3f fix for no-threads case for an emulated 68k [Todd Vierling] 2003-07-25 13:41:58 +00:00
cebix
16b21014ef added format switching and other improvements [Brian Johnson] 2003-07-12 11:04:38 +00:00
cebix
0074b3346e modernized the autoconf stuff 2003-07-01 18:10:38 +00:00
cebix
c945f0484e updated autoconf auxiliary files 2003-06-27 13:59:16 +00:00
gbeauche
548e5a3dfd Rearrange video_vosf.h to accomodate both SheepShaver and BasiliskII video
infrastructure. Make video_blit.cpp a little more emulator independent.
2003-05-22 22:13:56 +00:00
gbeauche
deb3da2e9f New API to ignore a SIGSEGV fault. This should help on SheepShaver/x86 for now
since I still don't know why MacOS would like to write to ROM on a particular
test.
2003-05-14 06:50:05 +00:00
gbeauche
61e40b3e55 Fix check against return value of memset() in vm_acquire_fixed 2003-05-13 16:56:37 +00:00
gbeauche
f5a1a93d2c Fix check for mmap()'able low mem globals 2003-05-13 16:33:06 +00:00
nigel
fda7b93625 Darwin-specific prefs and initial CD code. Since some of the CD code is just too weird to include here, I just call extern functions which I currently implement in a file sys_darwin.cpp 2003-03-21 07:03:05 +00:00
cebix
a69dcbb18f some cleanups 2003-02-06 19:24:09 +00:00
cebix
4bca966e18 added "install" target 2003-02-06 19:10:08 +00:00
gbeauche
1477b501d1 Add changes from Brian Johnson:
- Update MIPSpro compiler flags
- Only define static variables if they are to be used
- Try to lock the pthreads mutex prior to unlocking/destroying it
2002-11-24 20:07:25 +00:00
gbeauche
3711aa4520 Update ASM_SYM_FOR_FUNC to match x86-64 too, may be useful later. 2002-11-16 15:38:53 +00:00
gbeauche
abaa9fb2cd Add configury for x86-64 2002-11-05 11:58:40 +00:00
gbeauche
58b3aaba5b Get rid of CPU_* defines as nobody actually used them and are useless 2002-11-05 10:32:42 +00:00
gbeauche
3bf7843db1 x86-64 can do unaligned accesses 2002-11-05 10:32:05 +00:00
cebix
466fc971f6 Unix: new prefs options "dsp" and "mixer" to set the OSS device names instead
of the hardcoded '/dev/dsp' and '/dev/mixer'
2002-10-15 16:25:04 +00:00
gbeauche
177cdee820 configure script is reportedly no longer crashing on FreeBSD when
SIGSEGV_SKIP_INSTRUCTION is set.
2002-10-03 15:49:14 +00:00
gbeauche
3efbc30695 B2 maintainer for FreeBSD reported <sys/soundcard.h> is the one to use in all
recent versions of FreeBSD.
2002-10-03 15:47:59 +00:00
gbeauche
518f982775 - CAN_JIT=yes has to be moved into the actual block containing JITSRCS.
- Optimistically reenable gas/x86 assembly optimizations and JIT for FreeBSD
  as it used to work in the past there. If not, beat me.
2002-10-01 09:58:08 +00:00
gbeauche
13e8cb3eec Huh, am I still asleep? Actually use the cpuemuX_nf.cpp pattern rather
than the *.s variant.
2002-10-01 09:51:09 +00:00
gbeauche
c492269143 Drop cpuopti on x86 now that we have a fast JIT. I don't want to bother
fixing cpuopti or workarounding code for any known and unknown gcc bug.
2002-10-01 09:34:47 +00:00
gbeauche
98d1246815 - Let fullscreen DGA mode work again, even with a DirectColor visual. In
that case, we do need add it when creating the window otherwise we
  result int a nice BadMatch for X_CreateWindow request. FIXME?
- Fix typo and do enable VOSF in DGA mode, if necessary.
2002-09-28 12:42:39 +00:00
gbeauche
f2a9938685 Ensure the IEEE fpu core is used when building the JIT compiler 2002-09-18 13:06:49 +00:00
gbeauche
54ac7a1493 Move -DSAHF_SETO_PROFITABLE down in x86 & gas specific block. Also ensure
SAHF_SETO_PROFITABLE is defined when compiling the JIT. Aka I don't want
to support obsolete and probably bogus code nowadays.
2002-09-18 11:41:56 +00:00
gbeauche
e268a5a072 Define SAHF_SETO_PROFITABLE on x86, aka restore full performance of the
JIT compiler. ;-) BTW, also fixes some valgrind warnings.
2002-09-18 10:25:05 +00:00
gbeauche
5df172aa53 Additions for the JIT compiler opcode translators + NOFLAGS variant of
regular instruction handlers.
2002-09-17 16:09:25 +00:00
gbeauche
8c7254e4c8 Additions for the JIT compiler (--enable-jit-compiler, --enable-jit-debug) 2002-09-17 16:08:41 +00:00
gbeauche
6f3a214a15 Make FlushCodeRange aware of the JIT compiler's flush_icache() 2002-09-17 16:08:07 +00:00
gbeauche
ea8bdf1941 Update prefs editor with "JIT Compiler" pane 2002-09-17 16:06:37 +00:00
gbeauche
ba346aa0d2 Check for for C99 math functions in the form *l() 2002-09-16 15:40:48 +00:00
gbeauche
ea98d02ce8 Conditionalize use of pthread_mutexattr_setpshared() as this is an optional
POSIX feature from _POSIX_THREAD_PROCESS_SHARED group. Besides, Ulrich Drepper
mentions "the kernel support for this option wasn't available until 2.5.7.
Future versions of the thread library will support this option."
<http://people.redhat.com/drepper/posix-option-groups.html>

BTW, this nukes a warning when build on FreeBSD 4.6
2002-09-16 15:06:24 +00:00
cebix
7c1352a5f7 updated autogen.sh to AutoGen(TM) 8.0 Professional :-) 2002-09-16 14:54:19 +00:00
gbeauche
d16a54362c #include <pthread.h> to get pthread_attr_t definition 2002-09-16 14:48:53 +00:00
gbeauche
a04889fe03 Portability fixes: use a switch to test for ac_cv_c_float_format 2002-09-16 14:17:20 +00:00
gbeauche
a0d72c749b Remove acconfig.h, obsoleted by new autoconf2.5 stuff 2002-09-16 14:10:21 +00:00
gbeauche
453c6de0e2 Now use autoconf 2.52+ as it provides nice AC_SYS_LARGEFILE check and a
fixed check for exit() prototype.
2002-09-16 13:29:33 +00:00
gbeauche
5be5714a9e Remove TYPE_SOCKLEN_T check as it was merged in main configure script already. 2002-09-16 13:28:17 +00:00
gbeauche
9cc4185fa2 - Make "ieee" core default, where applicable
- Import gcc configury to determine HOST_FLOAT_FORMAT
2002-09-16 12:03:07 +00:00
gbeauche
dbc92fb334 Updates for new FPU core architecture, add "ieee" core (x86 for now) 2002-09-13 12:51:24 +00:00
cebix
3d2bac9f15 - it is now possible to make the serial drivers pipe their input/output
to programs by using a '|' followed by a command line as the modem or
  printer port setting (instead of a device name like '/dev/ttyS0')
  [Brian Johnson]
- the option "--config FILE" tells B2 to use a different config file
2002-07-31 16:46:14 +00:00
cebix
586d299bfc fixes by Steven N. Hirsch (versioned symbols, module license) 2002-07-23 18:02:47 +00:00
gbeauche
281460fba0 - New arch support for IP retrieval on SIGSEGV. 2002-07-17 06:51:05 +00:00
gbeauche
69847c3ea2 Correctly guard FreeBSD bits 2002-06-27 14:28:59 +00:00
gbeauche
d7c4d7afbf Backout "ignoresegv" support on FreeBSD/x86 for now. Unfortunately, the
configure script would hang whereas standalone testing will pass all tests.
Any idea why??
- Unix/sigsegv.cpp (ix86_skip_instruction): Add decoder for mozbl instruction.
  (SIGSEGV_REGISTER_FILE [FreeBSD/x86]): Note why we start at EDI offset
  rather than plain sigcontext pointer. i.e. I don't know sigset_t size
  beforehand and don't intend to.
2002-05-20 18:12:01 +00:00
gbeauche
2bd9ee71e8 Implement "ignoresegv" feature on FreeBSD/x86 (tested on FreeBSD 4.5)
- sigsegv.cpp (ix86_skip_instruction): Add decoder for movzwl instructions.
  (main): oddly, FreeBSD doesn't seem to let a write to a page if it is
  write-only. Aka. make the page readable too.
2002-05-20 17:49:04 +00:00
gbeauche
ae93f1e0d8 - Fix compilation on Linux/x86 with SIGCONTEXT_SUBTERFUGE 2002-05-20 16:03:37 +00:00
gbeauche
c2d3d08a7a - sigsegv.cpp (ix86_skip_instruction): Fix DEBUG compilation. 2002-05-20 16:00:07 +00:00
gbeauche
e81b9ace6d Implement "ignoresegv" feature on Darwin/ppc (tested on MacOS X)
- Unix/sigsegv.cpp (powerpc_decode_instruction): New.
  (get_fault_instruction [MacOS X]): Factorize code.
  (get_fault_instruction [Linux/m68k]): Don't use expression statement.
- README (ignoresegv): Add Darwin/ppc to list of supported platforms.
2002-05-20 15:56:13 +00:00
gbeauche
c47819020c Implement "ignoresegv" feature on Linux/ppc:
- Unix/sigsegv.cpp (powerpc_skip_instruction): New from SheepShaver code.
- README (ignoresegv): Add Linux/ppc to list of supported platforms.
2002-05-19 21:58:42 +00:00
gbeauche
39d97f5b04 - video_vosh.h (Screen_fault_handler): Move unrecoverable fault case to...
- main_unix.cpp (sigsegv_dump_state): ... Here.
- sigsegv.h (sigsegv_fault_handler_t): Rename from sigsegv_handler_t.
- sigsegv.h (sigsegv_state_dumper_t): New.
2002-05-16 15:48:06 +00:00
gbeauche
d5be07f449 - Merge with clisp SIGSEGV library version 1.2 with support added for
HP-UX (contributed by Paolo Bonzini)
- Add missing? include <ucontext.h> for Irix and OSF/1 support
2002-05-12 13:51:22 +00:00
gbeauche
266fc18f8a Implement the "ignoresegv" feature from SheepShaver. This is Unix-specific
so far. Target platform is currently Linux/x86.
2002-05-12 11:10:50 +00:00
cebix
cc423d283f default CD-ROM drive is /dev/cd0c on NetBSD 2002-04-28 14:06:17 +00:00
cebix
00a32a9afb fixed compilation problem in fbdev code 2002-04-28 12:09:23 +00:00
cebix
8871da753d - added infrastructure for multi-monitor support; only video_x.cpp is
converted for the new scheme; not actually tested with a mult-monitor
  setup yet but at least single-monitor display doesn't seem to be broken
  (UAE banked addressing would definitely require some extensions to handle
  multiple frame buffers)
- struct video_mode has an extra field that is free for use by platform-
  specific code
2002-04-25 11:00:31 +00:00
gbeauche
c9563ddb5c - Clarified test of access() return value
- s/strcpy/sprintf/ for cd_dev concatenation
- Statically allocate fd_dev[] and cd_dev[]
Better testing is yet to be done
2002-03-29 16:24:18 +00:00
cebix
5f9f63dea3 support for Linux devfs 2002-03-27 20:11:12 +00:00
cebix
ed628a548b fix for IRIX [Marcus Herbert] 2002-03-20 19:37:37 +00:00
cebix
78254ebddd added missing return values 2002-03-20 19:03:41 +00:00
gbeauche
097b4509ee - Add even more term libs and prefer ncurses over the rest. 2002-03-18 13:30:07 +00:00
gbeauche
faa3d07211 - Invert AC_CHECK_LIB for readline and termcap so that the test program
for readline detection is actually linked against -ltermcap -lreadline.
2002-03-18 12:59:44 +00:00
gbeauche
b8ffa860a2 - Add fault instruction recovery for Linux/ppc and siginfo_t handlers 2002-03-16 21:36:12 +00:00
gbeauche
2161b984ab - Large File support is now specific to Linux since it breaks build on
other platforms like Solaris/SPARC and I could only test under Linux.
  TODO: Better use the AC_SYS_LARGEFILE macro from autoconf-2.5.
2002-03-16 10:58:22 +00:00
gbeauche
99efbfc712 - Check for caddr_t. On some systems like Solaris/SPARC, mmap() address
type (first parameter) is caddr_t instead of void *. Explicitly cast
  address to (caddr_t) type and C++ implicit pointer conversion rules
  will do the rest. aka. caddr_t -> void * is OK unlike the opposite.
2002-03-16 10:51:17 +00:00
gbeauche
7ec7300784 - Also include <sys/types.h> if system has <unistd.h> 2002-03-16 10:49:00 +00:00