Commit Graph

138 Commits

Author SHA1 Message Date
j_mayer 7c58044c0a Fix PowerPC FPSCR update and floating-point exception generation
in most useful cases.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3458 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-27 17:54:30 +00:00
j_mayer a32ff1ad95 PowerPC user-mode fix: MSR is now entirelly set-up in the cpu_reset routine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3457 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-27 17:29:35 +00:00
j_mayer 0411a97258 Gprof prooved the PowerPC emulation spent too much time in MSR load and store
routines. Coming back to a raw MSR storage model then speed-up the emulation.
Improve fast MSR updates (wrtee wrteei and mtriee cases).
Share rfi family instructions helpers code to avoid bug in duplicated code.
Allow entering halt mode as the result of a rfi instruction.
Add a new helper_regs.h file to avoid duplication of special registers
 manipulation routines (currently XER and MSR).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3436 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-25 21:35:50 +00:00
j_mayer e85e7c6ea4 Use the new TARGET_ABI32 feature to implement a ppc64abi32-linux-user target
(PowerPC 64 running in 32 bits mode).
Use the new TARGET_ABI_DIR feature to implement a ppcemb-linux-user target
  (PowerPC 32 with 64 bits GPRs and vector extensions).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3409 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-18 19:59:49 +00:00
blueswir1 952a328ff5 SuperSparc MXCC support (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3397 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-14 16:29:21 +00:00
blueswir1 992f48a036 Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-14 16:27:31 +00:00
j_mayer c732abe222 Unify '-cpu ?' option.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3380 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-12 06:47:46 +00:00
blueswir1 cb33da57aa Support for executing 32 bit SPARC32PLUS files for Sparc64 user emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3378 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-09 16:34:29 +00:00
ths 48733d195b CRIS Linux userland emulation, part 2. By Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08 13:36:46 +00:00
j_mayer 3d17787055 Fix host and target longs confusions (continued).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3345 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-07 16:06:13 +00:00
blueswir1 5bfb56b264 Implement sparc64_[gs]et_context
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3334 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-05 17:01:51 +00:00
j_mayer 1cc8e6f067 We must reset the PowerPC CPU _after_ registering it, as hardware reset
effect is implementation dependant.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3323 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-04 01:54:44 +00:00
j_mayer 56ba31ff0b Fix missing case in the new PowerPC exception model.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3294 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 15:15:18 +00:00
ths 540635ba65 Code provision for n32/n64 mips userland emulation. Not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3284 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 01:58:33 +00:00
j_mayer a062e36c58 Implement the PowerPC alternate time-base, following the 2.04 specification.
Share most code with the time-base management routines.
Remove time-base write routines from user-mode emulation environments.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3277 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-30 00:38:38 +00:00
j_mayer e1833e1f96 Rework PowerPC exceptions model to make it more versatile:
* don't use exception vectors as the exception number.
  Use vectors numbers as defined in the PowerPC embedded specification instead
  and extend this model to cover all emulated PowerPC variants exceptions.
* add some missing exceptions definitions, from PowerPC 2.04 specification
  and actual PowerPC implementations.
* add code provision for hypervisor exceptions handling.
* define exception vectors and prefix in CPUPPCState to emulate BookE exception
  vectors without any hacks.
* define per CPU model valid exception vectors.
* handle all known exceptions in user-mode only emulations.
* fix hardware interrupts priorities in most cases.
* change RET_EXCP macros name into GEN_EXCP as they don't return.
* do not stop translation on most instructions that are not defined as
  context-synchronizing in PowerPC specification.
* fix PowerPC 64 jump targets and link register update when in 32 bits mode.
* Fix PowerPC 464 and 464F definitions.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3261 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-29 13:06:16 +00:00
j_mayer a750fc0b91 Great rework and cleanups to ease PowerPC implementations definitions.
* cleanup cpu.h, removing definitions used only in translate.c/translate_init.c
* add new flags to define instructions sets more precisely
* various changes in MMU models definitions
* add definitions for PowerPC 440/460 support (insns and SPRs).
* add definitions for PowerPC 401/403 and 620 input pins model
* Fix definitions for most PowerPC 401, 403, 405, 440, 601, 602, 603 and 7x0
* Preliminary support for PowerPC 74xx (aka G4) without altivec.
* Code provision for other PowerPC support (7x5, 970, ...).
* New SPR and PVR defined, from PowerPC 2.04 specification and other sources
* Misc code bugs, error messages and styles fixes.
* Update status files for PowerPC cores support.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3244 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-26 23:54:22 +00:00
ths 3b46e62427 find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16 21:08:06 +00:00
ths ead9360e2f Partial support for 34K multithreading, not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3156 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-06 00:18:15 +00:00
blueswir1 7f84a7291b Deliver page faults to program
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3049 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-07 20:46:41 +00:00
ths 403f14ef1e Fix environ termination, by Andreas Schwab.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3027 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-27 11:12:42 +00:00
ths d6eb40f650 Hack to keep wine happy, by Alexander Graf.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2993 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-21 22:55:02 +00:00
ths b12b6a188e Option to drop LD_PRELOAD from emulated environment, by Lauri Leukkunen.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2985 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-17 16:38:39 +00:00
ths 2538deb292 Delete leftover Status FPU flag check.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2920 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-01 23:50:45 +00:00
blueswir1 7f75ffd39e Spelling fix (Mark Glines)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2879 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-27 19:39:27 +00:00
pbrook 0402f767b5 Rework m68k cpu feature flags.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2865 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-26 16:52:21 +00:00
pbrook a87295e8df M68k system mode semihosting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2861 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-26 15:09:38 +00:00
pbrook 0633879f1a m68k/ColdFire system emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2851 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-23 19:58:11 +00:00
ths 388bb21af6 MIPS linux-user update.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2810 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-13 13:58:00 +00:00
j_mayer e96efcfcb1 Fix miscellaneous display warnings for PowerPC & alpha targets
and parallel CFI flash driver.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2661 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-14 12:17:09 +00:00
blueswir1 925fb139be Sparc32/64 CPU selection for user emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2637 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-08 06:29:06 +00:00
j_mayer 84409ddbda Code provision for x86_64 and PowerPC 64 linux user mode support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2619 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-06 08:56:50 +00:00
j_mayer 7a3148a955 Preliminary patch for Alpha Linux user mode emulation support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2600 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-05 07:13:51 +00:00
ths cff4cbedc3 Support -cpu selection for mips usermode emulation. Fix segfault when
dispaying the -cpu list help.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2497 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-19 12:16:29 +00:00
j_mayer b1f9be3157 Add -cpu option for linux user emulation.
Only usable for PowerPC and ARM for now.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2496 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-19 08:08:28 +00:00
pbrook 3371d27293 Implement --cpu for ARM.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2474 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-08 03:04:12 +00:00
j_mayer 76a66253e5 Great PowerPC emulation code resynchronisation and improvments:
- Add status file to make regression tracking easier
- Move all micro-operations helpers definitions into a separate header:
  should never be seen outside of op.c
- Update copyrights
- Add new / missing PowerPC CPU definitions
- Add definitions for PowerPC BookE
- Add support for PowerPC 6xx/7xx software driven TLBs
  Allow use of PowerPC 603 as an example
- Add preliminary code for POWER, POWER2, PowerPC 403, 405, 440, 601, 602
  and BookE support
- Avoid compiling priviledged only resources support for user-mode emulation
- Remove unused helpers / micro-ops / dead code
- Add instructions usage statistics dump: useful to figure which instructions
  need strong optimizations.
- Micro-operation fixes:
  * add missing RETURN in some micro-ops
  * fix prototypes
  * use softfloat routines for all floating-point operations
  * fix tlbie instruction
  * move some huge micro-operations into helpers
- emulation fixes:
  * fix inverted opcodes for fcmpo / fcmpu
  * condition register update is always to be done after the whole
    instruction has completed
  * add missing NIP updates when calling helpers that may generate an
    exception
- optimizations and improvments:
  * optimize very often used instructions (li, mr, rlwixx...)
  * remove specific micro-ops for rarely used instructions
  * add routines for addresses computations to avoid bugs due to multiple
    different implementations
  * fix TB linking: do not reset T0 at the end of every TB.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2473 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-07 08:32:30 +00:00
ths 6f5b89a07c MIPS Userland TLS register emulation, by Daniel Jacobowitz.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2465 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-02 20:48:00 +00:00
ths 36d2395873 MIPS FPU dynamic activation, part 1, by Herve Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2463 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-28 22:37:42 +00:00
bellard 84f2e8ef05 copyright update
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2392 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-05 20:21:32 +00:00
ths ca7c2b1b9f Handle invalid accesses as SIGILL for mips/mipsel userland emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2235 c046a42c-6fe2-441c-8c8c-71466251a162
2006-12-10 22:08:10 +00:00
pbrook d08b2a28e6 MIPS usermode debug exceptions (Dave Denholm).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2209 c046a42c-6fe2-441c-8c8c-71466251a162
2006-11-04 16:46:29 +00:00
bellard 27908725b9 sparc64 syscall fix (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2199 c046a42c-6fe2-441c-8c8c-71466251a162
2006-10-23 21:31:01 +00:00
pbrook e6e5906b6e ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
2006-10-22 00:18:54 +00:00
bellard 02a1602e62 added cpu_smm_update()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2173 c046a42c-6fe2-441c-8c8c-71466251a162
2006-09-24 18:48:23 +00:00
bellard 5ef54116ea Sparc64 user emulator fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2063 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-18 21:14:09 +00:00
bellard 1dce7c3c22 new clock logic: cpu ticks and virtual clocks are no longer proportional - added timestamps on the stdio console
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2049 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-13 23:20:22 +00:00
bellard 106ec87921 initial MIPS signal handling (initial patch by Raphael Rigo)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2031 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-27 21:08:10 +00:00
bellard 48dc41eb8b sparc user fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1998 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-21 18:15:50 +00:00