Statistics
| Branch: | Revision:

root / target-sparc @ 753d11f2

# Date Author Comment
bccd9ec5 10/01/2011 12:31 pm Blue Swirl

softmmu_header: pass CPUState to tlb_fill

Pass CPUState pointer to tlb_fill() instead of architecture local
cpu_single_env hacks.

Signed-off-by: Blue Swirl <>

44520db1 09/10/2011 09:12 pm Fabien Chouteau

Gdbstub: Fix back-trace on SPARC32

Gdb expects all registers windows to be flushed in ram, which is not the case
in Qemu. Therefore the back-trace generation doesn't work. This patch adds a
function to handle reads (and only read) in stack frames as if windows were...

de18f87e 09/10/2011 05:56 pm Blue Swirl

Sparc64: remove useless variable

Remove a useless variable, spotted by clang analyzer:
/src/qemu/target-sparc/op_helper.c:3904:18: warning: unused variable 'tmp' [-Wunused-variable]
target_ulong tmp = val;
The error message is actually incorrect since the variable is used....

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

97b348e7 08/07/2011 12:32 pm Blue Swirl

Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <>...

548f66db 08/06/2011 06:08 pm Artyom Tarasenko

Fix handling of conditional branches in delay slot of a conditional branch

Check whether dc->npc is dynamic before using its value for branch.

Signed-off-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

67494323 08/02/2011 12:26 am Blue Swirl

Sparc: fix non-faulting unassigned memory accesses

Commit b14ef7c9ab41ea824c3ccadb070ad95567cca84e
introduced cpu_unassigned_access() function. On Sparc,
the function does not restore AREG0 used for global CPUState
on function exit, causing bugs with non-faulting unassigned...

3e457172 07/30/2011 12:41 pm Blue Swirl

exec.h cleanup

Move softmmu_exec.h include directives from target-*/exec.h to
target-*/op_helper.c. Move also various other stuff only used in
op_helper.c there.

Define global env in dyngen-exec.h.

For i386, move wrappers for segment and FPU helpers from user-exec.c...

ccb57e0e 07/30/2011 11:26 am Tsuneo Saito

SPARC64: fix fnor* and fnand*

Fix the problem that result values are not assigned to the destination
registers.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

638737ad 07/30/2011 11:26 am Tsuneo Saito

SPARC64: implement %fprs dirty bits

Implement %fprs.DU/DL bits.
The FPU sets %fprs.DL and %fprs.DU when values are assigned to %f0-31
and %f32-63 respectively.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

3b8b030a 07/22/2011 06:31 pm Stefan Weil

target-sparc: Fix compiler errors (format strings)

This change is needed because commit 06e12b65
now uses an unsigned long long value
(uint64_t && unsigned long long => unsigned long long).

Cc: Tsuneo Saito <>
Cc: Blue Swirl <>...

d1afc48b 07/21/2011 11:02 pm Tsuneo Saito

SPARC64: implement addtional MMU faults related to nonfaulting load

This patch implements MMU faults caused by TTE.NFO and TTE.E:
- access other than nonfaulting load to a page marked NFO should
raise data_access_exception
- nonfaulting load to a page marked with E bit should raise...

b7785d20 07/21/2011 11:01 pm Tsuneo Saito

SPARC64: implement MMU miss traps on nonfaulting loads

Nonfaulting loads should raise fast_data_access_MMU_miss traps as
normal loads do. It is up to the guest OS kernel that detect MMU misses
on nonfaulting load instructions and make them complete without signaling....

103dcbe5 07/21/2011 11:01 pm Tsuneo Saito

SPARC64: fix fault status overwritten on nonfaulting load

cpu_get_phys_page_nofault() calls get_physical_address() twice,
that results in overwriting the fault status in the SFSR.
We need this change in order for nonfaulting loads to raising MMU faults
as normal loads do....

b64b6436 07/21/2011 10:59 pm Tsuneo Saito

SPARC64: split cpu_get_phys_page_debug() from cpu_get_phys_page_nofault()

This patch makes cpu_get_phys_page_debug() independent from
cpu_get_phys_page_nofault() in advance of implementing nonfaulting load.
This also modifies cpu_get_phys_page_nofault() to be compiled only on...

321365ab 07/21/2011 10:59 pm Tsuneo Saito

SPARC64: introduce a convenience function for getting physical addresses

Introduce cpu_sparc_get_phys_page() to be used as a help for splitting
cpu_get_phys_page_debug() from cpu_get_phys_page_nofault().

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

ccc76c24 07/21/2011 10:58 pm Tsuneo Saito

SPARC64: SFSR cleanup and fix

Add macros for SFSR fields and use macros instead of magic numbers.
Also fix the update of the register fields on MMU faults.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

06e12b65 07/21/2011 10:57 pm Tsuneo Saito

SPARC64: TTE bits cleanup

Add macros for TTE bits and modify to use macros instead of
magic numbers.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

b14ef7c9 07/21/2011 12:28 am Blue Swirl

Fix unassigned memory access handling

cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory
access handling. Fix them by always passing CPUState to the handlers.

Reported-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

b5176d27 07/21/2011 12:11 am Tsuneo Saito

SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.

UA2007 ASI_BLK_* should be added in is_translating_asi().

Signed-off-by: Tsuneo Saito <>
Acked-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

b7d69dc2 07/20/2011 11:44 pm Tsuneo Saito

SPARC64: add missing break on fmovdcc

"break" is missing on V9 fmovdcc (%icc).

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

afcb7375 07/20/2011 11:44 pm Tsuneo Saito

SPARC64: fix VIS1 SIMD signed compare instructions

The destination registers of SIMD signed compare instructions
(fcmp*<16|32>) are not FP registers but general purpose r registers.
Comparisons should be freg_rs1 CMP freg_rs2, that were reversed.

Signed-off-by: Tsuneo Saito <>...

f838e2c5 07/14/2011 08:30 pm Blue Swirl

Sparc: fix FPU and AM enable checks for translation

Translation used incorrectly CPUState fields directly to check
for FPU enable state and 32 bit address masking on Sparc64.

Fix by using TB flags instead.

Signed-off-by: Blue Swirl <>

d8e586ff 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: C99 comment fix for block-transfer ASIs

Fixed C99 comments on block-tranfer ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

d920bde9 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add JPS1 ASI_BLK_AIU[PS]L ASIs for ldfa and stfa

Support JPS1 little endian block transfer ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

073a0444 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa

Support UA2007 block store ASIs for stfa instructions.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

41317e2e 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfa

Support UA2007 block load ASIs for ldfa instructions.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

5f06b547 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: fp_disabled checks on stfa/stdfa/stqfa

stfa/stdfa/stqfa instructions should raise fp_disabled exceptions
if %pstate.PEF==0 or %fprs.FEF==0.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

e1ef36c4 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Implement stfa/stdfa/stqfa instrcutions properly

This patch implements sparcv9 stfa/stdfa/stqfa instructions
with non block-store ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

8872eb4f 07/14/2011 06:35 pm Tsuneo Saito

SPARC64: fp_disabled checks on ldfa/lddfa/ldqfa

ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptions
if %pstate.PEF==0 or %fprs.FEF==0.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

4183f36d 07/14/2011 06:34 pm Tsuneo Saito

SPARC64: Implement ldfa/lddfa/ldqfa instructions properly

This patch implements sparcv9 ldfa/lddfa/ldqfa instructions
with non block-load ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

8e91ed30 07/02/2011 12:28 am Artyom Tarasenko

fix cpu_cc_src and cpu_cc_src2 corruption in udivx and sdivx

udivx and sdvix don't modify condition flags, so they shall not
overwrite cpu_cc_*

Signed-off-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

f081c76c 06/26/2011 09:25 pm Blue Swirl

Move cpu_has_work and cpu_pc_from_tb to cpu.h

Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This is
needed by later patches.

Signed-off-by: Blue Swirl <>

f3e27037 06/26/2011 09:25 pm Blue Swirl

exec.h: fix coding style and change cpu_has_work to return bool

Before the next patch, fix coding style of the areas affected.

Change the type of the return value from cpu_has_work() and
qemu_cpu_has_work() to bool.

Signed-off-by: Blue Swirl <>

e67768d0 06/26/2011 09:25 pm Blue Swirl

sparc: move do_interrupt to helper.c

do_interrupt() was mixing CPUState pointer passed from caller
and global env (AREG0).

Fix by moving the function to helper.c. Introduce a helper for calling
change_pstate() safely from outside of execution context.

Signed-off-by: Blue Swirl <>

fa3c9559 06/26/2011 09:25 pm Blue Swirl

sparc: fix coding style of the area to be moved

Before the next patch, fix coding style of the areas affected.

Signed-off-by: Blue Swirl <>

1162c041 06/26/2011 09:25 pm Blue Swirl

cpu_loop_exit: avoid using AREG0

Make cpu_loop_exit() take a parameter for CPUState instead of relying
on global env.

Signed-off-by: Blue Swirl <>

4d2c2b77 06/26/2011 09:25 pm Blue Swirl

Sparc32: dummy implementation of MXCC MMU breakpoint registers

Add dummy registers for SuperSPARC MXCC MMU counter breakpoints, save
and load all MXCC registers.

Signed-off-by: Blue Swirl <>

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

dcfd14b3 05/22/2011 01:47 pm Blue Swirl

Delete unused tb_invalidate_page_range

tb_invalidate_page_range() was intended to be used to invalidate an
area of a TB which the guest explicitly flushes from i-cache. However,
QEMU detects writes to code areas where TBs have been generated, so
his has never been useful....

86f1f2ae 05/14/2011 10:30 am Blue Swirl

sparc64: fix incorrect BPcc target sign extension

Fix wrong number of bits used when sign extending the branch offset of BPcc
instructions.

Reported-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

a2589e5c 05/14/2011 10:30 am Blue Swirl

sparc64: fix wrpstate and wrtl on delay slot

Use TCG local to work around TCG register flush due to a branch.

Thanks to Artyom Tarasenko, Igor Kovalenko and Aurelien Jarno.

Signed-off-by: Blue Swirl <>

618ba8e6 04/20/2011 11:37 am Stefan Weil

Remove unused function parameter from cpu_restore_state

The previous patch removed the need for parameter puc.
Is is now unused, so remove it.

Cc: Aurelien Jarno <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Weil <>

e87b7cb0 04/20/2011 11:33 am Stefan Weil

Remove unused function parameters from gen_pc_load and rename the function

Function gen_pc_load was introduced in commit
d2856f1ad4c259e5766847c49acbb4e390731bd4.
The only reason for parameter searched_pc was
a debug statement in target-i386/translate.c....

4b4a72e5 04/10/2011 01:45 am Stefan Weil

Fix conversions from pointer to tcg_target_long

tcg_gen_exit_tb takes a parameter of type tcg_target_long,
so the type casts of pointer to long should be replaced by
type casts of pointer to tcg_target_long (suggested by Blue Swirl).

These changes are needed for build environments where...

eda48c34 03/13/2011 04:44 pm Paolo Bonzini

inline cpu_halted into sole caller

All implementations are now the same, and there is only one caller,
so inline the function there.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

60f356e8 02/01/2011 07:01 pm Fabien Chouteau

SPARC: Fix Leon3 cache control

The "leon3_cache_control_int" (op_helper.c) function is called within leon3.c
which leads to segfault error with the global "env".

Now cache control is a CPU feature and everything is handled in op_helper.c.

Signed-off-by: Fabien Chouteau <>...

b04d9890 01/24/2011 10:54 pm Fabien Chouteau

SPARC: Emulation of Leon3

Leon3 is an open-source VHDL System-On-Chip, well known in space industry (more
information on http://www.gaisler.com).

Leon3 is made of multiple components available in the GrLib VHDL library.
Three devices are implemented: uart, timers and IRQ manager....

4a2ba232 01/24/2011 10:54 pm Fabien Chouteau

SPARC: Add asr17 register support

This register is activated by CPU_FEATURE_ASR17 in the feature field.

Signed-off-by: Fabien Chouteau <>
Signed-off-by: Blue Swirl <>

1b5f56b1 01/18/2011 11:34 pm Blue Swirl

sparc: fix NaN handling

Fix several bugs in NaN handling: * e in fcmpe* only changes qNaN handling * FCC is unchanged if an exception is raised * clear previous FTT before setting it

Reported-by: Mateusz Loskot <>
Signed-off-by: Blue Swirl <>

0fcec41e 12/28/2010 08:44 pm Aurelien Jarno

target-sparc: fix udiv(cc) and sdiv(cc)

Since commit 5a4bb580cdb10b066f9fd67658b31cac4a4ea5e5, Xorg crashes on
a Debian Etch image. The commit itself is fine, but it triggers a bug
due to wrong computation of flags for udiv(cc) and sdiv(cc).

This patch only compute cc_src2 for the cc version of udiv/sdiv. It...

d41160a3 12/19/2010 03:42 pm Blue Swirl

Sparc: implement monitor command 'info tlb'

Use existing dump_mmu() to implement monitor command 'info tlb'.

Signed-off-by: Blue Swirl <>

047b39e4 12/04/2010 10:51 pm Stefan Weil

target-sparc: Use fprintf_function (format checking)

This change was missing in commit
9a78eead0c74333a394c0f7bbfc4423ac746fcd5.

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

ef5e4ea5 12/03/2010 03:09 pm Peter Maydell

target-sparc: remove unused functions cpu_lock(), cpu_unlock()

9a78eead 10/30/2010 11:01 am Stefan Weil

target-xxx: Use fprintf_function (format checking)

fprintf_function uses format checking with GCC_FMT_ATTR.

Format errors were fixed in
  • target-i386/helper.c
  • target-mips/translate.c
  • target-ppc/translate.c

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>...

a88790a1 07/03/2010 09:48 am Paolo Bonzini

remove exec-all.h inclusion from cpu.h

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

10eb0cc0 07/03/2010 09:48 am Paolo Bonzini

move cpu_pc_from_tb to target-*/exec.h

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

fb170183 06/02/2010 11:08 pm Igor V. Kovalenko

sparc64: fix umul and smul insns

- truncate and sign or zero extend operands before multiplication
- factor out common code to gen_op_multiply() with parameter to sign/zero extend
- call gen_op_multiply from gen_op_umul and gen_op_smul

Signed-off-by: Igor V. Kovalenko <>...

09487205 06/02/2010 11:07 pm Igor V. Kovalenko

sparc64: fix udiv and sdiv insns

- truncate second operand to 32bit

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

0e2fa9ca 06/02/2010 11:06 pm Igor V. Kovalenko

sparc64: improve ldf and stf insns

- implemented block load/store primary/secondary with user privilege

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

b219094a 06/02/2010 11:06 pm Igor V. Kovalenko

sparc64: use symbolic name for MMU index v1

- use symbolic name for MMU index
v0->v1:
- change debug traces to DPRINTF_MMU
- fix debug trace function names

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

fe987e23 06/02/2010 11:05 pm Igor V. Kovalenko

sparc64: fix ldxfsr insn

- rearrange code to break from switch when appropriate
- allow deprecated ldfsr insn

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

1295001c 06/02/2010 11:03 pm Igor V. Kovalenko

sparc64: fix missing address masking v1

- address masking for ldqf and stqf insns
- address masking for lddf and stdf insns
- address masking for translating ASI (Ultrasparc IIi)
v0->v1:
- move arch-specific code to helpers and drop more ifdefs at call sites...

9168b3a5 06/02/2010 11:03 pm Igor V. Kovalenko

sparc64: fix tag access register on mmu traps

- set mmu tag access register on FAULT and PROT traps as well

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

da7ed379 05/30/2010 12:22 am Artyom Tarasenko

sparc32 SuperSPARC MMU Breakpoint Action register (SS-20 OBP fix)

SuperSPARC MMU Breakpoint Action register is used by OBP at boot

The patch allows booting Solaris and some other OS with
SPARCStation-20 OBP.

Signed-off-by: Artyom Tarasenko <>...

03ae77d6 05/29/2010 01:20 pm Blue Swirl

sparc64: fix user emulator build

Accesses with _nucleus prefix are not available when building user
emulators:
CC sparc64-linux-user/op_helper.o
cc1: warnings being treated as errors
/src/qemu/target-sparc/op_helper.c: In function 'helper_ldda_asi':...

54a3c0f0 05/29/2010 10:26 am Igor V. Kovalenko

sparc64: fix 128-bit atomic load from nucleus context v1

- change 128-bit atomic loads to reference nucleus context
v0->v1: dropped disassembler change
Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

664a65b0 05/22/2010 03:52 pm Igor V. Kovalenko

sparc64: flush translations on mmu context change

- two pairs of softmmu indexes bind softmmu tlb to cpu tlb in fault handlers
using value of DMMU primary and secondary context registers, so we need to
flush softmmu translations when context registers are changed...

9fd1ae3a 05/22/2010 03:51 pm Igor V. Kovalenko

sparc64: fix mmu context at trap levels above zero

- cpu_mmu_index return MMU_NUCLEUS_IDX if trap level is not zero
- cpu_get_tb_cpu_state: store trap level and primary context in flags
this allows to restart code translation when address translation is changed...

e2129586 05/22/2010 03:50 pm Igor V. Kovalenko

sparc64: fix dump_mmu to look for global bit in tte value instead of tag

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

2aae2b8e 05/22/2010 03:48 pm Igor V. Kovalenko

sparc64: fix pstate privilege bits

- refactor code to handle hpstate only if available for current cpu
- conditionally set hypervisor bit in hpstate register
- reorder softmmu indices so user accessable ones go first, translation context
macros supervisor() and hypervisor() adjusted as well...

b8e9fc06 05/22/2010 03:34 pm Igor V. Kovalenko

sparc64: generate data access exception on RW violation

- separate PRIV and PROT handling
- DPRINTF_MMU macro to clean up debug code
- dump mmu_idx, trap level and mmu context registers
along with address translation values

Signed-off-by: Igor V. Kovalenko <>...

0bfcd599 05/22/2010 11:02 am Blue Swirl

Fix %lld or %llx printf format use

Signed-off-by: Blue Swirl <>

70c48285 05/20/2010 10:58 pm Richard Henderson

target-sparc: Inline some generation of carry for ADDX/SUBX.

Computing carry is trivial for some inputs. By avoiding an
external function call, we generate near-optimal code for
the common cases of add+addx (double-word arithmetic) and
cmp+addx (a setcc pattern)....

5a4bb580 05/19/2010 10:04 pm Richard Henderson

target-sparc: Simplify ICC generation.

Use int32 types instead of target_ulong when computing ICC. This
simplifies the generated code for 32-bit host and 64-bit guest.
Use the same simplified expressions for ICC as were already used
for XCC in carry flag generation....

4c1a0d82 05/19/2010 10:03 pm Richard Henderson

target-sparc: Fix compilation with --enable-debug.

Return a target_ulong from compute_C_icc to match the width of the users.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

21ffd181 05/16/2010 11:33 am Blue Swirl

sparc: move DT and QT defines to op_helper.c

Signed-off-by: Blue Swirl <>

88c8e03f 05/16/2010 10:54 am Igor V. Kovalenko

sparc64: fix TT_WOTHER value

- fix off by one error in spill trap number bit for other window (must be bit 5)
- fixes invalid instruction issue with HelenOS

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

170f4c55 05/16/2010 10:54 am Igor V. Kovalenko

sparc64: fix mmu demap operand typo

- must use store address operand to demap, not store value

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

113c6106 05/12/2010 10:20 pm Stefan Weil

target-sparc: Fix wrong printf argument

cpu_get_ccr() returns a target_ulong, so a type cast is needed to avoid
wrong output on big endian hosts. We could also use TARGET_FMT_lx,
but that would print 8 instead of 2 digits.

Cc: Blue Swirl <>...

5a834bb4 05/09/2010 11:19 pm Blue Swirl

sparc: Fix lazy flag calculation on interrupts, refactor

Recalculate Sparc64 CPU flags on interrupts, otherwise some earlier
flags could be stored to pstate.

Refactor PSR/CCR/CWP handling: concentrate the actual
functions to op_helper.c.

Thanks to Igor Kovalenko for reporting....

275ea265 05/09/2010 06:40 pm Blue Swirl

sparc: lazy C flag calculation

Calculate only the carry flag for ADDX/SUBX instead of full
set of flags.

Thanks to Igor Kovalenko for spotting a bug with an earlier
version.

Signed-off-by: Blue Swirl <>

44505216 05/07/2010 07:14 pm Blue Swirl

sparc64: fix build with older gccs

Fix errors missed in 2065061ede22d401aae2ce995c3af54db9d28639:
CC sparc64-softmmu/helper.o
cc1: warnings being treated as errors
/src/qemu/target-sparc/helper.c: In function 'get_physical_address':
/src/qemu/target-sparc/helper.c:426: warning: 'context' may be used uninitialized in this function...

2065061e 05/06/2010 11:14 pm Igor V. Kovalenko

sparc64: handle asi referencing nucleus and secondary MMU contexts

- increase max supported MMU modes to 6
- handle nucleus context asi
- handle secondary context asi
- handle non-faulting loads from secondary context

Signed-off-by: Igor V. Kovalenko <>...

299b520c 05/06/2010 11:13 pm Igor V. Kovalenko

sparc64: implement global translation table entries v1

- match global tte against any context
- show global tte in MMU dump

v0->v1: added default case to switch statement in demap_tlb
- should fix gcc warning about uninitialized context variable

Signed-off-by: Igor V. Kovalenko <>...

060718c1 04/26/2010 08:23 pm Richard Henderson

target-sparc: Fix -singlestep.

Single-stepping was not properly updating npc, resulting in some
instructions being executed twice. In addition, we were emitting
dead code at the end of the TB.

Fix both by teaching gen_goto_tb to avoid goto_tb for single-step...

41db525e 04/23/2010 09:38 pm Richard Henderson

target-sparc: Fix address masking in ldqf and stqf.

Use address_mask on both addr and addr+8 in both these routines,
rather than explicit masking with 0xffffffff.

Reformulate address_mask to return a result, rather than masking
a pass-by-reference argument....

6ad6135d 04/18/2010 05:22 pm Blue Swirl

Fix harmless if statements with empty body, spotted by clang

These clang errors are harmless but worth fixing:
CC ppc-softmmu/usb-ohci.o
/src/qemu/hw/usb-ohci.c:1104:59: error: if statement has empty body [-Wempty-body]
ohci->ctrl_head, ohci->ctrl_cur);...

42a8aa83 04/17/2010 07:25 pm Richard Henderson

target-sparc: Free instruction temporaries.

Rather than creating new temporaries for constants, use the
ones created in disas_sparc_insn. Remember the temps created
there so that they can be freed at the end of the function.

Profile data collected by TCG while booting sparc-test kernel:...

058ed88c 04/17/2010 07:25 pm Richard Henderson

target-sparc: Fix TARGET_{PHYS,VIRT}_ADDR_SPACE_BITS.

The 32 and 64-bit definitions were swapped in the ifdef.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

cca1d527 04/17/2010 07:25 pm Blue Swirl

Sparc: fix PC/NPC during FPU traps

All FPU instructions can trap, so save PC/NPC state before
executing them.

Signed-off-by: Blue Swirl <>

d7da2a10 04/11/2010 10:47 pm Blue Swirl

Sparc: fix exceptions in delay slot

Fix a case where an exception happens with the
instruction in the delay slot.

Recovery of branch condition in the exception handling
code was not converted to TCG. Because the condition
was bogus, wrong NPC could be selected from the two...

1a7ff922 04/08/2010 10:34 pm Paolo Bonzini

remove TARGET_* defines from translate-all.c

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Aurelien Jarno <>

d4c430a8 03/17/2010 04:44 am Paul Brook

Large page TLB flush

QEMU uses a fixed page size for the CPU TLB. If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate...

3c7b48b7 03/12/2010 08:44 pm Paul Brook

Target specific usermode cleanup

Disable various target specific code that is only relevant to system emulation.

Signed-off-by: Paul Brook <>

4fcc562b 03/12/2010 08:34 pm Paul Brook

Remove cpu_get_phys_page_debug from userspace emulation

cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.

Signed-off-by: Paul Brook <>

52705890 03/12/2010 06:28 pm Richard Henderson

Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.

Removes a set of ifdefs from exec.c.

Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other
than Alpha. This will be used for page_find_alloc, which is
supposed to be using virtual addresses in the first place....

bc57c114 02/25/2010 08:26 pm Stefan Weil

target-sparc: fix --enable-debug build for 64 bit host

b551ec04ca45d1925417dd2ec7c1b7f115c84f1d fixed
the compilation for 32 bit hosts, but introduced
a new error for 64 bit hosts:

tcg_temp_new_ptr needs a matching tcg_temp_free_ptr.

Signed-off-by: Stefan Weil <>...

b551ec04 02/20/2010 01:09 pm Jay Foad

target-sparc: fix --enable-debug build

Use 32-bit arithmetic for the address offset calculation to fix a
build failure on 32-bit hosts.

Signed-off-by: Jay Foad <>
Signed-off-by: Blue Swirl <>