X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-avr32%2Funaligned.h;h=36f5fd430543ec5d088335f52d357d58e7c75ea7;hb=fa2dd441df28b9fdfc68f84ae66f1b507cfff0e4;hp=3042723fcbfd69b267ba8e8216be5d7090cb771c;hpb=fecf3404f4aba6d0edeba31eeb018cbb6326dff2;p=linux-2.6 diff --git a/include/asm-avr32/unaligned.h b/include/asm-avr32/unaligned.h index 3042723fcb..36f5fd4305 100644 --- a/include/asm-avr32/unaligned.h +++ b/include/asm-avr32/unaligned.h @@ -7,19 +7,10 @@ * words, but halfwords must be halfword-aligned, and doublewords must * be word-aligned. * - * TODO: Make all this CPU-specific and optimize. + * However, swapped word loads must be word-aligned so we can't + * optimize word loads in general. */ -#include - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #endif /* __ASM_AVR32_UNALIGNED_H */