Fix clobber bug in arm semihosting code (thanks zyp!)