简体   繁体   English

将ARM NEON代码移植到AARCH64,很多问题

[英]Porting ARM NEON code to AARCH64, many questions

I'm porting some ARM NEON code to 64-bit ARM-v8, but I can't find a good documentation about it. 我正在将一些ARM NEON代码移植到64位ARM-v8,但我找不到关于它的好文档。

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? 因此,一般的问题是:我在哪里可以找到新的SIMD实现的完整参考,包括如何执行许多ARM-NEON教程中解释的相同简单任务的说明?

Some questions about particular features: 关于特定功能的一些问题:

1 - How do I load a value in all the lane of a Dx register? 1 - 如何在Dx寄存器的所有通道中加载一个值? 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? 2 - 如何使用交错数据加载多个Dx / Qx寄存器? 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) 我知道这是一个全新的模型,但它没有很好的记录(或者至少,我无法找到任何可读样本的参考)

The documentation on using ARMv8 in Android is not very good, but for your specific questions, they're answered quite well in this document: 关于在Android中使用ARMv8的文档不是很好,但针对您的具体问题,本文档中的答案非常好:

ARMv8 Instruction Set Overview ARMv8指令集概述

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM