aboutsummaryrefslogtreecommitdiffstats
path: root/target-arm
Commit message (Collapse)AuthorAgeFilesLines
* upstream: move timer management code to qemu-timer.cDavid Turner2010-09-131-2/+3
|
* Upstream: Replace sys-queue.h with qemu-queue.hDavid 'Digit' Turner2010-05-101-4/+3
| | | | Change-Id: I5c51f54a7fe2ea702420429bbf0c789ed6d8c534
* Upstream: HOST_WORDS_ALIGNED -> WORDS_ALIGNEDDavid 'Digit' Turner2010-05-101-1/+1
| | | | Change-Id: Ica9022695d83fb48a8c25fdb1e1f0dc1c63747ff
* Revert change I7af83e21c64d217c6b28bf6cb5ee2e2f23182c95 to fix Froyo build.Vladimir Chtchetkine2010-04-022-123/+24
| | | | | | | | | 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
* Make return address table independent from process context.Vladimir Chtchetkine2010-03-242-13/+19
| | | | | | | | 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
* Fixes for obvious ARMv7 bugs in emulator.Vladimir Chtchetkine2010-03-232-24/+123
| | | | | | | | | | | | | | 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
* Merge memory checking from sandboxVladimir Chtchetkine2010-02-185-3/+313
| | | | Change-id: Ibce845d0
* Fix the -trace emulator option.David 'Digit' Turner2009-10-153-21/+50
| | | | | A critical test in the execution loop was missed in the latest huge integration. Also optimize slightly the basic-block start recording helper interface.
* Fix upstream ARM emulation bug that broke singlestep mode.David 'Digit' Turner2009-10-091-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Workaround ARMv7 emulation issues.David 'Digit' Turner2009-10-051-1/+1
| | | | | | | | | | | | | | 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.
* Fix ARMv7 emulation by disabling CPU alignment exceptionsDavid 'Digit' Turner2009-09-201-1/+1
| | | | | | | | | | | | | | | Disable alignment CPU exceptions to be able to boot an ARMv7 system image. This is because 4.4.0 emits a machine code sequence that stores an 8-bytes double on a 4-byte aligned address on the stack in the implementation of cvt() in the C library (see the disassembly for bionic/libc/stdio/vfprintf.c). It is uncertain that this is a compiler bug at this point, but the upstream QEMU sources don't have alignment exceptions enabled for any ARM target anyway. Also, add a check to force CPU emulation to "cortex-a8" if the kernel file name ends in "-armv7". This is a poor man's approach to hardware configuration that will be replaced by a more sophisticated solution in the future. Right now, we just want to be able to build -user system images with the dex preopt pass running in the emulator with the minimum amount of fuss.
* Merge upstream QEMU 10.0.50 into the Android source tree.David 'Digit' Turner2009-09-1410-1022/+1078
| | | | | | | | | | | | | | | | | | | 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.
* This should fix bad QADD/QDADD/QSUB/QDSUB emulation in the Android emulatorDavid 'Digit' Turner2009-05-201-1/+1
|
* Fix critical bug with emulator tracing where the basic block addresses were ↵Jack Veenstra2009-05-181-1/+1
| | | | | | | | 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.
* Added tracing of exceptions to the emulator.Jack Veenstra2009-04-301-0/+9
| | | | Exceptions used to be traced but that code was deleted during a large merge.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0310-0/+15695
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0310-15695/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-1025-5410/+13061
|
* Initial ContributionThe Android Open Source Project2008-10-216-48/+375
|
* external/qemu 0.8.2Upstream1970-01-1220-0/+7717