gpt4 book ai didi

android-ndk - ARM clang : couldn't allocate output register for constraint 'w'

转载 作者:行者123 更新时间:2023-12-05 06:38:34 24 4
gpt4 key购买 nike

uint8_t* dataPtr;
uint8x8x4_t dataVec;
__asm__ __volatile__( "vldmia %1, %h0" : "=w"( dataVec ) : "r"( dataPtr ) );

当使用 GCC 工具链为 armeabi-v7a ABI 使用 Android NDK 编译时,以上 ARM 内联汇编代码工作正常。但是,当我切换到 Clang

时出现以下编译器错误

error: couldn't allocate output register for constraint 'w'

根据 LLVM docs ,约束 'w' 可用于 ARM 目标上的 SIMD 寄存器。

我错过了什么吗?有没有人遇到过这个问题?是 LLVM 中的错误吗?

谢谢

最佳答案

如 LLVM 文档中所述:

The constraint codes are, in general, expected to behave the same way they do in GCC. LLVM’s support is often implemented on an ‘as-needed’ basis, to support C inline asm code which was supported by GCC. A mismatch in behavior between LLVM and GCC likely indicates a bug in LLVM.

也许您最好在 https://bugs.llvm.org/ 上报告此事

关于android-ndk - ARM clang : couldn't allocate output register for constraint 'w' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45766812/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com