Fix panics in art build code when target arch is riscv64

Fix panics in codegen.go and PGO when using riscv64 as the target
arch.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I97820082b7d51e939f01e782356795a12f84f8a1
2 files changed