Swap routine implemented via macro