mbox

[PULL,00/12] TCG patch queue

Message ID 1454717370-17516-1-git-send-email-rth@twiddle.net
State New
Headers show

Pull-request

git://github.com/rth7680/qemu.git tags/pull-tcg-20160206

Message

Richard Henderson Feb. 6, 2016, 12:09 a.m. UTC
This contains two patches from December, and the portion that
has been reviewed of my tcg-indirect-register series for sparc.
The latter is mostly cleanup to tcg.c and so is nice to have
regardless of the rest of the patch set.


r~


The following changes since commit ee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6:

  Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.6-2' into staging (2016-02-05 14:20:46 +0000)

are available in the git repository at:

  git://github.com/rth7680/qemu.git tags/pull-tcg-20160206

for you to fetch changes up to 78c9f7ee92717671d281882d33ef3f80ca711c95:

  tcg: Introduce temp_load (2016-02-06 10:44:31 +1100)

----------------------------------------------------------------
Queued TCG patches.

----------------------------------------------------------------
Richard Henderson (12):
      tcg: Respect highwater in tcg_out_tb_finalize
      tcg: Remove lingering references to gen_opc_buf
      tcg: Change tcg_global_mem_new_* to take a TCGv_ptr
      tcg: Change ts->mem_reg to ts->mem_base
      tcg: Tidy temporary allocation
      tcg: More use of TCGReg where appropriate
      tcg: Remove tcg_get_arg_str_i32/64
      tcg: Change reg_to_temp to TCGTemp pointer
      tcg: Change temp_dead argument to TCGTemp
      tcg: Change temp_sync argument to TCGTemp
      tcg: Change temp_save argument to TCGTemp
      tcg: Introduce temp_load

 target-alpha/translate.c      |   8 +-
 target-arm/translate-a64.c    |   6 +-
 target-arm/translate.c        |  21 +-
 target-cris/translate.c       |  24 +-
 target-cris/translate_v10.c   |  82 +++----
 target-i386/translate.c       |  13 +-
 target-lm32/translate.c       |  24 +-
 target-m68k/translate.c       |  30 ++-
 target-microblaze/translate.c |  18 +-
 target-mips/translate.c       |  25 +-
 target-moxie/translate.c      |   8 +-
 target-openrisc/translate.c   |  26 +-
 target-ppc/translate.c        |  44 ++--
 target-s390x/translate.c      |  18 +-
 target-sh4/translate.c        |  48 ++--
 target-sparc/translate.c      |  60 ++---
 target-tilegx/translate.c     |   4 +-
 target-tricore/translate.c    |  22 +-
 target-unicore32/translate.c  |   5 +-
 target-xtensa/translate.c     |  10 +-
 tcg/ia64/tcg-target.c         |  11 +-
 tcg/tcg-be-ldst.h             |  11 +-
 tcg/tcg-be-null.h             |   3 +-
 tcg/tcg.c                     | 550 +++++++++++++++++++-----------------------
 tcg/tcg.h                     |  49 ++--
 25 files changed, 558 insertions(+), 562 deletions(-)

Comments

Peter Maydell Feb. 8, 2016, 11:25 a.m. UTC | #1
On 6 February 2016 at 00:09, Richard Henderson <rth@twiddle.net> wrote:
> This contains two patches from December, and the portion that
> has been reviewed of my tcg-indirect-register series for sparc.
> The latter is mostly cleanup to tcg.c and so is nice to have
> regardless of the rest of the patch set.
>
>
> r~
>
>
> The following changes since commit ee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6:
>
>   Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.6-2' into staging (2016-02-05 14:20:46 +0000)
>
> are available in the git repository at:
>
>   git://github.com/rth7680/qemu.git tags/pull-tcg-20160206
>
> for you to fetch changes up to 78c9f7ee92717671d281882d33ef3f80ca711c95:
>
>   tcg: Introduce temp_load (2016-02-06 10:44:31 +1100)
>
> ----------------------------------------------------------------
> Queued TCG patches.

Hi. This doesn't compile with clang, I'm afraid:

/home/petmay01/linaro/qemu-for-merges/tcg/tcg.c:2048:30: error:
comparison of constant 16 with expression of type 'TCGReg' is always
true [-Werror,-Wtautological-constant-out-of-range-compare]
            for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
                         ~~~ ^ ~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/tcg/tcg.c:2204:22: error:
comparison of constant 16 with expression of type 'TCGReg' is always
true [-Werror,-Wtautological-constant-out-of-range-compare]
    for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
                 ~~~ ^ ~~~~~~~~~~~~~~~~~~

thanks
-- PMM
Richard Henderson Feb. 8, 2016, 8:24 p.m. UTC | #2
On 02/08/2016 10:25 PM, Peter Maydell wrote:
> Hi. This doesn't compile with clang, I'm afraid:
>
> /home/petmay01/linaro/qemu-for-merges/tcg/tcg.c:2048:30: error:
> comparison of constant 16 with expression of type 'TCGReg' is always
> true [-Werror,-Wtautological-constant-out-of-range-compare]
>              for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
>                           ~~~ ^ ~~~~~~~~~~~~~~~~~~

Good grief.  This is C, not C++.  In C it isn't legal to reduce the width of 
the underlying type of the enum to the minimum width that contains the 
enumerators -- the underlying type must still be int or unsigned int.  Thus reg 
must be able to hold the value 16 (or 1000 for that matter).

IMO this is a clang bug.

I guess I'll rearrange this code so that it doesn't use the enum in the loop.


r~
Richard Henderson Feb. 8, 2016, 11:25 p.m. UTC | #3
On 02/09/2016 07:24 AM, Richard Henderson wrote:
> On 02/08/2016 10:25 PM, Peter Maydell wrote:
>> Hi. This doesn't compile with clang, I'm afraid:
>>
>> /home/petmay01/linaro/qemu-for-merges/tcg/tcg.c:2048:30: error:
>> comparison of constant 16 with expression of type 'TCGReg' is always
>> true [-Werror,-Wtautological-constant-out-of-range-compare]
>>              for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
>>                           ~~~ ^ ~~~~~~~~~~~~~~~~~~
>
> Good grief.  This is C, not C++.  In C it isn't legal to reduce the width of
> the underlying type of the enum to the minimum width that contains the
> enumerators -- the underlying type must still be int or unsigned int.  Thus reg
> must be able to hold the value 16 (or 1000 for that matter).
>
> IMO this is a clang bug.

I'm glad they agree: https://llvm.org/bugs/show_bug.cgi?id=16154

What clang version are you using, Peter?


r~
Peter Maydell Feb. 9, 2016, 9:24 a.m. UTC | #4
On 8 February 2016 at 23:25, Richard Henderson <rth@twiddle.net> wrote:
> On 02/09/2016 07:24 AM, Richard Henderson wrote:
>> IMO this is a clang bug.
>
>
> I'm glad they agree: https://llvm.org/bugs/show_bug.cgi?id=16154
>
> What clang version are you using, Peter?

This showed up with both:

Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

and:

Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

thanks
-- PMM