Statistics
| Branch: | Revision:

root / target-ppc / op_helper.c @ bd7d9a6d

History | View | Annotate | Download (74.8 kB)

# Date Author Comment
6676f424 08/25/2008 02:16 am aurel32

Revert commits 5082 and 5083

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5084 c046a42c-6fe2-441c-8c8c-71466251a162

61c04807 08/24/2008 10:05 pm aurel32

PPC: Switch a few instructions to TCG

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5083 c046a42c-6fe2-441c-8c8c-71466251a162

9b7b85d2 05/25/2008 03:36 am pbrook

Fix off-by-one unwinding error.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4570 c046a42c-6fe2-441c-8c8c-71466251a162

1cdb9c3d 04/08/2008 12:24 am aurel32

Revert revisions r4168 and r4169. That's work in progress, not ready for trunk yet.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4171 c046a42c-6fe2-441c-8c8c-71466251a162

e755699d 04/08/2008 12:00 am aurel32

Always enable precise emulation when softfloat is used

The patch below changes the way to enable softfloat on the PPC target. It
is now enabled when softfloat is used. The rationale behind this change
is that persons who want precise emulation prefer precision over emulation...

80621676 03/13/2008 09:20 pm aurel32

Math functions helper for CONFIG_SOFTFLOAT=yes

The patch below adds isfinite() and isnormal() functions which can
work with float64 type, used when CONFIG_SOFTFLOAT=yes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4048 c046a42c-6fe2-441c-8c8c-71466251a162

0ca9d380 03/13/2008 09:19 pm aurel32

Use float32/64 instead of float/double

The patch below uses the float32 and float64 types instead of the float
and double types in the PPC code. This doesn't change anything when
using softfloat-native as the types are the same, but that helps
compiling the PPC target with softfloat....

5567025f 03/10/2008 02:09 am aurel32

mtfsf: fix FPSCR_VX and FPSCR_FEX computation

The patch below fixes the computation of FPSCR_VX and FPSCR_FEX when
using the mtfsf instruction. As stated in the PowerPC manual the mtfsf
instruction can't alter those bit, and thus it should always be
computed....

6b542af7 11/24/2007 04:03 am j_mayer

Fix incorrect debug prints (reported by Paul Brook).
Remove obsolete / duplicated debug prints and improve output consistency.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3725 c046a42c-6fe2-441c-8c8c-71466251a162

69facb78 11/24/2007 12:16 am j_mayer

Revert foolish patch.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3724 c046a42c-6fe2-441c-8c8c-71466251a162

9b605b9e 11/23/2007 07:33 pm pbrook

Fix ppc32 register dumps on 64-bit hosts.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3723 c046a42c-6fe2-441c-8c8c-71466251a162

a4f30719 11/17/2007 11:14 pm j_mayer

PowerPC hypervisor mode is not fundamentally available only for PowerPC 64.
Remove TARGET_PPC64 dependency and add code provision to be able
to define a fake 32 bits CPU with hypervisor feature support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3678 c046a42c-6fe2-441c-8c8c-71466251a162

7863667f 11/16/2007 04:11 pm j_mayer

Always make PowerPC hypervisor mode memory accesses and instructions
available for full system emulation, then removing all #if TARGET_PPC64H
from micro-ops and code translator.
Add new macros to dramatically simplify memory access tables definitions
in target-ppc/translate.c....

3cd7d1dd 11/12/2007 03:56 am j_mayer

Allow use of SPE extension by all PowerPC targets,
adding gprh registers to store GPR MSBs when GPRs are 32 bits.
Remove not-needed-anymore ppcemb-linux-user target.
Keep ppcemb-softmmu target, which provides 1kB pages support
and 36 bits physical address space....

6f2d8978 11/12/2007 02:04 am j_mayer

Fix usage of the -1 constant in the PowerPC target code:
fix invalid size casts and/or sign-extensions.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3626 c046a42c-6fe2-441c-8c8c-71466251a162

44f8625d 11/11/2007 02:35 pm bellard

fixed invalid type

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3582 c046a42c-6fe2-441c-8c8c-71466251a162

9c7e37e7 11/11/2007 02:33 am j_mayer

Fix POWER abs & abso computation.
Fix PowerPC SPE evabs & evneg (thanks to Fabrice Bellard for reporting the bug)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3575 c046a42c-6fe2-441c-8c8c-71466251a162

c3e10c7b 11/11/2007 02:18 am j_mayer

Optimize PowerPC overflow flag computation in most useful cases.
Use the same routines to check overflow for addo, subfo and PowerPC 405
multiply and add cases.
Fix carry reset in addme(o) and subfme(o) cases.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3574 c046a42c-6fe2-441c-8c8c-71466251a162

056401ea 11/04/2007 04:55 am j_mayer

PowerPC 601 need specific callbacks for its BATs setup.
Implement PowerPC 601 HID0 register, needed for little-endian mode support.
As a consequence, we need to merge hflags coming from MSR with other ones.
Use little-endian mode from hflags instead of MSR during code translation....

faadf50e 11/03/2007 03:37 pm j_mayer PowerPC MMU and exception fixes:
  • PowerPC 601 (and probably POWER/POWER2) uses a different BAT format than
    later PowerPC implementation.
  • Bugfix in BATs check: must not stop after 4 BATs when more are provided.
  • Enable POWER 'rac' instruction.
  • Fix exception prefix for all supported PowerPC implementations....
86c4a9f5 10/29/2007 11:54 pm j_mayer

Fix two PowerPC FPU emulation bugs (thanks to Aurelien Jarno)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3487 c046a42c-6fe2-441c-8c8c-71466251a162

273af660 10/29/2007 04:39 pm ths

Adjust s390 addresses (the MSB is defined as "to be ignored").

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3486 c046a42c-6fe2-441c-8c8c-71466251a162

603fccce 10/28/2007 02:54 pm j_mayer

Make Alpha and PowerPC targets use shared helpers
for clz, clo, ctz, cto and ctpop.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3466 c046a42c-6fe2-441c-8c8c-71466251a162

a11b8151 10/28/2007 03:55 am j_mayer

PowerPC coding style and inlining fixes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3461 c046a42c-6fe2-441c-8c8c-71466251a162

5bda2843 10/28/2007 02:34 am j_mayer

PowerPC floating-point helper typo.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3460 c046a42c-6fe2-441c-8c8c-71466251a162

4f8eb6cf 10/27/2007 08:59 pm j_mayer

PowerPC float bugfix: 64 bits float mantissa is 52 bits long.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3459 c046a42c-6fe2-441c-8c8c-71466251a162

7c58044c 10/27/2007 08:54 pm j_mayer

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

88ad920b 10/26/2007 02:36 am j_mayer

Fix PowerPC 64x64 bits multiplication overflow check.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3444 c046a42c-6fe2-441c-8c8c-71466251a162

9d901a20 10/26/2007 02:28 am j_mayer

Use host-utils for PowerPC 64 64x64 bits multiplications.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3442 c046a42c-6fe2-441c-8c8c-71466251a162

0411a972 10/26/2007 12:35 am j_mayer

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....

1e42b8f0 10/14/2007 11:27 am j_mayer

Generate micro-ops for PowerPC hypervisor mode.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3386 c046a42c-6fe2-441c-8c8c-71466251a162

6ebbf390 10/14/2007 10:07 am j_mayer

Replace is_user variable with mmu_idx in softmmu core,
allowing support of more than 2 mmu access modes.
Add backward compatibility is_user variable in targets code when needed.
Implement per target cpu_mmu_index function, avoiding duplicated code
and #ifdef TARGET_xxx in softmmu core functions....

b068d6a7 10/07/2007 08:13 pm j_mayer

PowerPC target optimisations: make intensive use of always_inline.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3347 c046a42c-6fe2-441c-8c8c-71466251a162

d63001d1 10/04/2007 03:51 am j_mayer

Make PowerPC cache line size implementation dependant.
Implement dcbz tunable cache line size for PowerPC 970.
Make hardware reset vector implementation dependant.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3321 c046a42c-6fe2-441c-8c8c-71466251a162

7dbe11ac 10/01/2007 08:16 am j_mayer

Handle all MMU models in switches, even if it's just to abort because of lack
of supporting code.
Implement 74xx software TLB model.
Keep 74xx with software TLB disabled, as Linux is not able to handle TLB miss
on those processors.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3307 c046a42c-6fe2-441c-8c8c-71466251a162

daf4f96e 10/01/2007 04:51 am j_mayer

Avoid op helpers that would just call helpers for TLB & SLB management:
call the helpers directly from the micro-ops.
Avoid duplicated code for tlbsx. implementation.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3302 c046a42c-6fe2-441c-8c8c-71466251a162

be147d08 09/30/2007 04:03 pm j_mayer
  • Update OEA environment, following the PowerPC 2.04 specification:
    - New mtmsr/mtmsrd form that just update RI and EE bits
    - New hrfid, lq and stq instructions
    - Add support for supervisor and hypervisor modes process priority update
    - Code provision for hypervisor SPR accesses...
c80f84e3 09/30/2007 04:18 am j_mayer

Implement Process Priority Register as defined in the PowerPC 2.04 spec.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3282 c046a42c-6fe2-441c-8c8c-71466251a162

d7e4b87e 09/30/2007 04:11 am j_mayer

Implement new floating-point instructions (fre, frin, friz, frip, frim)
as defined in the PowerPC 2.04 specification.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3281 c046a42c-6fe2-441c-8c8c-71466251a162

e1833e1f 09/29/2007 04:06 pm j_mayer 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....
a750fc0b 09/27/2007 02:54 am j_mayer 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)....
a4bb6c3e 09/21/2007 08:28 am j_mayer

Rework PowerPC 440 TLB management (thanks to Hollis Blanchard)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3200 c046a42c-6fe2-441c-8c8c-71466251a162

71c8b8fd 09/19/2007 08:46 am j_mayer

TARGET_FMT_lu may also be useful.
Fix compilation warnings.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3190 c046a42c-6fe2-441c-8c8c-71466251a162

5eb7995e 09/19/2007 08:44 am j_mayer

Code provision for PowerPC BookE MMU model support.
Better MSR flags initialisation.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3189 c046a42c-6fe2-441c-8c8c-71466251a162

966439a6 09/17/2007 12:51 pm j_mayer

PowerPC flags update/use fixes:
- fix confusion between overflow/summary overflow, as reported by S Bansal.
- reset carry in addic. optimized case (as it was already done in addic).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3179 c046a42c-6fe2-441c-8c8c-71466251a162

36081602 09/17/2007 11:21 am j_mayer

Coding style fixes in PowerPC related code (no functional change):
- avoid useless blanks at EOL.
- avoid tabs.
- fix wrapping lines on 80 chars terminals.
- add missing ';' at macros EOL to avoid confusing auto-identers.
- fix identation.
- Remove historical macros in micro-ops (PARAM, SPARAM, PPC_OP, regs)...

3b46e624 09/17/2007 11:09 am ths

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

5fafdf24 09/17/2007 12:08 am ths

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

bfed01fc 06/03/2007 08:44 pm ths

Clean up of some target specifics in exec.c/cpu-exec.c.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2936 c046a42c-6fe2-441c-8c8c-71466251a162

6b80055d 04/24/2007 10:36 am j_mayer

Debug traces fixes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2721 c046a42c-6fe2-441c-8c8c-71466251a162

35cdaad6 04/24/2007 09:50 am j_mayer

Code provision for new PowerPC embedded target support with:
- 1 kB page size
- 64 bits GPR
- 64 bits physical address space
- SPE extension support.
Change TARGET_PPCSPE into TARGET_PPCEMB

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2718 c046a42c-6fe2-441c-8c8c-71466251a162

c294fc58 04/24/2007 09:44 am j_mayer

Improve PowerPC 405 MMU model / share more code for other embedded targets
support.
Fix PowerPC 405 MSR mask.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2717 c046a42c-6fe2-441c-8c8c-71466251a162

c55e9aef 04/16/2007 12:21 pm j_mayer

PowerPC 4xx software driven TLB fixes + debug traces.
Add code provision for more MMU models support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2683 c046a42c-6fe2-441c-8c8c-71466251a162

0a032cbe 04/16/2007 11:56 am j_mayer

Add reset callbacks for PowerPC CPU.
Move cpu_ppc_init, cpu_ppc_close, cpu_ppc_reset and ppc_tlb_invalidate
into helper.c as they are to be called from outside of the translated code.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2682 c046a42c-6fe2-441c-8c8c-71466251a162

a496775f 04/16/2007 10:10 am j_mayer

Fix a lot of debug traces for PowerPC emulation: use logfile instead of stdout

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2677 c046a42c-6fe2-441c-8c8c-71466251a162

2e719ba3 04/13/2007 12:11 am j_mayer

Embedded PowerPC Device Control Registers infrastructure.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2653 c046a42c-6fe2-441c-8c8c-71466251a162

a8dea12f 03/31/2007 02:33 pm j_mayer

Merge PowerPC 405 MMU model.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2554 c046a42c-6fe2-441c-8c8c-71466251a162

a42bd6cc 03/30/2007 01:22 pm j_mayer

Fix rfi instruction: do not depend on current execution mode
but on the execution mode that will be effective after the return.
Add rfci, rfdi and rfmci for BookE PowerPC.
Extend mfdcr / mtdcr and implement mfdrcx / mtdcrx.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2544 c046a42c-6fe2-441c-8c8c-71466251a162

426613db 03/23/2007 11:45 am j_mayer

Add missing PowerPC 64 instructions
PowerPC 64 fixes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2530 c046a42c-6fe2-441c-8c8c-71466251a162

e864cabd 03/23/2007 12:17 am j_mayer

PowerPC bugfixes:
- must clear carry bit when doing addic with a zero immediate value
- fix missing RETURN in micro-operation that would lead to random failures
and crashes
- add USE_PRECISE_EMULATION compilation-time option to choose between
getting exact floating point results and fast but less accurate computation....

0487d6a8 03/21/2007 12:11 am j_mayer

PowerPC 2.03 SPE extension - first pass.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2519 c046a42c-6fe2-441c-8c8c-71466251a162

36f69651 03/18/2007 10:47 am j_mayer

As icbi is not a priviledge instruction and is treated as a load by the MMU
it needs to be implemented for every MMU translation mode.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2492 c046a42c-6fe2-441c-8c8c-71466251a162

d9bce9d9 03/17/2007 04:02 pm j_mayer

Make it safe to use 64 bits GPR and/or 64 bits host registers.
For "symetry", add 64 bits versions of all modified functions.
As a side effect, add a lot of code provision for PowerPC 64 support.
Move overflow and carry checks in common routines for simple cases....

76a66253 03/07/2007 10:32 am j_mayer

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...

f9ebe432 04/23/2006 09:18 pm bellard

removed unnecessary header

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1835 c046a42c-6fe2-441c-8c8c-71466251a162

fdabc366 07/05/2005 01:17 am bellard

correct split between helper.c and op_helper.c - moved some uops to op_helper.c (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1504 c046a42c-6fe2-441c-8c8c-71466251a162

2be0071f 07/03/2005 01:09 am bellard

simplified PowerPC exception handling (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1492 c046a42c-6fe2-441c-8c8c-71466251a162

3fc6c082 07/02/2005 11:59 pm bellard

preliminary patch to support more PowerPC CPUs (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1489 c046a42c-6fe2-441c-8c8c-71466251a162

30aec876 06/05/2005 01:19 am bellard

xec_bc mask fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1439 c046a42c-6fe2-441c-8c8c-71466251a162

4ecc3190 03/13/2005 07:01 pm bellard

fpu fixes (Jocelyn Mayer) - soft float support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1335 c046a42c-6fe2-441c-8c8c-71466251a162

3cc62370 02/16/2005 01:06 am bellard

ppc fixes (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1297 c046a42c-6fe2-441c-8c8c-71466251a162

18fba28c 02/08/2005 11:24 pm bellard

ppc fixes - gcc 3.4 compile fix (initial patch by Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1273 c046a42c-6fe2-441c-8c8c-71466251a162

7fe48483 10/09/2004 09:08 pm bellard

monitor fixes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1110 c046a42c-6fe2-441c-8c8c-71466251a162

6d463de2 07/10/2004 06:28 pm bellard

removed stdout reference (not portable)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@996 c046a42c-6fe2-441c-8c8c-71466251a162

4b3686fa 05/24/2004 01:18 am bellard

PowerPC merge

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@861 c046a42c-6fe2-441c-8c8c-71466251a162

9fddaa0c 05/21/2004 03:59 pm bellard

PowerPC merge: real time TB and decrementer - faster and simpler exception handling (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@841 c046a42c-6fe2-441c-8c8c-71466251a162

1ef59d0a 04/26/2004 10:48 pm bellard

ppc fixes (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@765 c046a42c-6fe2-441c-8c8c-71466251a162

a541f297 04/12/2004 11:39 pm bellard

PowerPC system emulation fixes (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@722 c046a42c-6fe2-441c-8c8c-71466251a162

ad081323 02/04/2004 01:39 am bellard

added tlb_flush() flags

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@600 c046a42c-6fe2-441c-8c8c-71466251a162

985a19d6 01/19/2004 12:49 am bellard

PowerPC merge (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@566 c046a42c-6fe2-441c-8c8c-71466251a162

9a64fbe4 01/05/2004 12:58 am bellard

PowerPC system emulation (Jocelyn Mayer) - modified patch to use new TLB api

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@528 c046a42c-6fe2-441c-8c8c-71466251a162