KhronosGroup / KhronosGroup/OpenCL-CTS
AArch64 inline assembly register size mismatch
- Dominant language
- C++
- Stars
- 232
- Forks
- 235
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 18
Description
Enabling `-Werror` and building for AArch64 produced this error (and some other similar ones):
```
../test_common/harness/rounding_mode.cpp:51:16: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]
_FPU_GETCW(fpscr);
^
../test_common/harness/rounding_mode.cpp:51:5: note: use constraint modifier "w"
_FPU_GETCW(fpscr);
^
../test_common/harness/rounding_mode.cpp:25:46: note: expanded from macro '_FPU_GETCW'
#define _FPU_GETCW(cw) __asm__ ("MRS %0,FPCR" : "=r" (cw))
```
This warning will be disabled in the root `CMakeLists.txt` file until fixed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the _FPU_GETCW macro and its use at line 51 of test_common/harness/rounding_mode.cpp, then inspect the related AArch64 diagnostics and the warning setting in the root CMakeLists.txt. Build the OpenCL-CTS tests for AArch64 with -Werror and confirm the register-size warnings, including similar cases, no longer occur without the temporary warning suppression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100