qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] defining VIXL_DEBUG?


From: Paolo Bonzini
Subject: Re: [Qemu-devel] defining VIXL_DEBUG?
Date: Mon, 18 Jan 2016 11:57:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


On 18/01/2016 11:51, Peter Maydell wrote:
>>  The actual code in the function is
>> >
>> >     default: VIXL_UNREACHABLE(); return 0;
>> >
>> > so this is obviously a false positive.  Defining VIXL_DEBUG would cause
>> > VIXL_UNREACHABLE() to call abort().  Any opinion about whether/where to
>> > do so?
> Does defining it to call abort() result in unreachable-code warnings
> for the "return 0;" ?

I'm not sure, it would be minor though.

One issue I have found after posting is that I'm not sure whether bad
instructions (aka reserved encodings) are handled properly by libvixl.
See for example this:

    case 'A': {  // IAddSub.
      VIXL_ASSERT(instr->ShiftAddSub() <= 1);
      int64_t imm = instr->ImmAddSub() << (12 * instr->ShiftAddSub());
      AppendToOutput("#0x%" PRIx64 " (%" PRId64 ")", imm, imm);
      return 7;
    }

where the '1x' encodings of bits 22:23 (marked as reserved in the ARMv8
ARM) would cause an abort as far as I can see.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]