lowRISC / lowRISC/opentitan

One riscv-compliance test is not building at head with clang

Open
#11,968 6 comments 0 reactions 0 assignees View on GitHub
Component:Tooling IP:rv_core_ibex Type:Bug
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

`I-RF_x0-01` has trouble building with what looks like a sign extension issue:
```
ERROR: /usr/local/google/home/drewmacrae/opentitan/third_party/riscv-compliance/BUILD:9:21: Compiling riscv-test-suite/rv32i/src/I-RF_x0-01.S failed: (Exit 1): gcc failed:
error executing command external/bazel_embedded/toolchains/lowrisc_toolchain_rv32imc/clang_wrappers/nix/gcc -MD -MF ... (remaining 82 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
clang-11: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
external/riscv-compliance/riscv-test-suite/rv32i/src/I-RF_x0-01.S:57:18: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [
-2048, 2047]
xori x0, x0, 0xFFFFF803
^
```

this can be hit by checking out lowrisc/opentitan at 81513e and building
`bazel build //third_party/riscv-compliance:sim_verilator_I-RF_x0-01`

Contributor guide

Open the contributing guide

Research direction

Start with external/riscv-compliance/riscv-test-suite/rv32i/src/I-RF_x0-01.S at line 57 and third_party/riscv-compliance/BUILD. Reproduce with bazel build //third_party/riscv-compliance:sim_verilator_I-RF_x0-01 at the referenced checkout, then investigate the clang diagnostic. Done means this compliance target builds successfully with clang.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.