summaryrefslogtreecommitdiff
path: root/target-cris/translate.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-02target-cris: Use %td for ptrdiff_t arguments in debug messageStefan Weil1-1/+1
According to ISO/IEC 9899:1999 7.19.6.1, the correct length modifier for ptrdiff_t is 't', not 'z'. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-06-16cris: Move sign extension.Edgar E. Iglesias1-13/+13
Move it in preparation for further changes. No functional change. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-16cris: Centralize fetchingEdgar E. Iglesias1-22/+44
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-06-16cris: Make the CRISv32 insn decoders return signed int.Edgar E. Iglesias1-86/+86
Prepare to return error from the individual decoders. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25cris: remove dead assignments, spotted by clang analyzerBlue Swirl1-4/+1
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-15cris: Add support for CRISv10 translation.Edgar E. Iglesias1-30/+132
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-02-15cris: Use tcg_gen_movi_tl.Edgar E. Iglesias1-2/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-31cris: Prettify register dumps.Edgar E. Iglesias1-2/+2
Use friendly names for registers in the dumps. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-10-08CRIS: Update PR_EDA on TLB faults.Edgar E. Iglesias1-4/+0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-12Fix sys-queue.h conflict for goodBlue Swirl1-2/+2
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, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Update to a hopefully more future proof FSF addressBlue Swirl1-2/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-12CRIS: Prettify sizes for the internal disasm.Edgar E. Iglesias1-8/+8
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-13Include assert.h from qemu-common.hPaul Brook1-1/+0
Include assert.h from qemu-common.h and remove other direct uses. cpu-all.h still need to include it because of the dyngen-exec.h hacks Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-12CRIS: Fix bmi.Edgar E. Iglesias1-1/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-04-24qemu: introduce qemu_init_vcpu (Marcelo Tosatti)aliguori1-0/+1
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05Add new command line option -singlestep for tcg single stepping.aurel321-0/+1
This replaces a compile time option for some targets and adds this feature to targets which did not have a compile time option. Add monitor command to enable or disable single step mode. Modify monitor command "info status" to display single step mode. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7004 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-22CRIS: Fix remaining build warnings.edgar_igl1-1/+2
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6638 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05targets: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori1-2/+0
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6530 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-26CRIS: Init the feedback shiftreg used for randomizing TLB sets.edgar_igl1-0/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6463 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-26Log reset events (Jan Kiszka)aliguori1-0/+5
Original idea&code by Kevin Wolf, split-up in two patches and added more archs. This patch introduces a flag to log CPU resets. Useful for tracing unexpected resets (such as those triggered by x86 triple faults). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6452 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-15global s/loglevel & X/qemu_loglevel_mask(X)/ (Eduardo Habkost)aliguori1-3/+3
These are references to 'loglevel' that aren't on a simple 'if (loglevel & X) qemu_log()' statement. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6340 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-15Convert references to logfile/loglevel to use qemu_log*() macrosaliguori1-13/+9
This is a large patch that changes all occurrences of logfile/loglevel global variables to use the new qemu_log*() macros. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6338 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-15Clean up debugging code #ifdefs (Eduardo Habkost)aliguori1-143/+146
Use macros to avoid #ifdefs on debugging code. This patch doesn't try to merge logging macros from different files, but just unify the debugging code #ifdefs onto a macro on each file. A further cleanup can unify the debugging macros on a common header, later Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6332 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: Purify some of the flag evaluation helpers.edgar_igl1-61/+72
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6227 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: Use a helper for lz.edgar_igl1-69/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6205 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: bound operates directly on regs, no need to allocate temp destination.edgar_igl1-3/+0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6204 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: Speedup btst by using a helper.edgar_igl1-74/+11
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6203 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: NMI wakes up the core.edgar_igl1-1/+5
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6200 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: Move operations can be optimized as arithmetic ones for cc evaluation.edgar_igl1-1/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6199 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07CRIS: Slight performance improvement for flag evaluation.edgar_igl1-8/+18
Translate sub and cmp ops separately when evaluating flags to avoid checking for them at runtime. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6198 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-04Update FSF address in GPL/LGPL boilerplateaurel321-1/+1
The attached patch updates the FSF address in the GPL/LGPL boilerplate in most GPL/LGPLed files, and also in COPYING.LIB. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6162 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-22Use the ARRAY_SIZE() macro where appropriate.malc1-2/+2
Change from v1: Avoid changing the existing coding style in certain files. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-25Use sys-queue.h for break/watchpoint managment (Jan Kiszka)aliguori1-2/+2
This switches cpu_break/watchpoint_* to TAILQ wrappers, simplifying the code and also fixing a use after release issue in cpu_break/watchpoint_remove_all. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5799 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18Refactor and enhance break/watchpoint API (Jan Kiszka)aliguori1-4/+5
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow the succeeding enhancements this series comes with. First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switching to dynamically allocated data structures that are kept in linked lists. This also allows to return a stable reference to the related objects, required for later introduced x86 debug register support. Breakpoints and watchpoints are stored with their full information set and an additional flag field that makes them easily extensible for use beyond pure guest debugging. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5738 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-17TCG variable type checking.pbrook1-134/+136
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5729 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01target-cris: access to TCG variables through GET_TCGV()aurel321-1/+1
Fix build with DEBUG_TCGV enabled. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5586 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-28CRIS: Plug more temp leaks.edgar_igl1-5/+5
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5560 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Plug a few temp leaks.edgar_igl1-1/+3
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5554 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Remove cpu_T.edgar_igl1-92/+154
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5552 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Avoid more cpu_T usage.edgar_igl1-95/+175
* Explicit operand passing to prep_alu_r. * Avoid some more cpu_T[] usage. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5550 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Avoid cpu_T[1] for move_r.edgar_igl1-3/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5548 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Avoid using cpu_T[0] for testing condition codes.edgar_igl1-44/+41
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5547 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27CRIS: Add branch-free versions of abs, lsl, lsr and asr.edgar_igl1-29/+40
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5546 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-26CRIS: Correct tcg globals allocation for 64bit hosts.edgar_igl1-12/+12
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5545 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-11CRIS: Initialize the arch version preg to v32.edgar_igl1-0/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5462 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-08CRIS: Partial EXS reg support and fixes for SPC.edgar_igl1-10/+2
* Add partial support for the EXS (exception status) register. * Update SPC after each singlestep exception. * Remove special treatment of break 8. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5448 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-08CRIS: Correct typos.edgar_igl1-3/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5447 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-07CRIS: Make local objects static.edgar_igl1-24/+24
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5446 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-07CRIS: Fix brk 8 and add S-flag emulation.edgar_igl1-16/+40
* break 8 sets ERP to the current insn. * First shot at S flag single-stepping. * Make it easier to use the local disasm. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5445 c046a42c-6fe2-441c-8c8c-71466251a162