Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armv7 cpu 编译错误 #10

Open
nicheng0019 opened this issue Jul 4, 2023 · 2 comments
Open

armv7 cpu 编译错误 #10

nicheng0019 opened this issue Jul 4, 2023 · 2 comments

Comments

@nicheng0019
Copy link

使用./android_build.sh -m armeabi-v7a 命令编译,报错如下:

/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:27:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #64]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #64]subs ${1:w}, ${1:w}, #1bne 3b'
"prfm pldl1keep, [%[b_ptr], #64]\n"
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:27:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #64]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #64]subs ${1:w}, ${1:w}, #1bne 3b'
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:27:13: error: invalid instruction
:1:2: note: instantiated into assembly here
prfm pldl1keep, [r0, #64]
^~~~
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:29:14: error: operand must be a register in range [r0, r15]
"ldr d2, [%[b_ptr]]\n"
^
:3:5: note: instantiated into assembly here
ldr d2, [r0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:30:14: error: unexpected token in argument list
"fmla v3.4s, v2.4s, v1.s[0]\n"
^
:4:24: note: instantiated into assembly here
fmla v3.4s, v2.4s, v1.s[0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:32:14: error: invalid instruction
"prfm pldl1keep, [%[b_ptr], #64]\n"
^
:6:1: note: instantiated into assembly here
prfm pldl1keep, [r0, #64]
^~~~
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:33:14: error: unexpected token in operand
"subs %w[K], %w[K], #1\n"
^
:7:6: note: instantiated into assembly here
subs , , #1
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:41:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #512]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #512]subs ${1:w}, ${1:w}, #1bne 3b'
"prfm pldl1keep, [%[b_ptr], #512]\n"
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:41:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #512]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #512]subs ${1:w}, ${1:w}, #1bne 3b'
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:41:13: error: invalid instruction
:1:2: note: instantiated into assembly here
prfm pldl1keep, [r0, #512]
^~~~
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:43:14: error: operand must be a register in range [r0, r15]
"ldr d2, [%[b_ptr]]\n"
^
:3:5: note: instantiated into assembly here
ldr d2, [r0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:44:14: error: unexpected token in argument list
"fmla v3.4s, v2.4s, v1.s[0]\n"
^
:4:24: note: instantiated into assembly here
fmla v3.4s, v2.4s, v1.s[0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:46:14: error: invalid instruction
"prfm pldl1keep, [%[b_ptr], #512]\n"
^
:6:1: note: instantiated into assembly here
prfm pldl1keep, [r0, #512]
^~~~
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:47:14: error: unexpected token in operand
"subs %w[K], %w[K], #1\n"
^
:7:6: note: instantiated into assembly here
subs , , #1
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:63:13: error: register expected
"ld1 {v1.4s}, [%[a_ptr]]\n"
^
:1:7: note: instantiated into assembly here
ld1 {v1.4s}, [r0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:64:14: error: register expected
"ld1 {v2.4s}, [%[a_ptr]]\n"
^
:2:6: note: instantiated into assembly here
ld1 {v2.4s}, [r0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:65:14: error: register expected
"ld1 {v3.4s}, [%[a_ptr]]\n"
^
:3:6: note: instantiated into assembly here
ld1 {v3.4s}, [r0]
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:41:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #512]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #512]subs ${1:w}, ${1:w}, #1bne 3b'
"prfm pldl1keep, [%[b_ptr], #512]\n"
^
/workspace/mperf/apps/cpu_pmu_analysis/prefetch.cpp:41:13: error: invalid operand in inline asm: 'prfm pldl1keep, [$0, #512]3:ldr d2, [$0]fmla v3.4s, v2.4s, v1.s[0]add $0, $0, #64prfm pldl1keep, [$0, #512]subs ${1:w}, ${1:w}, #1bne 3b'
fatal error: too many errors emitted, stopping now [-ferror-limit=]

@waterdropw
Copy link

报错的都是内联汇编代码,目前只有A64的,A32/v7的汇编基本上需要重新实现,不确定官方还会不会支持,一些IoT设备的优化会用到吧。

@nicheng0019
Copy link
Author

报错的都是内联汇编代码,目前只有A64的,A32/v7的汇编基本上需要重新实现,不确定官方还会不会支持,一些IoT设备的优化会用到吧。

好的,多谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants