3 # This can be used to test instruction encodings when cross-compiling.
5 if grep "#define TARGET_RISCV64 1" ..
/..
/..
/config.h
> /dev
/null
; then
11 gcc
-I..
/..
/..
-I..
/..
/eglib riscv-codegen-test.c
-o riscv-codegen-test $@ ||
exit 1
12 .
/riscv-codegen-test
> riscv-codegen.s ||
exit 1
13 riscv64-unknown-linux-gnu-as riscv-codegen.s
-o riscv-codegen.elf ||
exit 1
14 riscv64-unknown-linux-gnu-objdump
-D -M numeric
,no-aliases riscv-codegen.elf
> riscv-codegen.res ||
exit 1
15 diff -u riscv-codegen.exp
${bits} riscv-codegen.res ||
exit 1