Branch: Tag:

2017-07-20

2017-07-20 10:53:05 by Marcus Comstedt <marcus@mc.pp.se>

Consolidate unaligned memory access

* The implementations of EXTRACT_{UWORD,WORD,INT} in port.[ch] are
removed. Instead, implementations in pike_memory.h are used.

* pike_memory.h now uses HANDLES_UNALIGNED_MEMORY_ACCESS to determine
when to optimize using raw access, like the functions in port.h used
to do, instead of hardcoding for x86_64.

* The set of architectures for which HANDLES_UNALIGNED_MEMORY_ACCESS
is defined is updated.

162:    return (void *)p;   }    - #ifdef __x86_64__ + #ifdef HANDLES_UNALIGNED_MEMORY_ACCESS   /* it is faster to just do the unaligned operation. */   static inline UINT64 ATTRIBUTE((unused)) get_unaligned64(const void *ptr) {    return *(UINT64*)ptr;