gcc miscompiles csum_tcpudp_magic() on ARMv5

Maxime Bizon mbizon at freebox.fr
Thu Dec 12 09:40:42 EST 2013


On Thu, 2013-12-12 at 14:37 +0000, Måns Rullgård wrote:

> There is no such thing as a 16-bit register on ARM.  What this code does
> is ask the compiler to take the 16-bit value 'len' and put it in a register
> for use in the asm code.  All registers are 32-bit, so there is no ambiguity.

which strictly speaking the compiler did ;)

it took the 16 bits value and put it inside the lower 16 bits of the 32
bits register, it just didn't touch the higher ones

-- 
Maxime





More information about the linux-arm-kernel mailing list