Copy from original sources
Make it work with mor1kx