VST/VLD命令中的ARM汇编语法 [英] ARM assembly syntax in VST/VLD commands

查看:197
本文介绍了VST/VLD命令中的ARM汇编语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用arm-none-linux-gnueabi-gcc工具链来构建一个项目,该项目涉及将一些程序集文件链接在一起.

I'm using the arm-none-linux-gnueabi-gcc toolchain to build a project which involves linking some assembly files together.

其中一个汇编文件包含多个命令,如下所示:

One of the assembly files contains multiple commands as this:

vst1.64 {q4}, [r0:64]        @offload A[0..1][4]

据我所知,根据

As far as I know, according to the ARM Assembler Reference the command is suppose to store the contents of register q4 in a part of a memory which is aligned by 64 bits and the text after the At-sign is just a comment. However, when I want to build the project the below message is given:

Error: ']' expected -- `vst1.64 {q4},[r0:64]'

这意味着存在某种语法错误. 如下所示修改行后,错误消失了:

Which means there is some sort of syntax error. After modifying the line as below the error is gone:

vst1.64 {q4}, [r0,:64]        @offload A[0..1][4]

我想知道此修改是否会使该行做一些不同的事情.还有其他方法可以解决此错误吗?

I wanted to know if this modification causes the line to do some thing different or not. Is there any other way to fix this error?

推荐答案

您的修复程序似乎正确.用于对齐的正确语法确实包含逗号,但是某些版本的binutils确实也支持省略逗号.两者之间的含义没有区别,只是解析器的严格程度不同.两者都汇编成完全相同的指令.

Your fix seems correct. The correct syntax for alignment does contain the comma, but some versions of binutils do support leaving out the comma as well. There's no difference in meaning between the two, just different strictness of the parser. Both assemble into the exact same instruction.

GNU binutils 2.25和2.30似乎接受两种形式.

GNU binutils 2.25 and 2.30 seem to accept both forms.

$ cat test.s
        .text
        .syntax unified
        vst1.64 {q4}, [r0:64]
        vst1.64 {q4}, [r0,:64]
$ arm-linux-gnueabihf-as -c test.s -o test.o -mfpu=neon
$ arm-linux-gnueabihf-objdump -d test.o

test.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <.text>:
   0:   f4008adf        vst1.64 {d8-d9}, [r0 :64]
   4:   f4008adf        vst1.64 {d8-d9}, [r0 :64]

这篇关于VST/VLD命令中的ARM汇编语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆