Porting ARM NEON code to AARCH64, many questions

你说的曾经没有我的故事 提交于 2019-12-10 17:53:55

问题


I'm porting some ARM NEON code to 64-bit ARM-v8, but I can't find a good documentation about it.

Many features seems to be gone, and I don't know how to implement the same function without using them.

So, the general question is: where can I find a complete reference for the new SIMD implementation, including explanation of how to do the same simple tasks which are explained in the many ARM-NEON tutorials?

Some questions about particular features:

1 - How do I load a value in all the lane of a Dx register? The old code was

    mov R0, #42
    vdup.8 D0, R0

My guess is:

    mov W0, #42
    dup V0.8B, W0

2 - How do I load multiple Dx/Qx registers with interleaved data? In the old code this was:

    vld4.8 {D0-D3}, [R0]!

But I can't find anything in the new docs.

I understand it's a completely new model, but it's not very well-documented (or at least, I'm unable to find any reference with readable samples)


回答1:


The documentation on using ARMv8 in Android is not very good, but for your specific questions, they're answered quite well in this document:

ARMv8 Instruction Set Overview

To answer your specific questions:

mov R0, #42
vdup.8 D0, R0

becomes

mov w0,#42
dup v0.8b,w0

and

vld4.8 {d0-d3}, [r0]!

becomes

 ld4 {v0.8b,v1.8b,v2.8b,v3.8b},[x0],#32


来源:https://stackoverflow.com/questions/28050300/porting-arm-neon-code-to-aarch64-many-questions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!