[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] tcg/target-arm: Add missing parens to assertions



commit 4ee28799d417de0c929622021d6dbaa58a53dfc5
Author:     Peter Maydell <peter.maydell@xxxxxxxxxx>
AuthorDate: Thu Jan 17 20:04:16 2013 +0000
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Mon Jan 21 13:52:23 2013 -0600

    tcg/target-arm: Add missing parens to assertions
    
    Silence a (legitimate) complaint about missing parentheses:
    
    tcg/arm/tcg-target.c: In function â??tcg_out_qemu_ldâ??:
    tcg/arm/tcg-target.c:1148:5: error: suggest parentheses around
    comparison in operand of â??&â?? [-Werror=parentheses]
    tcg/arm/tcg-target.c: In function â??tcg_out_qemu_stâ??:
    tcg/arm/tcg-target.c:1357:5: error: suggest parentheses around
    comparison in operand of â??&â?? [-Werror=parentheses]
    
    which meant that we would mistakenly always assert if running
    a QEMU built with debug enabled on ARM.
    
    Signed-off-by: Peter Maydell <peter.maydelL@xxxxxxxxxx>
    Signed-off-by: Blue Swirl <blauwirbel@xxxxxxxxx>
    (cherry picked from commit 5256a7208a7c2af19baf8f99bd4f06632f9f9ba9)
    
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 tcg/arm/tcg-target.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 47612fe..8726f52 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1145,7 +1145,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const 
TCGArg *args, int opc)
                     TCG_REG_R0, SHIFT_IMM_LSL(CPU_TLB_ENTRY_BITS));
     /* We assume that the offset is contained within 20 bits.  */
     tlb_offset = offsetof(CPUArchState, tlb_table[mem_index][0].addr_read);
-    assert(tlb_offset & ~0xfffff == 0);
+    assert((tlb_offset & ~0xfffff) == 0);
     if (tlb_offset > 0xfff) {
         tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R0, TCG_REG_R0,
                         0xa00 | (tlb_offset >> 12));
@@ -1354,7 +1354,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const 
TCGArg *args, int opc)
                     TCG_AREG0, TCG_REG_R0, SHIFT_IMM_LSL(CPU_TLB_ENTRY_BITS));
     /* We assume that the offset is contained within 20 bits.  */
     tlb_offset = offsetof(CPUArchState, tlb_table[mem_index][0].addr_write);
-    assert(tlb_offset & ~0xfffff == 0);
+    assert((tlb_offset & ~0xfffff) == 0);
     if (tlb_offset > 0xfff) {
         tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R0, TCG_REG_R0,
                         0xa00 | (tlb_offset >> 12));
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.