History log of /external/qemu/target-arm/translate.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5285864985be9077e58e42235af6582dee72e841 03-Jun-2011 David 'Digit' Turner <digit@android.com> target-arm: integrate upstream ARM translator.

The new translator has the following benefits:

- faster emulation of ARMv5TE code (through improved JIT)
- proper support for ARMv7 and NEON
- rebuilding the full-eng platform images for ARMv7-A results
in additionnal speed increases (a.k.a. Thumb-2 rocks!).

Note that, as an interesting side effect, NEON machine code is generally
slower than the equivalent C code it is supposed to replace when run inside
the emulator. This can be explained by the fact that for now the translator
simply translates each NEON instruction into a series of sequential host
instructions (and also requires over-head for packing/unpacking/saturation/
etc...).

This change has been tested by running the "full-eng" platform image
rebuilt for ARMv7-A and Neon and using an appropriate kernel image
(prebuilt/android-arm/kernel/kernel-qemu-armv7). The system could boot
and seems to work perfectly. Not a single issue has been experienced
during testing. On a 2.4 GHz Xeon CPU, the image boots in about 25 seconds
(compared to 40 seconds for a vanilla one without this emulator patch).

Thanks to Peter Maydell at Linaro and ARM with his hard work to make this
happen (first in upstream, and now on Android).

This integration is based on the Meego git repository
(git://gitorious.org/qemu-maemo/qemu.git) using the following hash:

7e2d65b0c95c865b1fa6d3d4948e8e822b9ac2fd

On top of which, the following upstream patch has been applied
(with recommendation from Peter):

b7fa9214d8d4f57992c9acd0ccb125c54a095f00

(We chose this repository because it was the closest to the previous
integrate. We will probably use the Linaro ones for future work on this
part of the emulator).

Change-Id: I54837e3d2e908b2380d158411d7a9813630e7e4e
/external/qemu/target-arm/translate.c
288208c386810fef725aa448a9f46bd2772bec8c 11-May-2011 David 'Digit' Turner <digit@android.com> target-arm/translate.c: move Android-specific stuff out.

Change-Id: Id14c6b106dbac9b4016b7423327e9eb22e21fe75
/external/qemu/target-arm/translate.c
d3d4468189618e89f74d8f51b8470f277e000938 10-May-2011 David 'Digit' Turner <digit@android.com> translate-all.c: minor integrate
/external/qemu/target-arm/translate.c
8ee4e5ed2bf68384cd80ec5b958da4da164652ae 09-May-2011 David 'Digit' Turner <digit@android.com> trace: simplify code and avoid conflicts

Change-Id: I8f93e06038bd6e35a2972e3fef351046c247e4ee
/external/qemu/target-arm/translate.c
6bfc5c725a5d9b23eb829a9db3c0f0a4c38b5a4e 06-Jan-2011 David 'Digit' Turner <digit@android.com> Fix tracing bug when built as 64-bit program.

Change-Id: I523f4464cfbbd02aff93031660d2ee2f80d54921
/external/qemu/target-arm/translate.c
d9b6cb97a8a9e93f1bbe5351874b03f7faa81783 20-Oct-2010 David 'Digit' Turner <digit@android.com> Fix linux-x86_64 build.

Fix various 64-bitness issues in the source code to
make the --try-64 option work again on Linux. Note that
the generated binary is not faster than its 32-bit variant
when it comes to benchmarking the boot sequence.

Change-Id: Iad248e033757d4cd25524a438a5dbe1cf3aca6cf
/external/qemu/target-arm/translate.c
4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 22-Sep-2010 David 'Digit' Turner <digit@android.com> Remove compiler warnings when building the emulator.

This forces -Wall during the build. Note that this patch doesn't
remove all warnings, but most of the remaining ones are from upstream anyway.

Change-Id: I8808d8495e99866e156ce5780d2e3c305eab491f
/external/qemu/target-arm/translate.c
a5d412078b8e7478d81df03710eacc7a21096ba2 11-May-2010 David 'Digit' Turner <digit@android.com> Upstream: Replace sys-queue.h with qemu-queue.h

Change-Id: I5c51f54a7fe2ea702420429bbf0c789ed6d8c534
/external/qemu/target-arm/translate.c
a1204591a52bf668ee72c86f98f53189621572a2 02-Apr-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Revert change I7af83e21c64d217c6b28bf6cb5ee2e2f23182c95 to fix Froyo build.

Apparently, that change that supposedly fixed AT-related ARMv7 bug broke
DexOpt step in the build process, resulting in trashed files that crash
the device. Rolling this change back to fix Froyo, until cause of the
DexOpt breaking has been found and fixed

Change-Id: I33b417fcbd65767f7cfe60f5fb5ffa32610b4852
/external/qemu/target-arm/translate.c
ca52b2260ba9f9bac07092c3d8260ed523de1fe1 24-Mar-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Make return address table independent from process context.

Use physical addresses (instead of emulated ones) for registered return
addresses. This way addresses will be independent from process context,
as even if virtual addresses may overlap, the physical ones will not.

Change-Id: If5be5174286be0a456c47c48812d7cc9bf19bc1f
/external/qemu/target-arm/translate.c
01e9608cb62901d13b330f851a260a2082e81a06 23-Mar-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Fixes for obvious ARMv7 bugs in emulator.

This CL doesn't fix ARMv7 problems in the emulator (emulated system still
crashes, although with these fixes it crashes much later than without them),
however, this CL fixes real bugs related to IT block translations.
In particular, it fixes:
- Wrong ITSTATE calculation on condition that gen_intermediate_code_internal
is called with search_pc parameter set to 1. In the original code ITSTATE was
blindly inherited from the CPU's condexec_bits field, without consideration
that translation could be performed starting from an address that has nothing
to do with the current ITSTATE.

Change-Id: I7af83e21c64d217c6b28bf6cb5ee2e2f23182c95
/external/qemu/target-arm/translate.c
5389aa19033153c09556d1362a8b8a56abccb8f5 16-Feb-2010 Vladimir Chtchetkine <vchtchetkine@google.com> Merge memory checking from sandbox

Change-id: Ibce845d0
/external/qemu/target-arm/translate.c
a577fcadc0b365ee629aec313f57a65d54fe5d89 16-Oct-2009 David 'Digit' Turner <digit@google.com> Fix the -trace emulator option.

A critical test in the execution loop was missed in the latest huge integration.
Also optimize slightly the basic-block start recording helper interface.
/external/qemu/target-arm/translate.c
3af4f6ae1fa6e06de1284fa1143cb8a485ac6437 09-Oct-2009 David 'Digit' Turner <digit@google.com> Fix upstream ARM emulation bug that broke singlestep mode.

This fixes a really bad bug in the Thumb/Thumb2 ARM emulation related to
conditional instructions execution. The issue was that the previous
implementation did break badly if a page fault occured during the conditional
instruction's emulation. Giving an example if probably the best way to demonstrate
this. Consider the following two instructions:

itt eq
streq r0,[r4, #0]

These two instructions mean, respectively:
- If the Z flag is set, execute the next instruction. Otherwise ignore it
- Store the value of r0 at the address pointed to by r4

In single-step mode (used when debugging the emulator), each instruction is
separately JIT-ed and executed in a different pass. The 'condexec_bits' field
of the CPU state if used to store flags corresponding to the conditional
execution of up to 4 next instructions.

When the first instruction is executed, it simply sets 'condexec_bits' to a
specific value (4).

When the second instruction is executed, things get slightly bit more funky
because what happened was the following:

- the JIT-ed code started by clearing the 'condexec_bits' right at the
start of its sequence (a comment says "to avoid complications trying to
do it at the end of the block", famous last words...)

- a conditional test, based on the current value of the Z flag was added
to skip over the rest of the instruction sequence

- the store itself is implemented through a call to the __stl_mmu helper
function.

The thing is that __stl_mmu may implement a *page fault* (i.e. when the
address in r4 hasn't been commited to memory yet) which requires a switch
to kernel mode (to populate the page), then going back to the instruction's
execution.

This is done in the current implementation by re-running the JIT-er for the
same instruction, however, since 'condexec_bits' was already cleared to 0,
the new JIT-ed code sequence doesn't have the conditional test to skip over
the store. The conditional instruction has been transformed into a
non-conditional one due to the page fault ! This results in either bad behaviour
or, even a crash in the emulator.

The patch fixes the clearing of condexec_bits to happen as it should, i.e.
only when execution has really cleared it.

This is preliminary work to fix the -trace option.

Also, disable the IO Thread when running the standalone emulator. This makes
debugging much easier since everything happens in a single thread.
/external/qemu/target-arm/translate.c
ddf49e53df97a349f42c733059165dc73c9907dc 05-Oct-2009 David 'Digit' Turner <digit@google.com> Workaround ARMv7 emulation issues.

This patch is used to disable the code generator's liveness analysis pass when we
emulate an ARMv7 CPU. This is required to properly run the dex preoptimization pass
during the build of -user system images.

Also includes:
- a fix for a sad typo in target-arm/translate.c related to NEON instruction emulation
- upstream improvements to the x86 and x86_64 backends to generate better goto branches at runtime
- upstream fixes for 64-bit swap and shift operations in TCG

After this patch is applied, re-enabling the ARMv7 memcpy should allow to run the dex preopt
pass succesfully. Anything else is untested though. WE STILL NEED TO FIX THE CODE GENERATOR.
/external/qemu/target-arm/translate.c
5d8f37ad78fc66901af50c762029a501561f3b23 14-Sep-2009 David 'Digit' Turner <digit@google.com> Merge upstream QEMU 10.0.50 into the Android source tree.

This change integrates many changes from the upstream QEMU sources.
Its main purpose is to enable correct ARMv6 and ARMv7 support to the
Android emulator. Due to the nature of the upstream code base, this
unfortunately also required changes to many other parts of the source.

Note that to ensure easier integrations in the future, some source files
and directories that have heavy Android-specific customization have been
renamed with an -android suffix. The original files are still there for
easier integration tracking, but *never* compiled. For example:

net.c net-android.c
qemu-char.c qemu-char-android.c
slirp/ slirp-android/
etc...

Tested on linux-x86, darwin-x86 and windows host machines.
/external/qemu/target-arm/translate.c
80562525ca945d9e921eb49f96d52f1b5a0e693d 20-May-2009 David 'Digit' Turner <digit@google.com> This should fix bad QADD/QDADD/QSUB/QDSUB emulation in the Android emulator
/external/qemu/target-arm/translate.c
013978687addfae64dbb8e8a179af10922bd2802 19-May-2009 Jack Veenstra <veenstra@android.com> Fix critical bug with emulator tracing where the basic block addresses were wrong.

One of the calls to trace_add_insn() was missing a parameter and was passing in
garbage. This parameter "is_thumb" is expected to be 0 or 1 and is OR-ed with
the basic block address to distinguish ARM and Thumb instruction blocks.
/external/qemu/target-arm/translate.c
8b23a6c7e1aee255004dd19098d4c2462b61b849 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/qemu/target-arm/translate.c
f721e3ac031f892af46f255a47d7f54a91317b30 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/qemu/target-arm/translate.c
c27f813900a3c114562efbb8df1065e94766fc48 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/external/qemu/target-arm/translate.c
55f4e4a5ec657a017e3bf75299ad71fd1c968dd3 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/external/qemu/target-arm/translate.c
413f05aaf54fa08c0ae7e997327a4f4a473c0a8d 12-Jan-1970 Upstream <upstream-import@none> external/qemu 0.8.2
/external/qemu/target-arm/translate.c