- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试为 arm64 构建一个用于 iOS 的 C 库 (GMP 6.0.0)。我正在使用下面的调用运行配置脚本(编译器是使用 xcrun --find 找到的)。
./configure \
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" \
CPP="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E" \
CPPFLAGS="-target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0" \
--host=aarch64-apple-darwin
然而,这在以下行(“long long reliability test 1”)失败了:
checking compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O2 -pedantic -target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0... no, long long reliability test 1
configure: error: could not find a working compiler, see config.log for details
完整的 config.log 可用 here . long long long reliability test compile显示多个warning和error,包括:
conftest.c:9:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
^
conftest.c:10:44: error: implicit declaration of function 'h' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:48: error: implicit declaration of function 'g' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:100: warning: control reaches end of non-void function [-Wreturn-type]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
使用 --host=none
它工作正常,但我真的很想弄清楚如何使用针对 arm64 优化的程序集来构建它。
我的系统是 x86_64-apple-darwin13.1.0(或根据 config.guess 的 coreisbr-apple-darwin13.1.0),一个运行 OS X v10.9.2 的早期 '11 Core i7 MBP。我正在使用 Xcode 5.1 (5B130a)。
感谢任何帮助。
编辑 1
针对 ARMv7 的编译通过配置,但在 make 上失败(完整配置/make 输出 here ),显然是在编译某些程序集时:
tmp-dive_1.s:165:18: error: unexpected token in '.section' directive
.section .rodata
^
编辑 2
@MarcGlisse:通过强制 clang 忽略建议的错误 (-Wno-...) arm64 通过配置,但随后在 make 上失败(完整输出 here ):
tmp-mul_1.s:59:2: error: unrecognized instruction mnemonic
bcc Lfi1
^
tmp-mul_1.s:60:2: error: unrecognized instruction mnemonic
beq Lfi2
^
作为旁注:these commits ,我假设旨在消除抑制错误的需要,但似乎不起作用,即在去除抑制时我得到了同样的错误。
对于 armv7,使用 these commits按照建议修复 .section 错误,但稍后 make 失败并显示以下内容(完整输出 here ):
tmp-mode1o.s:64:2: error: unknown directive
.protected ___gmp_binvert_limb_table
^
编辑 3
使用建议的编辑,armv7、armv7s、i386 和 x86_64 现在都可以使用汇编编译!
对于 arm64,编辑使其克服了先前的错误,但现在给出了几个关于无效输入约束“rZ”的错误,所有错误都在同一个文件中(完整输出 here):
divrem_1.c:237:5: error: invalid input constraint 'rZ' in asm
udiv_qrnnd_preinv (*qp, r, r, nshift, d, dinv);
^
../gmp-impl.h:3062:2: note: expanded from macro 'udiv_qrnnd_preinv'
add_ssaaaa (_qh, _ql, _qh, _ql, (nh) + 1, (nl)); \
^
../longlong.h:551:7: note: expanded from macro 'add_ssaaaa'
: "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
编辑 4
在 longlong.h 中注释掉 add_ssaaaa
和 sub_ddmmss
并在 gcd_1.asm 中编辑更多汇编指令(blo
到 b.lo
等),它现在失败并出现以下几个错误(完整输出 here ):
tmp-invert_limb.s:75:22: error: immediate value expected for shifter operand
add x1, x1, x2, lsr 1
^
tmp-invert_limb.s:75:22: error: invalid operand for instruction
add x1, x1, x2, lsr 1
^
稍后我会发布一个总差异。
编辑 5
好的,这让我们更进一步,但它现在进入(完整输出 here):
tmp-invert_limb.s:52:2: error: ADR/ADRP relocations must be GOT relative
adrp x1, approx_tab
^
如果这种情况持续下去,最好通过电子邮件继续。
最佳答案
“支持 ARM64 别名 Aarch64 别名 ARMv8”
关于ios - 为 arm64 iOS 构建 C 库 (GMP),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22754077/
将 ARM 处理器模式与 x86 操作模式(ring0 到 ring 3)进行比较,用户模式看起来就像 ring3,用户空间程序在其中运行。 但是,我无法将 ring0 与系统模式或主管模式联系起来。
为什么我们在 ARM 架构中有暂存寄存器?处理器如何使用它,我的意思是这个寄存器的用途是什么? 最佳答案 来自 Procedure Call Standard for the Arm Architec
我了解弱内存模型和强内存模型的基本区别。但是没有确切的弱定义,它取决于体系结构(这里是 ARM)。 我已经阅读了有关 ARM 信息中心的文档,但仍有很多内容不清楚。有人可以列出 - ARM 保证哪些内
我想在 arm 9 上分析我的代码,是否有任何分析器可以给我函数调用时间和每个函数占用的总周期?我更喜欢任何免费的分析器。我喜欢在 Linux 中使用 kcachegrind。 最佳答案 我不知道有什
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 7 年前。 Improve this qu
众所周知,对于X86架构:按下电源按钮后,机器开始执行0xFFFFFFF0处的代码,然后开始执行BIOS中的代码以进行硬件初始化。 BIOS 执行后,它使用引导加载程序将操作系统镜像加载到内存中。最后
我有 rootfs 和 klibc 文件系统。我正在创建 make 规则,而一些开发人员的编译器较旧,但没有联网。note1 我正在尝试验证所有文件都是使用 arm 仅当检测到某个版本的编译器时。我已
在部署实际应用程序之前,我们使用 ARM 模板部署 Azure 资源,作为构建过程的一部分。 到目前为止,我们所有的应用程序资源都自包含在资源组中。例如需要 SQL Server 和存储帐户的 Web
为什么 ARM Controller 在发生异常时要从 THUMB 状态返回到 ARM 状态? 最佳答案 一种解释可能是 ARM 模式是 CPU 的“ native ”操作模式,与有限的 Thumb
我正在尝试反转 128 位向量 (uint16x8) 的顺序。 例如,如果我有 a b c d e f g h 我想获得 h g f e d c b a 有没有一种简单的方法可以使用 NEON 内在函
有很多关于内存屏障的信息。大多数信息是指多核或多处理器架构。 Stackoverflow 上的某个地方还指出,单核处理器不需要内存屏障。 到目前为止,我找不到任何明确的解释,为什么单核 CPU 上不需
我想在 ARM Cortex A8 处理器上移植一小段代码。 L1 缓存和 L2 缓存都非常有限。我的程序中有 3 个数组。其中两个是顺序访问的(大小> 数组 A:6MB 和数组 B:3MB),第三个
我无法弄清楚这个 ARM 指令是做什么的: strd.w r0, r1, [r2] 我知道这是一个存储指令,它在 *r2 中存储了一些东西。但我不完全确定是什么。为什么有两个源寄存器
我很好奇为什么有些 ARM 指令(如 MUL 和 ADD)不使用桶形移位器。我想知道极限背后的理性。谢谢! 最佳答案 并不是没有使用桶形移位器;这是您无法指定它在非常具体的指令(数据处理和加载/存储)
我需要计算与 SSE 相同的操作: __m128i result1=_mm_avg_epu8 (upper, lower); 使用 NEON,我执行以下操作: uint8x16_t result1=v
我正在尝试使用 PLD 指令。我面临的问题如下: int32_t addr[10]; asm ("PLD [addr,#5]"); 我收到以下错误: Error: ARM register expec
根据 ARM 手册,应该可以访问特定 CPU 模式的存储寄存器,例如“r13_svc”。当我尝试执行此操作时,gcc 对我大喊大叫,并显示以下错误: 立即表达式需要 # 前缀 -- `mov r2,s
我正在使用 mbxxx 目标开发 Contiki 2.7。在构建我的代码时,链接器提示 .ARM.exidx 和 .data 部分的重叠 .在修改了链接器脚本 contiki-2.7/cpu/stm3
如何确定给定 ARM 处理器上是否存在 NEON 引擎?可以为此目的查询任何状态/标志寄存器吗? 最佳答案 我相信unixsmurf's answer如果使用具有特权内核的操作系统,这将与您获得的一样
如何在设备上分析我的 ARM 代码。 这是涉及 USB 和 SDH 处理的裸机代码,我看到了这个 Code Profiler for ARM但似乎很 slim ,我很熟悉DS5但如果您使用基于 lin
我是一名优秀的程序员,十分优秀!