Bug 282900
| Summary: | [RISCV] Fix instruction requires the following: 'D'/'F'/'M' | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | MingZhu Yan <yanmingzhu> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
MingZhu Yan
Meet this error during compiling on my riscv64gc board.
The following is not complete information; I only captured a part of it. The complete error also includes F and M extensions
```txt
1d.1ld: error: ld-temp.o <inline asm>:63:1: instruction requires the following: 'D' (Double-Precision Floating-Point)
fsd f18, ((4 * 8) + (32 * 8) + (1 * 8) + (18 * 8))(sp)
^
1d.1ld: error: ld-temp.o <inline asm>:64:1: instruction requires the following: 'D' (Double-Precision Floating-Point)
fsd f19, ((4 * 8) + (32 * 8) + (1 * 8) + (19 * 8))(sp)
^
1d.1ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```
I've try to add `-march=riscv64gc -cpu=lp64d` to everywhere i can try, but this error keep going on. but finally I found that this should be a llvm bug.
More related infomations are here:
- https://github.com/rust-lang/rust/issues/80608
- https://github.com/llvm/llvm-project/issues/61991
- https://github.com/llvm/llvm-project/pull/97685/files
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
MingZhu Yan
Pull request: https://github.com/WebKit/WebKit/pull/36461
Radar WebKit Bug Importer
<rdar://problem/140076841>
EWS
Committed 286815@main (fff4bd89ff20): <https://commits.webkit.org/286815@main>
Reviewed commits have been landed. Closing PR #36461 and removing active labels.
Andreas Schwab
{standard input}: Assembler messages:
{standard input}:22: Fatal error: architecture elf attributes must set before any instructions
MingZhu Yan
(In reply to Andreas Schwab from comment #4)
> {standard input}: Assembler messages:
> {standard input}:22: Fatal error: architecture elf attributes must set
> before any instructions
I haven't encountered this issue. May I ask what your testing platform and compile configuration are?
And if you remove this patch, will the error revert to things like `instruction requires the following: 'D'`?
Andreas Schwab
Reverting the change will fix all build errors.
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:RISCV/webkit2gtk3:gtk4/standard/riscv64