riscv: make copies of structs passed by reference (#738) Co-authored-by: Andreas Schwab <schwab@suse.de>