A 'w'ord access is likely to cause a 64b access using unsigned long *. Perhaps best to use unsigned int * for 'w' and unsigned long * for 'd'ouble?