Fix writestr with register allocation