bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/20429] New: ARM: too many registers allowed for vpush/vpop


From: pexu at sourceware dot mail.kapsi.fi
Subject: [Bug gas/20429] New: ARM: too many registers allowed for vpush/vpop
Date: Tue, 02 Aug 2016 07:16:39 +0000

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

            Bug ID: 20429
           Summary: ARM: too many registers allowed for vpush/vpop
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: pexu at sourceware dot mail.kapsi.fi
  Target Milestone: ---

Created attachment 9418
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9418&action=edit
vpush and vpop with too many D and Q registers

as doesn't currently check that no more than 16 D or 8 Q registers are given
for vpush and vpop instructions. This limit is mandated by ARMv7 and ARMv8
architecture specifications.

as does, though, properly check the above limit for vldm and vstm instructions
(do_neon_ldm_stm). However, do_vfp_nsyn_push or do_vfp_nsyn_pop do not check
that the number of D or Q registers do not exceed the limit.

Moreover, vpush and vpop mnemonics are currently considered "unique to VFP" in
the source code. This is likely wrong, as e.g. ARM compiler toolchain assembler
reference at least since 2010 (v4.1) categorises these instructions as shared
between NEON and VFP (and mentions the D/Q register limitation).

Attached test file.

as -march=armv7-a -mfpu=neon vpushpop.S && objdump a.out

Should catch and reject all vpush/vpop instructions in the file. Currently
assembles as:

00000000 <.text>:
   0:   ed2d0b40        vpush   {d0-d31}
   4:   ed2d1b22        vpush   {d1-d17}
   8:   ecbd1b22        vpop    {d1-d17}
   c:   ecbd0b40        vpop    {d0-d31}
  10:   ed2d0b40        vpush   {d0-d31}
  14:   ed2d2b24        vpush   {d2-d19}
  18:   ecbd2b24        vpop    {d2-d19}
  1c:   ecbd0b40        vpop    {d0-d31}

in which all the instructions will raise undefined instruction exception, as
imm8 (i.e. the number of push/pop'd registers [times two]) is out of range.

-- 
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]