qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs


From: Max Filippov
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs
Date: Mon, 21 Jan 2013 16:21:54 +0300

On Mon, Jan 21, 2013 at 5:11 PM, Markus Armbruster <address@hidden> wrote:
> Blue Swirl <address@hidden> writes:
>
>> Recent Clang compilers have preliminary support for finding
>> unannotated fallthrough cases in switch statements with
>> compiler flag -Wimplicit-fallthrough. The support is incomplete,
>> it's only possible to annotate the case in C++ but not in C, so it
>> wouldn't be useful to enable the flag for QEMU yet.
>>
>> Mark cases which don't have a comment about fall through with
>> a comment. In legitimate fall through cases the comment can be
>> edited later to mark the case for future readers.
>
> Let's clean this up properly instead, as far as we can.  Details inline.
> Maintainers, please check out the parts that apply to your code.
>
>> Signed-off-by: Blue Swirl <address@hidden>

[...]

>> diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
>> index 3813a72..d829702 100644
>> --- a/target-xtensa/op_helper.c
>> +++ b/target-xtensa/op_helper.c
>> @@ -443,8 +443,10 @@ void HELPER(check_atomctl)(CPUXtensaState *env, 
>> uint32_t pc, uint32_t vaddr)
>>      switch (access & PAGE_CACHE_MASK) {
>>      case PAGE_CACHE_WB:
>>          atomctl >>= 2;
>> +        /* XXX: questionable fallthrough */
>>      case PAGE_CACHE_WT:
>>          atomctl >>= 2;
>> +        /* XXX: questionable fallthrough */
>>      case PAGE_CACHE_BYPASS:
>>          if ((atomctl & 0x3) == 0) {
>>              HELPER(exception_cause_vaddr)(env, pc,
>
> Looks intentional.  Max Filippov?

Correct, these are intentional.

-- 
Thanks.
-- Max



reply via email to

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