Statistics
| Branch: | Revision:

root / target-mips / translate.c @ 5b50e790

History | View | Annotate | Download (474.9 kB)

# Date Author Comment
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 <>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2d2826b9 10/31/2012 11:20 pm Aurelien Jarno

target-mips: don't use local temps for store conditional

Store conditional operations only need local temps in user mode. Fix
the code to use temp local only in user mode, this spares two memory
stores in system mode.

At the same time remove a wrong a wrong copied & pasted comment,...

acf12465 10/31/2012 11:20 pm Aurelien Jarno

target-mips: implement movn/movz using movcond

Avoid the branches in movn/movz implementation and replace them with
movcond. Also update a wrong command.

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

51127181 10/31/2012 11:20 pm Aurelien Jarno

target-mips: optimize ddiv/ddivu/div/divu with movcond

The result of a division by 0, or a division of INT_MIN by -1 in the
signed case, is unpredictable. Just replace 0 by 1 in that case so that
it doesn't trigger a floating point exception on the host....

e0d002f1 10/31/2012 11:20 pm Aurelien Jarno

target-mips: use deposit instead of hardcoded version

Use the deposit op instead of and hardcoded bit field insertion. It
allows the host to emit the corresponding instruction if available.

At the same time remove the (lsb > msb) test. The MIPS64R2 instruction...

2910c6cb 10/31/2012 11:20 pm Aurelien Jarno

target-mips: cleanup load/store operations

Load/store operations use macros for historical reasons. Now that there
is no point in keeping them, replace them by direct calls to qemu_ld/st.

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

3cee3050 10/31/2012 11:20 pm Aurelien Jarno

target-mips: optimize load operations

Only allocate t1 when needed.

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

fc40787a 10/31/2012 11:20 pm Aurelien Jarno

target-mips: implement unaligned loads using TCG

Load/store from helpers should be avoided as they are quite
inefficient. Rewrite unaligned loads instructions using TCG and
aligned loads. The number of actual loads operations to implement
an unaligned load instruction is reduced from up to 8 to 1....

4636401d 10/31/2012 11:20 pm Aurelien Jarno

target-mips: correctly restore btarget upon exception

When the CPU state is restored through retranslation after an exception,
btarget should also be restored.

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

1e0e239a 10/31/2012 11:20 pm Aurelien Jarno

target-mips: do not save CPU state when using retranslation

When the CPU state after a possible retranslation is going to be handled
through code retranslation, we don't need to save the CPU state before.

Reviewed-by: Richard Henderson <>...

b3d6cd44 10/31/2012 11:20 pm Aurelien Jarno

target-mips: use the softfloat floatXX_muladd functions

Use the new softfloat floatXX_muladd() functions to implement the madd,
msub, nmadd and nmsub instructions. At the same time replace the name of
the helpers by the name of the instruction, as the only reason for the...

40e3acc1 10/31/2012 11:20 pm Aurelien Jarno

target-mips: remove #if defined(TARGET_MIPS64) in opcode enums

All switch() decoding instruction have a default entry, so it is possible
to have unused enum entries. Remove conditional definitions of MIPS64
opcode enums, as it only makes the code less readable....

b53371ed 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP accumulator instructions

Add MIPS ASE DSP Accumulator and DSPControl Access instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

26690560 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP compare-pick instructions

Add MIPS ASE DSP Compare-Pick instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

a22260ae 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP multiply instructions

Add MIPS ASE DSP Multiply instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

1cb6686c 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP bit/manipulation instructions

Add MIPS ASE DSP Bit/Manipulation instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

77c5fa8b 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP GPR-based shift instructions

Add MIPS ASE DSP GPR-Based Shift instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

461c08df 10/31/2012 10:37 pm Jia Liu

target-mips: Add ASE DSP arithmetic instructions

Add MIPS ASE DSP Arithmetic instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

9b1a1d68 10/31/2012 10:33 pm Jia Liu

target-mips: Add ASE DSP load instructions

Add MIPS ASE DSP Load instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

e45a93e2 10/31/2012 09:24 pm Jia Liu

target-mips: Add ASE DSP branch instructions

Add MIPS ASE DSP Branch instructions.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

4133498f 10/31/2012 09:24 pm Jia Liu

Use correct acc value to index cpu_HI/cpu_LO rather than using a fix number

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

853c3240 10/31/2012 09:24 pm Jia Liu

target-mips: Add ASE DSP resources access check

Add MIPS ASE DSP resources access check.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

d73ee8a2 10/28/2012 03:54 pm Richard Henderson

target-mips: Use TCG registers for the FPU.

With normal FP, this doesn't have much affect on the generated code,
because most of the FP operations are not CONST/PURE, and so we spill
registers in about the same frequency as the explicit load/stores.

But with Loongson multimedia instructions, which are all integral and...

fdefe51c 09/27/2012 10:38 pm Richard Henderson

Emit debug_insn for CPU_LOG_TB_OP_OPT as well.

For all targets that currently call tcg_gen_debug_insn_start,
add CPU_LOG_TB_OP_OPT to the condition that gates it.

This is useful for comparing optimization dumps, when the
pre-optimization dump is merely noise....

bd277fa1 09/19/2012 10:40 pm Richard Henderson

target-mips: Implement Loongson Multimedia Instructions

Implements all of the COP2 instructions except for the S<cond>
family of comparisons. The documentation is unclear for those.

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

e1050a76 09/19/2012 10:40 pm Richard Henderson

target-mips: Set opn in gen_ldst_multiple.

Used by MIPS_DEBUG, when enabled.

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

9fa77488 09/19/2012 10:40 pm Richard Henderson

target-mips: Fix MIPS_DEBUG.

The macro uses the DisasContext. Pass it around as needed.

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

fb7729e2 09/19/2012 10:40 pm Richard Henderson

target-mips: Always evaluate debugging macro arguments

this will prevent some of the compilation errors with debugging
enabled from creeping back in.

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

895c2d04 09/15/2012 08:51 pm Blue Swirl

target-mips: switch to AREG0 free mode

Add an explicit CPUState parameter instead of relying on AREG0
and switch to AREG0 free mode.

Signed-off-by: Blue Swirl <>
Acked-by: Aurelien Jarno <>

03e6e501 09/08/2012 02:37 am Maciej W. Rozycki

MIPS/user: Fix reset CPU state initialization

This change updates the CPU reset sequence to use a common piece of code
that figures out CPU state flags, fixing the problem with MIPS_HFLAG_COP1X
not being set where applicable that causes floating-point MADD family...
36c6711b 08/27/2012 11:18 pm Eric Johnson

target-mips: allow microMIPS SWP and SDP to have RD equal to BASE

The microMIPS SWP and SDP instructions do not modify GPRs. So their
behavior is well defined when RD equals BASE. The MIPS Architecture
Verification Programs (AVPs) check that they work as expected. This...

2e15497c 08/27/2012 11:17 pm Eric Johnson

target-mips: add privilege level check to several Cop0 instructions

The MIPS Architecture Verification Programs (AVPs) check privileged
instructions for the required privilege level. These changes are needed
to pass the AVP suite.

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

b3167288 08/27/2012 01:17 pm Richard Henderson

mips-linux-user: Always support rdhwr.

The kernel will emulate this instruction if it's not supported
natively. This insn is used for TLS, among other things, and
so is required by modern glibc.

Signed-off-by: Richard Henderson <>
Cc: Riku Voipio <>...

05168674 08/27/2012 01:17 pm Richard Henderson

target-mips: Streamline indexed cp1 memory addressing.

We've already eliminated both base and index being zero.

Signed-off-by: Aurelien Jarno <>

13d24f49 08/27/2012 01:03 pm Richard Sandiford

Fix order of CVT.PS.S operands

The FS input to CVT.PS.S is the high half and FT is the low half.
tcg_gen_concat_i32_i64 takes the low half first, so the operands
were in the wrong order.

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

d22d7289 08/27/2012 01:03 pm Richard Sandiford

Fix operands of RECIP2.S and RECIP2.PS

Read the second input operand of RECIP2.S and RECIP2.PS from FT rather
than FD. RECIP2.D is already correct.

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

94159135 08/23/2012 06:21 pm Meador Inge

target-mips: Enable access to required RDHWR hardware registers

While running in the usermode emulator all of the required*
MIPS32r2 RDHWR hardware registers should be accessible (the
Linux kernel enables access to these same registers). Note
that these registers are still enabled when the MIPS ISA is...

f1cb0951 08/09/2012 09:36 pm Nathan Froyd

MIPS: Correct FCR0 initialization

This change addresses a problem where QEMU incorrectly traps on
floating-point MADD group instructions with SIGILL, at least while
emulating MIPS32r2 processors. These instructions use the COP1X major
opcode and include ones like:...
3bd4122e 06/05/2012 12:00 am Andreas Färber

target-mips: Use cpu_reset() in cpu_mips_init()

Commit 0f71a7095db6bc055bc5bb520d85ea650cca8a33 (target-mips: QOM'ify
CPU) hooked up cpu_state_reset() to CPUClass::reset(). Dropping the
introduction of subclasses for 1.1, due to mips_def_t the reset code...

30bf942d 06/05/2012 12:00 am Andreas Färber

target-mips: Let cpu_mips_init() return MIPSCPU

Turn cpu_init macro into a static inline function returning CPUMIPSState
for backwards compatibility.

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

d7f66b52 05/19/2012 06:51 pm Richard Sandiford

mips: Fix BC1ANY24F instructions

There's some dodgy application of De Morgan's law in the emulation
of the MIPS BC1ANY24F instructions: they end up branching only
if all CCs are false, rather than if one CC is.

Tested on mips64-linux-gnu, where it fixes the GCC MIPS3D tests....

0f71a709 04/30/2012 12:32 pm Andreas Färber

target-mips: QOM'ify CPU

Embed CPUMIPSState as first member of QOM MIPSCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

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

5b0c40f7 04/30/2012 12:32 pm Andreas Färber

target-mips: Start QOM'ifying CPU init

Move code not dependent on mips_def_t from cpu_mips_init() into a
QOM initfn, as a start.

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

7db13fae 03/14/2012 11:20 pm Andreas Färber

target-mips: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUMIPSState/g" target-mips/*.[hc]
sed -i "s/#define CPUMIPSState/#define CPUState/" target-mips/cpu.h

Signed-off-by: Andreas Färber <>
Acked-by: Anthony Liguori <>

1bba0dc9 03/14/2012 11:20 pm Andreas Färber

Rename cpu_reset() to cpu_state_reset()

Frees the identifier cpu_reset for QOM CPUs (manual rename).

Don't hide the parameter type behind explicit casts, use static
functions with strongly typed argument to indirect.

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

0056c093 02/28/2012 11:33 pm Stefan Weil

target-mips: Clean includes

Remove some include statements which are not needed.

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

9e56e756 09/06/2011 12:09 pm Edgar E. Iglesias

mips: Initialize MT state at reset

Only TC0 on VPE0 is active after reset. All other VPEs and
TCs start in sleep.

Signed-off-by: Edgar E. Iglesias <>

5a25ce94 09/06/2011 12:09 pm Edgar E. Iglesias

mips: Hook in more reg accesses via mttr/mftr

Signed-off-by: Edgar E. Iglesias <>

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

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

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

b835e919 01/24/2011 09:52 pm Aurelien Jarno

target-mips: fix save_cpu_state() calls

The rule is:
- don't save PC if the exception is only triggered by softmmu.
- save PC if the exception can be triggered by an helper.

Fix a 64-bit kernel crash when loading modules.

Signed-off-by: Aurelien Jarno <>

55807224 01/18/2011 01:32 pm Edgar E. Iglesias

mips: Break TBs after mfc0_count

Break the TB after reading the count register. This makes it
possible to take timer interrupts immediately after a read of
a possibly expired timer.

Signed-off-by: Edgar E. Iglesias <>

9ed5726c 12/22/2010 12:14 pm Nathan Froyd

target-mips: fix translation of MT instructions

The translation of dmt/emt/dvpe/evpe was doing the moral equivalent of:

int x;
... /* no initialization of x */
x = f (x);

which confused later bits of TCG rather badly, leading to crashes.

Fix the helpers to only return results (those instructions have no...

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

2abf314d 10/13/2010 09:43 pm Blue Swirl

mips: avoid write only variables

Compiling with GCC 4.6.0 20100925 produced a lot of warnings like:
/src/qemu/target-mips/translate.c: In function 'gen_ld':
/src/qemu/target-mips/translate.c:1039:17: error: variable 'opn' set but not used [-Werror=unused-but-set-variable]...

671b0f36 07/31/2010 06:14 pm Hervé Poussineau

Correctly identify multiple cpus in SMP systems

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Aurelien Jarno <>

5dc5d9f0 07/25/2010 05:54 pm Aurelien Jarno

mips: more fixes to the MIPS interrupt glue logic

Commit 36388314febad3d7675ab919287f03733a560ff6 moved most of the
interrupt logic to cpu-exec.c. Remove the remaining useless code
and fix software interrupts.

Signed-off-by: Aurelien Jarno <>...

161f85e6 07/11/2010 11:24 am Aurelien Jarno

target-mips: add loongson 2E & 2F integer instructions

This patch adds support for loongson 2E & 2F instructions. They are the
same instructions, but differ by the opcode encoding.

Signed-off-by: Aurelien Jarno <>

afa88c3a 07/02/2010 12:45 am Aurelien Jarno

target-mips: add Loongson support prefetch

Loongson CPU uses a load to zero register for prefetch.
Emulate it as a NOP.

Signed-off-by: Aurelien Jarno <>

5c13fdfd 07/01/2010 08:48 am Aurelien Jarno

target-mips: split load and store

Signed-off-by: Aurelien Jarno <>

6fbab869 06/30/2010 09:00 pm Aurelien Jarno

target-mips: fix DINSU instruction

Signed-off-by: Aurelien Jarno <>

aa8f4009 06/30/2010 12:26 am Aurelien Jarno

target-mips: enable movn/movz on loongson 2E & 2F

Signed-off-by: Aurelien Jarno <>

33087598 06/10/2010 12:37 am Stefan Weil

target-mips: Fix compilation

TCGv t1 needs tcg_temp_free instead of tcg_temp_free_i32.

Cc: Nathan Froyd <>
Cc: Aurelien Jarno <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

8153667c 06/09/2010 05:10 pm Nathan Froyd

target-mips: refactor c{, abs}.cond.fmt insns

Move all knowledge about coprocessor-checking and register numbering
into the gen_cmp* helper functions.

Signed-off-by: Nathan Froyd <>
Signed-off-by: Aurelien Jarno <>

620e48f6 06/09/2010 05:10 pm Nathan Froyd

target-mips: mips16 cleanups

Change code handling mips16-specific branches to use ISA-neutral special
opcodes. Since there are several places where the delay slot
requirements for microMIPS branches differ from mips16 branches, using
opcodes is easier than checking hflags, then checking mips16...

3c824109 06/09/2010 05:10 pm Nathan Froyd

target-mips: microMIPS ASE support

Add instruction decoding for the microMIPS ASE. All we do is decode and
then forward to the existing gen_* routines.

Signed-off-by: Nathan Froyd <>
Signed-off-by: Aurelien Jarno <>