Statistics
| Branch: | Revision:

root / target-mips @ 6a1751b7

# Date Author Comment
a1fc6246 08/06/2013 02:09 pm Leon Alrae

target-mips: fix decoding of microMIPS POOL32Axf instructions

Fix incorrect assumption that DSP and non-DSP versions of the following
instructions have the same encoding:
MULT, MULTU, MADD, MADDU, MSUB, MSUBU, MFHI, MFLO, MTHI, MTLO.
Correct the existing (non-DSP) instructions and add DSP equivalents....

b9ac5d92 08/04/2013 12:33 am Yongbok Kim

target-mips: fix 34Kf configuration for DSP ASE

34Kf core does support DSP ASE.
CP0_Config3 configuration for 34Kf and description are wrong.

Please refer to MIPS32 34Kf(TM) Processor Core Datasheet

Signed-off-by: Yongbok Kim <>...

14a10fc3 07/29/2013 04:29 pm Andreas Färber

cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".

The reason for the failure is that CPUClass::kvm_fd is not yet...

b6a9f468 07/29/2013 08:48 am Petar Jovanovic

target-mips: fix mipsdsp_mul_q31_q31

Multiplication of two fractional word elements is not correct when sign
extension/promotion is needed. This change fixes it by adding correct
casts from unsigned to signed values.
In addition, the tests (dpaq_sa_l_w.c and dpsq_sa_l_w.c) have been extended...

d2e46d59 07/29/2013 01:31 am Stefan Weil

target-mips: Remove assignment to a variable which is never used

This assignment causes a compiler warning for compilations with the compiler
option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many...

d36c231f 07/29/2013 01:27 am Petar Jovanovic

target-mips: fix mipsdsp_trunc16_sat16_round

This change corrects rounding and saturation of Q31 fractional value in
mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the
corner case for PRECRQ_RS.PH, and this test case is also part of the change....

240ce26a 07/28/2013 07:33 pm James Hogan

target-mips: fix branch in likely delay slot tcg assert

When a branch delay slot contains another branch instruction, the code
generated raises an exception, however since is_branch==1,
handle_delay_slot() doesn't get called immediately. This means
ctx->bstate isn't set to BS_BRANCH, and the decoder continues decoding...

4877866e 07/28/2013 07:26 pm Petar Jovanovic

target-mips: fix multiplication in mipsdsp_rndq15_mul_q15_q15

Multiplication of Q15 fractional halfword vectors was incorrect in the
previous implementation of mipsdsp_rndq15_mul_q15_q15. It failed to take
element signs into account. This change fixes it, and it adds a test case...

986a2998 07/27/2013 01:04 am Andreas Färber

gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions

This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.

Semi-automatic conversion using, e.g.,
sed i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target*/gdbstub.c...

5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

Acked-by: Michael Walle <> (for lm32)
Acked-by: Max Filippov <> (for xtensa)
Signed-off-by: Andreas Färber <>

814ac26c 07/27/2013 12:24 am Andreas Färber

target-mips: Move cpu_gdb_{read,write}_register()

Signed-off-by: Andreas Färber <>

a0e372f0 07/27/2013 12:23 am Andreas Färber

cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs

CPUState::gdb_num_regs replaces num_g_regs.
CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.

Allows building gdb_register_coprocessor() for xtensa, too.

As a side effect this should fix coprocessor register numbering for SMP....

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

bdf7ae5b 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

ed2803da 07/23/2013 03:41 am Andreas Färber

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

f45748f1 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

Signed-off-by: Andreas Färber <>

a0762859 07/09/2013 10:33 pm Andreas Färber

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

91b1df8c 07/09/2013 10:33 pm Andreas Färber

cpu: Move reset logging to CPUState

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

6429db34 07/09/2013 10:33 pm Andreas Färber

target-mips: Change gen_intermediate_code_internal() argument to MIPSCPU

Also use bool type while at it.

Prepares for moving singlestep_enabled field to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

182735ef 07/09/2013 10:32 pm Andreas Färber

cpu: Make first_cpu and next_cpu CPUState

Move next_cpu from CPU_COMMON to CPUState.
Move first_cpu variable to qom/cpu.h.

gdbstub needs to use CPUState::env_ptr for now.
cpu_copy() no longer needs to save and restore cpu_next.

Acked-by: Paolo Bonzini <>...

6291ad77 07/09/2013 10:20 pm Peter Maydell

linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-user

The functions cpu_clone_regs() and cpu_set_tls() are not purely CPU
related -- they are specific to the TLS ABI for a a particular OS.
Move them into the linux-user/ tree where they belong....

6e42be7c 07/09/2013 10:20 pm Andreas Färber

cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

A transition from CPUFooState to FooCPU can be considered safe,
just like FooCPU::env access in the opposite direction.
The only benefit of the FOO_CPU() casts would be protection against
bogus CPUFooState pointers, but then surrounding code would likely...

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

c658b94f 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_unassigned_access() into a CPUState hook

Use it for all targets, but be careful not to pass invalid CPUState.
cpu_single_env can be NULL, e.g. on Xen.

Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

d8992825 05/20/2013 07:16 pm Petar Jovanovic

target-mips: clean-up in BIT_INSV

This is a small follow-up change to "fix incorrect behaviour for INSV".

It includes two minor modifications:

- sizefilter is constant so it can be moved inside of the block,
- several lines of the code are replaced with a call to deposit64....

1239b472 05/20/2013 07:16 pm Kwok Cheung Yeung

linux-user: Save the correct resume address for MIPS signal handling

The current ISA mode needs to be saved in bit 0 of the resume address.
If the current instruction happens to be in a branch delay slot, then
the address of the preceding jump instruction should be stored instead....

118d1e4f 05/19/2013 04:16 pm Petar Jovanovic

target-mips: set carry bit correctly in DSPControl register

First we need to clear the bit and then we set the given value.
Instruction ADDSC sets the bit and instruction ADDWC uses this bit.

Signed-off-by: Petar Jovanovic <>
Signed-off-by: Aurelien Jarno <>

0ba365f4 05/19/2013 04:10 pm Petar Jovanovic

target-mips: fix EXTPDP and setting up pos field in the DSPControl reg

This change makes sure that modifications of pos field in the DSPControl
register do not trash other bits in the register. This bug can be triggered
with the additional test case in mips32-dsp/extpdp.c in this commit....

489ed4bb 05/17/2013 08:29 pm Petar Jovanovic

target-mips: fix incorrect behaviour for EXTP

The mask for EXTP instruction when size=31 has not been correctly
calculated.

The test (mips32-dsp/extp.c) has been extended to include the case that
triggers the issue.

Signed-off-by: Petar Jovanovic <>...

c0f5f9ce 05/08/2013 07:46 pm Petar Jovanovic

target-mips: fix incorrect behaviour for INSV

Corner case for INSV instruction when size=32 has not been correctly
implemented. The mask for size should be one bit wider, and preparing the
filter variable should be aware of this case too.

The test for INSV has been extended to include the case that triggers the...

639eadb9 05/08/2013 07:03 pm Petar Jovanovic

target-mips: add missing check_dspr2 for multiply instructions

The emulator needs to check in hflags if DSP unit has been turned off before
it generates code for MUL_PH, MUL_S_PH, MULQ_S_W, and MULQ_RS_W.

Signed-off-by: Petar Jovanovic <>...

29851ee7 05/03/2013 12:50 pm Petar Jovanovic

target-mips: fix calculation of overflow for SHLL.PH and SHLL.QB

This change corrects and simplifies how discard is calculated for shift
left logical vector instructions. It is used to detect overflow and set bit
22 in the DSPControl register.

The existing tests (shll_ph.c, shll_qb.c) are extended with the corner cases...

b1ca31d7 04/15/2013 05:07 pm Petar Jovanovic

target-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR

The operands for MAQ_SA_W.PHL/MAQ_SA_W.PHR must in specified format.
Otherwise, the results are unpredictable. Once the operands were corrected
in the tests (part of this change), a bug in mipsdsp_mul_q15_q15 became...

8b758d05 03/17/2013 02:06 am Petar Jovanovic

target-mips: fix rndrashift_short_acc and code for EXTR_ instructions

Fix for rndrashift_short_acc to set correct value to higher 64 bits.
This change also corrects conditions when bit 23 of the DSPControl register
is set.

The existing test files have been extended with several examples that...

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

Signed-off-by: Andreas Färber <>

d8ed887b 03/12/2013 11:35 am Andreas Färber

exec: Pass CPUState to cpu_reset_interrupt()

Move it to qom/cpu.c to avoid build failures depending on include order
of cpu-qom.h and exec/cpu-all.h.

Change opaques of various ..._irq_handler() functions to the
appropriate CPU type to facilitate using cpu_reset_interrupt()....

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

Signed-off-by: Andreas Färber <>

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

084d0497 03/05/2013 12:58 pm Richard Henderson

mips-linux-user: Save and restore fpu and dsp from sigcontext

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

68473f15 03/05/2013 12:58 pm Richard Henderson

mips64-linux-user: Enable 64-bit address mode and fpu

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

26135ead 03/05/2013 02:02 am Richard Sandiford

target-mips: Fix accumulator selection for MIPS16 and microMIPS

Add accumulator arguments to gen_HILO and gen_muldiv, rather than
extracting the accumulator directly from ctx->opcode. The extraction
was only right for the standard encoding: MIPS16 doesn't have access...

20c334a7 03/04/2013 07:15 pm Petar Jovanovic

target-mips: fix DSP overflow macro and affected routines

The previous implementation incorrectly used same macro to detect overflow
for addition and subtraction. This patch makes distinction between these
two, and creates separate macros. The affected routines are changed...

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

Signed-off-by: Peter Maydell <>...

fadf9825 03/03/2013 04:28 pm Andreas Färber

cpu: Introduce ENV_OFFSET macros

Introduce ENV_OFFSET macros which can be used in non-target-specific
code that needs to generate TCG instructions which reference CPUState
fields given the cpu_env register that TCG targets set up with a
pointer to the CPUArchState struct....

a345481b 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for sign-issue in MULQ_W helper

Correct sign-propagation before multiplication in MULQ_W helper.
The change also fixes previously incorrect expected values in the
tests for MULQ_RS.W and MULQ_S.W.

Signed-off-by: Petar Jovanovic <>...

9c19eb1e 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for incorrect multiplication with MULQ_S.PH

The change corrects sign-related issue with MULQ_S.PH. It also includes
extension to the already existing test which will trigger the issue.

Signed-off-by: Petar Jovanovic <>
Signed-off-by: Aurelien Jarno <>

ce1dd5d1 02/23/2013 07:25 pm Richard Henderson

target-mips: Use mul[us]2 in [D]MULT[U] insns

Cc: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

78ce64f4 02/16/2013 03:50 pm Andreas Färber

target-mips: Move TCG initialization to MIPSCPU initfn

Make mips_tcg_init() non-static and add tcg_enabled() check to suppress
it for qtest.

Signed-off-by: Andreas Färber <>

c1caf1d9 02/16/2013 03:50 pm Andreas Färber

target-mips: Introduce QOM realizefn for MIPSCPU

Introduce a realizefn and set realized = true from cpu_mips_init().

Signed-off-by: Andreas Färber <>

6f0af304 02/01/2013 12:42 am Petar Jovanovic

target-mips: enable access to DSP ASE if implemented

compute_hflags() will reset DSP h-flags, so MX bit should be initially set
for usermode in cpu_state_reset() if DSP ASE is implemented.
This change will bring back user-mode support for DSP ASE, since one of the...

f54c35d1 02/01/2013 12:42 am Richard Sandiford

target-mips: Unfuse {,N}M{ADD,SUB}.fmt

Turn MADD.fmt, MSUB.fmt, NMADD.fmt and NMSUB.fmt from fused to unfused
operations, so that they behave in the same way as a separate multiplication
and addition. The instructions were only fused in early MIPS IV processors....

c728154b 02/01/2013 12:40 am Richard Sandiford

target-mips: Sign-extend the result of LWR

Sign-extend the result of LWR, as is already done for LWL. This is necessary
in the case where LWR loads the full word (i.e. the address is actually
aligned). In the other cases, it is implementation defined whether the...

17e8fef1 02/01/2013 12:38 am Richard Sandiford

target-mips: Fix signedness of loads in MIPS16 RESTOREs

Make RESTORE use sign-extending rather than zero-extending loads.

Signed-off-by: Richard Sandiford <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

df6126a7 02/01/2013 12:30 am Aurelien Jarno

target-mips: implement DSP (d)append sub-class with TCG

DSP instruction from the (d)append sub-class can be implemented with
TCG. Use a different function for these instructions are they are quite
different from compare-pick sub-class.

Fix BALIGN instruction for negative value, where the value should be...

0a16c79c 02/01/2013 12:30 am Aurelien Jarno

target-mips: use DSP unions for reduction add instructions

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

75d012ac 02/01/2013 12:29 am Aurelien Jarno

target-mips: use DSP unions for unary DSP operators

This allow to reduce the number of macros.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

6de0e6c1 02/01/2013 12:29 am Aurelien Jarno

target-mips: use DSP unions for binary DSP operators

This allow to reduce the number of macros.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

652613ab 02/01/2013 12:29 am Aurelien Jarno

target-mips: add unions to access DSP elements

Instead of playing with bit shifting, add two unions (one for 32-bit
values, one for 64-bit ones) to access all the DSP elements with the
correct type.

This make the code easier to read and less error prone, and allow GCC...

ad153f15 02/01/2013 12:29 am Aurelien Jarno

target-mips: generate a reserved instruction exception on CPU without DSP

On CPU without DSP ASE support, a reserved instruction exception (instead of
a DSP ASE sate disabled) should be generated.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

d75c135e 02/01/2013 12:29 am Aurelien Jarno

target-mips: copy insn_flags in DisasContext

Copy insn_flags in DisasContext to avoid passing a CPUMIPSState pointer
to subroutines, as suggested by Richard Henderson. Change subroutines to
use this new field and remove the first argument.

Reviewed-by: Richard Henderson <>...

f7d2072e 02/01/2013 12:29 am Aurelien Jarno

target-mips: fix DSP loads with rd = 0

When rd is 0, which still need to do the actually load to possibly
generate a TLB exception.

Reviewed-by: Eric Johnson <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

38d8f5c8 01/15/2013 05:09 am Andreas Färber

exec: Return CPUState from qemu_get_cpu()

Move the declaration to qemu/cpu.h and add documentation.
The implementation still depends on CPUArchState for CPU iteration.

Signed-off-by: Andreas Färber <>

ce3960eb 01/15/2013 05:09 am Andreas Färber

cpu: Move nr_{cores,threads} fields to CPUState

To facilitate the field movements, pass MIPSCPU to malta_mips_config();
avoid that for mips_cpu_map_tc() since callers only access MIPS Thread
Contexts, inside TCG helpers.

Signed-off-by: Andreas Färber <>

66afd1ad 01/15/2013 05:09 am Andreas Färber

target-mips: Clean up mips_cpu_map_tc() documentation

This function will be touched again soon, so a good understanding of env
vs. other helps. Adopt gtk-doc style.

Signed-off-by: Andreas Färber <>
Reviewed-by: Eric Johnson <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

da1a4cef 01/08/2013 12:58 pm Petar Jovanovic

target-mips: Fix helper and tests for dot/cross-dot product instructions

Helper function for dpa_w_ph, dpax_w_ph, dps_w_ph and dpsx_w_ph incorrectly
defines halfword vector elements as unsigned values. This results in wrong
output which is not triggered in the tests as they also follow this logic....

e320d05a 01/08/2013 12:55 pm Stefan Weil

target-mips: Replace macros by inline functions

The macros RESTORE_ROUNDING_MODE and RESTORE_FLUSH_MODE silently used
variable env from their callers. Using inline functions with env passed
as a function argument is more transparent.

This modification was proposed by Peter Maydell....

e1a4019c 01/08/2013 12:49 pm Eric Johnson

target-mips: Allow DSP access to be disabled once enabled.

Clear the DSP hflags at the start of compute_hflags. Otherwise access
is not properly disabled once enabled.

Signed-off-by: Eric Johnson <>
Signed-off-by: Aurelien Jarno <>

0f0b9398 01/01/2013 01:02 pm 陳韋任 (Wei-Ren Chen)

target-mips: Use EXCP_SC rather than a magic number

From the discussion on the ML [1], the exception limit defined by
magic number 0x100 is actually EXCP_SC defined in cpu.h. Replace the
magic number with EXCP_SC. Remove "#if 1 .. #endif" as well.

[1] http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03080.html...

c4aaba92 01/01/2013 12:55 pm Jovanovic, Petar

target-mips: Make repl_ph to sign extend to target-long

The immediate value is 9bits, should sign-extend to 16bits. The return value to
register should sign-extend to target_long, as Richard says, removing an
unnecessary cast works fun.

Signed-off-by: Dongxue Zhang <>...

fe65a1fa 01/01/2013 12:50 pm Dongxue Zhang

Fix my email address

Fix my email address, last time it's wrong.

Signed-off-by: Dongxue Zhang <>
Signed-off-by: Aurelien Jarno <>

79eb8392 01/01/2013 12:16 pm Stefan Weil

target-mips: Remove semicolon from macro definition

Macro RESTORE_FLUSH_MODE is similar to RESTORE_ROUNDING_MODE
but included a semicolon.

The code which uses that macro also includes a semicolon,
so the result was an empty statement.

Remove the superfluous semicolon from the macro definition....

b8abbbe8 01/01/2013 12:11 pm Petar Jovanovic

target-mips: Fix for helpers for EXTR_* instructions

The change removes some unnecessary and incorrect code for EXTR_S.H.
Further, it corrects the mask for shift value in the EXTR_ instructions. It also
extends the existing tests so they trigger the issues corrected with the change....

eec8972a 01/01/2013 12:10 pm Petar Jovanovic

target-mips: Fix incorrect reads and writes to DSPControl register

Upper 4 bits of ccond (bits 31..28 ) of DSPControl register are not used in
the MIPS32 architecture. They are used in the MIPS64 architecture. For MIPS32
these bits must be written as zero, and return zero on read....

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

14cccb61 12/19/2012 09:31 am Paolo Bonzini

qom: move include files to include/qom/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

76cad711 12/19/2012 09:29 am Paolo Bonzini

build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <>

a8a826a3 12/16/2012 10:35 am Blue Swirl

exec: refactor cpu_restore_state

Refactor common code around calls to cpu_restore_state().

tb_find_pc() has now no external users, make it static.

Signed-off-by: Blue Swirl <>

536b558f 12/08/2012 07:50 pm Blue Swirl

Merge branch 'master' of git.qemu-project.org:/pub/git/qemu

  • 'master' of git.qemu-project.org:/pub/git/qemu:
    target-mips: Fix incorrect shift for SHILO and SHILOV
    target-mips: Fix incorrect code and test for INSV
    xilinx_uartlite: Accept input after rx FIFO pop...
ab1103de 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_instr_start from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

25983cad 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_pc from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

c9c99c22 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_icount from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

19e6c50d 12/06/2012 09:12 am Petar Jovanovic

target-mips: Fix incorrect shift for SHILO and SHILOV

helper_shilo has not been shifting an accumulator value correctly for negative
values in 'shift' field. Minor optimization for shift=0 case.
This change also adds tests that will trigger issue and check for regressions....

34f5606e 12/06/2012 09:10 am Petar Jovanovic

target-mips: Fix incorrect code and test for INSV

Content of register rs should be shifted for pos before applying a mask.
This change contains both fix for the instruction and to the existing test.

Signed-off-by: Petar Jovanovic <>
Reviewed-by: Eric Johnson <>...

31abf924 11/24/2012 02:35 pm Aurelien Jarno

target-mips: remove POOL48A from the microMIPS decoding

Signed-off-by: Aurelien Jarno <>

d132c79f 11/24/2012 02:19 pm 陳韋任 (Wei-Ren Chen)

target-mips: Add comments on POOL32Axf encoding

Current QEMU MIPS POOL32AXF encoding comes from microMIPS32
and microMIPS32 DSP. Add comment here to help reading.

Signed-off-by: Chen Wei-Ren <>
Reviewed-by: Eric Johnson <>...

211da992 11/24/2012 02:19 pm 陳韋任 (Wei-Ren Chen)

target-mips: Clean up microMIPS32 major opcode

I check MIPS microMIPS manual [1], and found the major opcode might
be wrong. I add a comment to explicitly indicate what manual I am refering
to, and according that manual I remove microMIPS32 major opcodes 0x1f....
92414b31 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

efd7f486 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

6801038b 11/15/2012 03:48 pm 陳韋任 (Wei-Ren Chen)

target-mips: fix wrong microMIPS opcode encoding

While reading microMIPS decoding, I found a possible wrong opcode
encoding. According to [1] page 166, the bits 13..12 for MULTU is
0x01 rather than 0x00. Please review, thanks.

[1] MIPS Architecture for Programmers VolumeIV-e: The MIPS DSP...

7c2c3ea3 11/11/2012 05:05 pm Eric Johnson

target-mips: Fix seg fault for LUI when MIPS_DEBUG_DISAS==1.

The call to gen_logic_imm for OPC_LUI passes -1 for rs. This
causes the MIPS_DEBUG statement to seg fault due to the deference
of regnames[rs]. This patch fixes that.

Signed-off-by: Eric Johnson <>...

f4359b9f 11/10/2012 03:49 pm Blue Swirl

disas: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Richard Henderson <>
Acked-by: Aurelien Jarno <>
Acked-by: Guan Xuetao <>

1cfd981f 11/05/2012 09:02 am Blue Swirl

target-mips: use ULL for 64 bit constants

Fix build on a 32 bit host:
CC mips-softmmu/target-mips/dsp_helper.o
/src/qemu/target-mips/dsp_helper.c: In function 'helper_dextr_rs_w':
/src/qemu/target-mips/dsp_helper.c:3556: error: integer constant is too large for 'long' type...

98c8a73b 11/01/2012 06:12 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  • afaerber/qom-cpu: (35 commits)
    target-i386: Pass X86CPU to kvm_handle_halt()
    target-i386: Pass X86CPU to kvm_get_mp_state()
    cpu: Move thread_id to CPUState
    cpus: Pass CPUState to run_on_cpu()...
bc3e45e1 10/31/2012 11:20 pm Aurelien Jarno

target-mips: fix TLBR wrt SEGMask

Like r4k_map_address(), r4k_helper_tlbp() should use SEGMask to mask the
address.

Signed-off-by: Aurelien Jarno <>

286d52eb 10/31/2012 11:20 pm Aurelien Jarno

target-mips: don't flush extra TLB on permissions upgrade

If the guest uses a TLBWI instruction for upgrading permissions, we
don't need to flush the extra TLBs. This improve boot time performance
by about 10%.

Signed-off-by: Aurelien Jarno <>