implement ARMv6/7 specific xchg function