bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/27519] New: GNU AS does not support SUBSPL syntax


From: caij2003 at gmail dot com
Subject: [Bug gas/27519] New: GNU AS does not support SUBSPL syntax
Date: Fri, 05 Mar 2021 02:56:25 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27519

            Bug ID: 27519
           Summary: GNU AS does not support SUBSPL syntax
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: caij2003 at gmail dot com
  Target Milestone: ---

According to "ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition",
the subtraction instruction of registers has the following syntax:

SUB{S}{<c>}{<q>} {<Rd>,} <Rn>, <Rm> {, <shift>}

However, GNU AS does not support such syntax:

$ cat foo.s 
subspl r3, r3, r8

$ arm-linux-gnueabihf-as foo.s -o gcc.o
foo.s: Assembler messages:
foo.s:2: Error: bad instruction `subspl r3,r3,r8'

In the above code, PL is is one of possible condition codes for <c> in the SUB
instruction. However, GAS supports a slightly different syntax:

$ cat bar.s 
subpls r3, r3, r8

$ arm-linux-gnueabihf-as bar.s -o gcc.o
$ arm-linux-gnueabihf-objdump -d gcc.o

gcc.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <.text>:
   0:   50533008        subspl  r3, r3, r8

Note objdump prints subspl instead of subpls. Clang only supports the official
syntax, so code written with the GNU syntax would not be compatible with Clang.

Links:
https://developer.arm.com/documentation/ddi0406/cd

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]