https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82118

            Bug ID: 82118
           Summary: Instruction `lsrsne` unknown
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pmenzel+gcc at molgen dot mpg.de
  Target Milestone: ---

>From the discussion of a change-set for coreboot [1], it turns out that GCC
does not understand valid instructions.

```
$ arm-linux-gnueabi-gcc-7 --version
arm-linux-gnueabi-gcc-7 (Debian 7.2.0-1) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat mov1.S
        lsrsne r0, r0, #4
$ arm-linux-gnueabi-gcc-7 mov1.S -c -o mov1.gas
mov1.S: Assembler messages:
mov1.S:1: Error: bad instruction `lsrsne r0,r0,#4'
$ cat mov1.S
        lsrsne r0, r0, #4
$ arm-linux-gnueabi-gcc-7 mov2.S -c -o mov2.gas
```

Julius Werner comments as below.

> FWIW, the ARMv7 A.R.M. says the S comes before the condition code, so this
> should've been MOVSNE instead of MOVNES anyway. It also doesn't explicitly
> allow a source operand shift for MOV, so LSRSNE should be the correct form. I
> bet GCC just has a few additional non-standard aliases, but I would be
> surprised if it can't recognize the official and most obvious notation
> (LSRSNE).

But there is an error in GCC.

[1] https://review.coreboot.org/21358/

Reply via email to