-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Closed
Milestone
Description
System information (version)
- OpenCV => master, 834c992
- Operating System / Platform => Ubuntu 18.04, Power 9
- Compiler => clang version 10.0.0 (git@github.com:llvm/llvm-project.git 2f51a43f8c2b117e69a45eae6a7c849e035a793b)
Detailed description
In file included from .../opencv/modules/core/src/arithm.cpp:50:
In file included from .../opencv/modules/core/src/precomp.hpp:49:
In file included from .../opencv/modules/core/include/opencv2/core/utility.hpp:56:
In file included from .../opencv/modules/core/include/opencv2/core.hpp:57:
In file included from .../opencv/modules/core/include/opencv2/core/matx.hpp:54:
In file included from .../opencv/modules/core/include/opencv2/core/saturate.hpp:49:
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:200:5: error: invalid instruction
CV_INLINE_ROUND_DBL(value);
^
.../opencv/modules/core/include/opencv2/core/fast_math.hpp:105:40: note: expanded from macro 'CV_INLINE_ROUND_DBL'
__asm__( "fctiw %[temp],%[in]\n\tmffprwz %[out],%[temp]\n\t" : [out] "=r" (out), [temp] "=d" (temp) : [in] "d" ((double)(value)) : ); \
^
<inline asm>:2:2: note: instantiated into assembly here
mffprwz 4,0
^~~~~~~
After investigating the most recent Power ISA (March 29, 2017. Page 131 of the pdf or 113 of the document) mffprwz
is a mnemonic for mfvsrwz
. Specifically:
Extended Mnemonics Equivalent To
mffprwz RA,FRS mfvsrwz RA,FRS
mfvrwz RA,VRS mfvsrwz RA,VRS+32
After investigating clang, it does not implement mffprwz
, instead only mfvsrwz
. I will be passing this along to the llvm project as well but we can fix this here as well, probably faster. I've prepared a patch to follow as well.
Steps to reproduce
- Checkout opencv.
- Make build directory.
cmake <path to source> -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
make -j###
- Receive above error message.