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