[llvm-commits] [llvm] r139964 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassembler.cpp test/MC/Disassembler/ARM/thumb2.txt

Owen Anderson resistor at mac.com
Fri Sep 16 16:01:26 PDT 2011


On Sep 16, 2011, at 3:49 PM, Eli Friedman wrote:
> 
> Err, this change for lsb_mask looks wrong...
> 
> Also, strictly speaking, 1 << 31 and 1 << 32 have undefined behavior;
> I think the correct formulation is the following:
> 
> uint32_t msb_mask = 0xFFFFFFFF;
> if (msb != 31) msb_mask = (1U << (msb+1)) - 1;
> uint32_t lsb_mask = (1U << lsb) - 1;

Doesn't this formulation get the case where LSB == 31 wrong?

--Owen



More information about the llvm-commits mailing list