fix more risc-v compiler bugs