On Aug 20, 2012, at 10:48 AM, Wojciech Puchar wrote: >> #if defined(__i386__) || defined(__amd64__) >> *dst = *src; >> #else >> bcopy(src, dst, ETHER_ADDR_LEN); > #else > short *tmp1=((*short)src),*tmp2=((*short)dst); > *tmp2=*tmp1; *(tmp2+1)=*(tmp1+1); *(tmp2+2)=*(tmp1+2); > > or use ++. > > i think it is always aligned to 2 bytes and this should produce usable code > on any CPU? should be 6 instructions on MIPS and PPC IMHO.
We should tag it as __aligned(2) then, no? If so, then the compiler should generate the code you posted. Warner _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"