[Bug gas/14260] New: ARM ldrt instruction causes an internal error.

View: New views
4 Messages — Rating Filter:   Alert me  

[Bug gas/14260] New: ARM ldrt instruction causes an internal error.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=14260

             Bug #: 14260
           Summary: ARM ldrt instruction causes an internal error.
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
        AssignedTo: unassigned@...
        ReportedBy: m.lesniewski@...
    Classification: Unclassified


Created attachment 6455
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6455
Source file, which can be used to reproduce the error.

Using ldrt ARM instruction causes an internal error when the source address is
in the literal pool. An example of an instruction, which causes such behavior:

   ldrt r0, =0x0

Trying to compile a file containing this instruction causes the following
messages to be printed:

foo.S: Assembler messages:
foo.S:6: Internal error!
Assertion failure in encode_arm_addr_mode_common at
/home/docbrown/binutils/binutils-2.19/gas/config/tc-arm.c line 6262.
Please report this bug

I guess the error can be related to the fact, that the ldrt instruction
requires a post-indexing addressing mode. Normally the second operand of the
instruction is a register and the third operand is an offset (immediate value
or register), for example:

   ldrt r0, [r1], #12    ; load one word at address [r1] to r0 and update r1 to
r1 + 12

Of course, using ldrt to load constants from a literal pool makes no sense (or
am I missing something?). I found the error because of a typo in my source file
-- I wanted to use the ldr instruction instead of ldrt. Perhaps the assembler
should not allow such kinds of instructions and automatically suggest using ldr
instead of ldrt in cases like this.

I attached a file, which can be used to reproduce the error.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/14260] ARM ldrt instruction causes an internal error.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=14260

Michał Leśniewski <m.lesniewski at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m.lesniewski at samsung dot
                   |                            |com

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/14260] ARM ldrt instruction causes an internal error.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=14260

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-28 15:38:26 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    nickc@...    2012-06-28 15:38:15

Modified files:
    gas            : ChangeLog
    gas/config     : tc-arm.c
    gas/testsuite  : ChangeLog
    gas/testsuite/gas/arm: ldr-t-bad.l ldr-t-bad.s

Log message:
    PR gas/14260
    * config/tc-arm.c (encode_arm_addr_mode_common): Generate an error
    message if literal pool addressing is used.

    * gas/arm/ldr-t-bad.s: Add test of bogus use of literal pool
    addressing.
    * gas/arm/ldr-t-bad.l: Update expected assembler error message
    output.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4758&r2=1.4759
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?cvsroot=src&r1=1.520&r2=1.521
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2049&r2=1.2050
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/ldr-t-bad.l.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/ldr-t-bad.s.diff?cvsroot=src&r1=1.1&r2=1.2

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/14260] ARM ldrt instruction causes an internal error.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

| View Threaded | Show Only this Message

http://sourceware.org/bugzilla/show_bug.cgi?id=14260

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nickc at redhat dot com
         Resolution|                            |FIXED

--- Comment #2 from Nick Clifton <nickc at redhat dot com> 2012-06-28 15:39:54 UTC ---
Hi Michal,

  Thanks for reporting this bug.  I have checked in a patch to the mainline
development sources which fixes the assembler so that it generates an error
message:

  Error: Instruction does not support =N addresses -- `ldrt r0,=0x0'

Cheers
  Nick

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@...
https://lists.gnu.org/mailman/listinfo/bug-binutils