[Bug target/81988] New: [7/8 Regression] sparc64: emits STD instruction with odd register

jcowgill+gcc at jcowgill dot uk gcc-bugzilla@gcc.gnu.org
Fri Aug 25 21:28:00 GMT 2017


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

            Bug ID: 81988
           Summary: [7/8 Regression] sparc64: emits STD instruction with
                    odd register
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcowgill+gcc at jcowgill dot uk
  Target Milestone: ---

Created attachment 42047
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42047&action=edit
testcase

FFmpeg in Debian fails to build on sparc64 with GCC 7 and when I tried using
the latest GCC 8. It fails with an assembler message:

> /tmp/cc4Rj2im.s: Assembler messages:
> /tmp/cc4Rj2im.s:38973: Error: Illegal operands
> /tmp/cc4Rj2im.s:39002: Error: Illegal operands
> /tmp/cc4Rj2im.s:39098: Error: Illegal operands
> /tmp/cc4Rj2im.s:39120: Error: Illegal operands

I've attached a reduced testcase which fails on GCC 7 and 8 with the same kind
of error. This issue is an STD instruction which tries to store an odd numbered
register which is not allowed:

> !(insn 237 287 280 (set (mem/c:DI (reg:DI 28 %i4 [334]) [7 %sfp+-9016 S8 A64])
> !        (reg:DI 39 %f7 [+-4 ])) "reduce.c":13 125 {*movdi_insn_sp64}
> !     (expr_list:REG_DEAD (reg:DI 28 %i4 [334])
> !        (expr_list:REG_DEAD (reg:SI 40 %f8)
> !            (nil))))
> 	std	%f7, [%i4]	! 237	*movdi_insn_sp64/9	[length = 1]

The testcase should be compiled using:
> gcc -fPIE -fstack-protector-all -O3 -c reduce.c

James


More information about the Gcc-bugs mailing list