找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3793|回復: 1
打印 上一主題 下一主題
收起左側

關于ARMv8的AARCH架構的neon指令使用

[復制鏈接]
跳轉到指定樓層
樓主
ID:277985 發(fā)表于 2018-1-20 12:05 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
新版ARMv8架構出現(xiàn)了ldn,和stn指令,分別是從內存中載入和存儲,但是小弟關于n的作用不是很理解,希望有大神可以解答。附上st1和st4指令的說明。ST1 (vector, multiple structures)
Store multiple 1-element structures from one, two three or four registers.
Syntax
ST1  { Vt.T }, [Xn|SP]    ; One registerST1  { Vt.T, Vt2.T }, [Xn|SP]    ; Two registersST1  { Vt.T, Vt2.T, Vt3.T }, [Xn|SP]    ; Three registersST1  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP]    ; Four registersST1  { Vt.T }, [Xn|SP], imm    ; One register, immediate offset, Post-indexST1  { Vt.T }, [Xn|SP], Xm    ; One register, register offset, Post-indexST1  { Vt.T, Vt2.T }, [Xn|SP], imm    ; Two registers, immediate offset, Post-indexST1  { Vt.T, Vt2.T }, [Xn|SP], Xm    ; Two registers, register offset, Post-indexST1  { Vt.T, Vt2.T, Vt3.T }, [Xn|SP], imm    ; Three registers, immediate offset, Post-indexST1  { Vt.T, Vt2.T, Vt3.T }, [Xn|SP], Xm    ; Three registers, register offset, Post-indexST1  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP], imm    ; Four registers, immediate offset, Post-indexST1  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP], Xm    ; Four registers, register offset, Post-index
Where:
Vt
Is the name of the first or only SIMD and FP register to be transferred, in the range 0 to 31.

Vt2
Is the name of the second SIMD and FP register to be transferred.

Vt3
Is the name of the third SIMD and FP register to be transferred.

Vt4
Is the name of the fourth SIMD and FP register to be transferred.

imm
Is the post-index immediate offset:
One register, immediate offset
Can be one of #8 or #16.

Two registers, immediate offset
Can be one of #16 or #32.

Three registers, immediate offset
Can be one of #24 or #48.

Four registers, immediate offset
Can be one of #32 or #64.



Xm
Is the 64-bit name of the general-purpose post-index register, excluding XZR, in the range 0 to 31.

T
Is an arrangement specifier, and can be one of the values shown in Usage.

Xn|SP
Is the 64-bit name of the general-purpose base register or stack pointer, in the range 0 to 31.




Note
Vt, Vt2, Vt3, and Vt4 must be consecutive registers. The next consecutive register after V31 is V0.


Usage
The following table shows valid specifier combinations:
Table 182. ST1 (One register, immediate offset) specifier combinations
[td]
T    imm
8B
   
#8
16B
   
#16
4H
   
#8
8H
   
#16
2S
   
#8
4S
   
#16
1D
   
#8
2D
   
#16



Table 183. ST1 (Two registers, immediate offset) specifier combinations
[td]
T    imm
8B
   
#16
16B
   
#32
4H
   
#16
8H
   
#32
2S
   
#16
4S
   
#32
1D
   
#16
2D
   
#32



Table 184. ST1 (Three registers, immediate offset) specifier combinations
[td]
T    imm
8B
   
#24
16B
   
#48
4H
   
#24
8H
   
#48
2S
   
#24
4S
   
#48
1D
   
#24
2D
   
#48



Table 185. ST1 (Four registers, immediate offset) specifier combinations
[td]
T    imm
8B
   
#32
16B
   
#64
4H
   
#32
8H
   
#64
2S
   
#32
4S
   
#64
1D
   
#32
2D
   
#64






ST1 (vector, single structure)
Store single 1-element structure from one lane of one register.
SyntaxST1  { Vt.B }[index], [Xn|SP]    ; 8-bitST1  { Vt.H }[index], [Xn|SP]    ; 16-bitST1  { Vt.S }[index], [Xn|SP]    ; 32-bitST1  { Vt.D }[index], [Xn|SP]    ; 64-bitST1  { Vt.B }[index], [Xn|SP], #1    ; 8-bit, immediate offset, Post-indexST1  { Vt.B }[index], [Xn|SP], Xm    ; 8-bit, register offset, Post-indexST1  { Vt.H }[index], [Xn|SP], #2    ; 16-bit, immediate offset, Post-indexST1  { Vt.H }[index], [Xn|SP], Xm    ; 16-bit, register offset, Post-indexST1  { Vt.S }[index], [Xn|SP], #4    ; 32-bit, immediate offset, Post-indexST1  { Vt.S }[index], [Xn|SP], Xm    ; 32-bit, register offset, Post-indexST1  { Vt.D }[index], [Xn|SP], #8    ; 64-bit, immediate offset, Post-indexST1  { Vt.D }[index], [Xn|SP], Xm    ; 64-bit, register offset, Post-index
Where:
Vt
Is the name of the first or only SIMD and FP register to be transferred, in the range 0 to 31.

index
The value depends on the instruction variant:
8-bit
Is the element index, in the range 0 to 15.

16-bit
Is the element index, in the range 0 to 7.

32-bit
Is the element index, in the range 0 to 3.

64-bit
Is the element index, and can be either 0 or 1.



Xn|SP
Is the 64-bit name of the general-purpose base register or stack pointer, in the range 0 to 31.

Xm
Is the 64-bit name of the general-purpose post-index register, excluding XZR, in the range 0 to 31.




See alsoReference

    A64 SIMD scalar instructions in alphabetical order.
    A64 SIMD vector instructions in alphabetical order.









ST4 (vector, multiple structures)
Store multiple 4-element structures from four registers.
Syntax
ST4  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP]ST4  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP], immST4  { Vt.T, Vt2.T, Vt3.T, Vt4.T }, [Xn|SP], Xm
Where:
Vt
Is the name of the first or only SIMD and FP register to be transferred, in the range 0 to 31.

Vt2
Is the name of the second SIMD and FP register to be transferred.

Vt3
Is the name of the third SIMD and FP register to be transferred.

Vt4
Is the name of the fourth SIMD and FP register to be transferred.

imm
Is the post-index immediate offset, and can be either #32 or #64.

Xm
Is the 64-bit name of the general-purpose post-index register, excluding XZR, in the range 0 to 31.

T
Is an arrangement specifier, and can be one of 8B, 16B, 4H, 8H, 2S, 4S or 2D.

Xn|SP
Is the 64-bit name of the general-purpose base register or stack pointer, in the range 0 to 31.




Note
Vt, Vt2, Vt3, and Vt4 must be consecutive registers. The next consecutive register after V31 is V0.

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

沙發(fā)
ID:277985 發(fā)表于 2018-3-26 16:31 | 只看該作者
有人了解嗎?
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復 返回頂部 返回列表