Taiwan shares end up but off highs as TSMC gives up gains :