[PATCH] D74023: [RISCV] ELF attribute section for RISC-V
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 22:23:46 PST 2020
kito-cheng added a comment.
Could you add following kind of test:
Negative test:
- Feed integer value to string type attribute
- Feed string value to integer type attribute
Architecture attribute testing:
- Different/conflict arch between option and attribute, e.g. `llvm-mc -mattr=+e` but `.attribute arch, "rv32i2p0"`
- Expectation is attribute get higher propriety.
- Arch string without version, e.g. `.attribute arch, "rv32imafdc"`
- Expectation is assembler will append it into `.attribute arch, "rv32i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"`
- Major number is given but minor version ignored, e.g. `.attribute arch, "rv32i2"`
- Invalid arch string.
- Random arch string: `.attribute arch, "foo"`
- Arch string not in canonical order `.attribute arch, "rv32i2p0_a2p0_m2p0_"`
- Default arch attribute, `.attribute arch` not given, imply by `-mattr` option, e.g `llvm-mc -triple=riscv32 -mattr=+f` result `.attribute arch, "rv32i2p0_f2p0"`
- Maybe we should add a option to control this behavior? gas/binutils provide `-m[no-]arch-attr` to control this.
Code gen test:
- Test attribute can emitted by compiler, like `llvm/test/CodeGen/ARM/build-attributes.ll`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74023/new/
https://reviews.llvm.org/D74023
More information about the llvm-commits
mailing list