Merged in from Nios2 repo.