Statistics
| Branch: | Revision:

root / target-microblaze / translate.c @ f4359b9f

History | View | Annotate | Download (57.7 kB)

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

b8c6a5d9 11/08/2012 06:42 pm Peter Crosthwaite

microblaze: translate.c: Fix swaph decoding

The swaph instruction was not decoding correctly. s/1e1/1e2 on the
9 LSBs on the instruction decode.

Reported-by: David Holsgrove <>
Signed-off-by: Peter Crosthwaite <>...

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

64254eba 09/15/2012 08:44 pm Blue Swirl

target-microblaze: 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 <>

71547a3b 06/21/2012 09:45 pm Blue Swirl

qemu-log: use LOG_UNIMP for some target CPU cases

Use LOG_UNIMP for some target CPU cases.

Signed-off-by: Blue Swirl <>
Acked-by: Alexander Graf <>

083dbf48 06/07/2012 11:12 am Peter A. G. Crosthwaite

target-microblaze: fix swx build breakage

The lazy initialisation of r_check was throwing an error on --enable-debug.
Removed the lazy initialisation of r_check and swx_addr.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

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

Kill off cpu_state_reset()

In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset()
was renamed to cpu_state_reset(), to allow introducing a new cpu_reset()
that would operate on QOM objects.

All callers have been updated except for one in target-mips, so drop all...

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

target-microblaze: Let cpu_mb_init() return MicroBlazeCPU

Since qemu_init_vcpu() is no-op for CONFIG_USER_ONLY drop the env
variable that is now unused there.

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

8cc9b43f 06/04/2012 11:19 am Peter A. G. Crosthwaite

target-microblaze: lwx/swx: first implementation

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

ace2e4da 05/18/2012 01:17 pm Peter A. G. Crosthwaite

target-microblaze: impelemented swapx instructions

Implemented the swapb and swaph byte/halfword reversal instructions added
to microblaze v8.30

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

b77f98ca 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU

Embed CPUMBState as first member of QOM MicroBlazeCPU.

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

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>...

61b6208f 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU reset

Move code from cpu_state_reset() to QOM mb_cpu_reset().

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>

d0e71ef5 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU init

Move code from cpu_mb_init() to a QOM initfn.

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>
[AF: Leave cpu_reset() call in cpu_mb_init()]

dadc1064 04/12/2012 10:56 am Peter A. G. Crosthwaite

target-microblaze: added PetaLogix copyright

Microblaze cpu development has been driven and funded by PetaLogix. Added (c)
PetaLogix line accordingly.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

68cee38a 03/14/2012 11:20 pm Andreas Färber

target-microblaze: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUMBState/g" target-microblaze/*.[hc]
sed -i "s/#define CPUMBState/#define CPUState/" target-microblaze/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 <>...

94598c1d 02/28/2012 11:33 pm Stefan Weil

target-microblaze: Clean includes

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

Signed-off-by: Stefan Weil <>

9f6113c7 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Break the tb at memory barriers

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

48b5e96f 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Add support for the clz insn

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

5818dee5 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Emulate the hw stackprotector

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

4abf79a4 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in target sub directory

Cc: Richard Henderson <>
Cc: Edgar E. Iglesias <>
Cc: Aurelien Jarno <>
Cc: Alexander Graf <>
Cc: Aurelien Jarno <>
Cc: Blue Swirl <>...

97b833c5 08/25/2011 11:44 pm Edgar E. Iglesias

microblaze: Make the MSR PVR bit non writable

Instead of hardcoding it to 1.

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

8a84fc6b 08/25/2011 11:44 pm Edgar E. Iglesias

microblaze: Add an MSR_PVR constant and use it.

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

927d7217 07/31/2011 07:40 am Peter A. G. Crosthwaite

microblaze: Add missing call to qemu_init_vcpu.

Fixes emulation with io-thread.

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

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

6d76d23e 04/12/2011 01:48 am Edgar E. Iglesias

microblaze: Add partial decoding of stream insns

Based on a patch from: Alejandro Cabrera <>

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

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

4ff9786c 04/03/2011 10:42 pm Stefan Weil

Fix trivial "endianness bugs"

Replace endianess -> endianness.

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

6c5f738d 02/10/2011 01:46 am Edgar E. Iglesias

microblaze: Handle singlestepping over direct jmps

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

5d0bb823 01/23/2011 04:52 am Edgar E. Iglesias

microblaze: cleanup helper_addkc

Remove unused addition and rename to helper_carry.

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

e0a42ebc 01/22/2011 01:39 pm Edgar E. Iglesias

microblaze: Improve subkc

Move code from the helper into the translator. The remaining
helper parts can reuse helper_addkc, making it possible to
remove helper_subkc entirely.

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

7e9e4330 01/22/2011 01:35 pm Edgar E. Iglesias

microblaze: Fix 3rd addkc arg when rd is r0

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

40cbf5b7 01/22/2011 01:02 pm Edgar E. Iglesias

microblaze: Improve addkc

  • Optimize handling when carry is not updated.
  • Optimize handling for adds with nop semantics.
  • Move code from helper_addkc to the translator making
    helper_addkc PURE and CONST.

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

2accfb5f 01/22/2011 01:00 pm Edgar E. Iglesias

microblaze: Remove debug leftovers.

No functional changes.

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

ee8b246f 01/22/2011 12:57 pm Edgar E. Iglesias

microblaze: Reorganize for future patches

No functional changes.

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

9f8beb66 01/20/2011 12:18 am Edgar E. Iglesias

microblaze: Add support for load/store reversed

Load/store reversed (lwr/swr) are insns that endian translate
the sub-word part of the address and byteswap the data lanes.

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

9ef55357 01/19/2011 11:48 pm Edgar E. Iglesias

microblaze: Tweak comment, fast cases -> common cases

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

844bab60 01/14/2011 01:30 pm Edgar E. Iglesias

microblaze: Improve unconditional direct branching

Avoid emitting conditional tcg operations for uncoditional
direct branches.

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

23979dc5 01/05/2011 03:23 am Edgar E. Iglesias

microblaze: Use more TB chaining

For some workloads with tight loops this ~doubles the emulation
speed.

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

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

e6aa0f11 10/02/2010 02:12 pm Stefan Weil

target-microblaze: Use %td for ptrdiff_t arguments in debug message

According to ISO/IEC 9899:1999 7.19.6.1,
the correct length modifier for ptrdiff_t is 't', not 'z'.

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

97694c57 09/09/2010 11:20 am Edgar E. Iglesias

microblaze: Add basic FPU emulation

Missing:
  • fcmp.un insn
  • Denormalized exceptions
  • Exception model is not accurate

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

a5efa644 07/25/2010 01:09 am Edgar E. Iglesias

microblaze: Remove unused members from the disas context

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

4b5ef0b5 07/25/2010 12:25 am Edgar E. Iglesias

microblaze: Speed up base + index addressing mode

Speed up reg + reg addressing mode when any of the regs is r0.

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

b2565c69 07/24/2010 10:51 pm Edgar E. Iglesias

microblaze: Use setcond for conditional branches

Use setcond for evaluating the condition for branches.
In the future, we could do better for branches without
delay slots.

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

61204ce8 07/24/2010 10:24 pm Edgar E. Iglesias

microblaze: Improve branch with small immediates

Slight improvements of conditional branches with small
immediate offsets.

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

ff21f70a 02/20/2010 03:04 pm Edgar E. Iglesias

microblaze: Improve brk emulation.

brk insns while in user mode raise priv insn exceptions.
This commit makes gdbserver work on linux guests.

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

4c24aa0a 12/16/2009 01:54 pm Michal Simek

microblaze: Print content of EAR register

I need to see EAR register in output because I need to parse irqsoff problem.

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

17c52a43 12/16/2009 01:52 pm Edgar E. Iglesias

microblaze: Update debug logs.

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

f062a3c7 12/13/2009 10:10 am Edgar E. Iglesias

microblaze: Handle wdc flush and clear.

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

9d2dcce9 12/13/2009 04:22 am Paul Hartke

microblaze: Correct branch to registers.

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

4898427e 11/12/2009 03:12 am Edgar E. Iglesias

microblaze: Unbreak reset.

Initialize synthesis config registers at reset to cope with the new
cpu_reset sequences.

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

38972938 09/25/2009 10:52 pm Juan Quintela

gcc wants 1st static and then const

Signed-off-by: Juan Quintela <>
Signed-off-by: Blue Swirl <>

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

02b33596 09/11/2009 11:38 am Edgar E. Iglesias

microblaze: Trap if QEMU finds an unknown insns.

If PVR settings enable illegal insn trap, trap when QEMU finds an
insn it knows nothing about.

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

a12f6507 09/11/2009 11:35 am Edgar E. Iglesias

microblaze: Correct prio between MMU and unaligned exceptions.

The microblaze gives MMU faults priority. For stores we still
have a flaw that the value leaks to memory in the case of an
unaligned exception.

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

97f90cbf 09/11/2009 11:27 am Edgar E. Iglesias

microblaze: HW Exception fixes.

  • Correct PVR checks for masking off individual exceptions.
  • Correct FPU exception code.
  • Set EAR on unaligned and unassigned exceptions.

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

0187688f 09/04/2009 11:38 am Edgar E. Iglesias

microblaze: Trap on illegal load/store sizes.

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

3aa80988 09/03/2009 11:28 pm Edgar E. Iglesias

microblaze: Compute masks for alignment checks at translation time.

Thanks to Blue Swirl for reporting.
Signed-off-by: Edgar E. Iglesias <>

3c50a71f 09/03/2009 02:04 pm Edgar E. Iglesias

microblaze: MMU shows more respect to synthesis config.

The microblaze MMU can be synthesized in different configurations.
Have the MMU model show more respect to the chosen configuration.

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

968a40f6 09/03/2009 01:59 pm Edgar E. Iglesias

microblaze: Trap on unaligned data accesses.

Untested...

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

821ebb33 09/03/2009 01:52 pm Edgar E. Iglesias

microblaze: Trap on divizions by zero.

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

ee7dbcf8 09/03/2009 12:18 pm Edgar E. Iglesias

microblaze: Correct mfs into r0.

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

1567a005 09/03/2009 12:12 pm Edgar E. Iglesias

microblaze: Catch illegal insns and privilege violations.

Raise illegal instruction exceptions when executing instructions that
require units not available on the particulare microblaze configuration.

Also trap priviliege violations made by userspace.

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

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

4acb54ba 05/26/2009 10:10 pm Edgar E. Iglesias

microblaze: Add translation routines.

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