bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/23136] New: [ARM] Branch range check not working properly for t


From: andre.simoesdiasvieira at arm dot com
Subject: [Bug gas/23136] New: [ARM] Branch range check not working properly for thumb-2 'bl' instruction *
Date: Thu, 03 May 2018 14:25:35 +0000

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

            Bug ID: 23136
           Summary: [ARM] Branch range check not working properly for
                    thumb-2 'bl' instruction *
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: andre.simoesdiasvieira at arm dot com
  Target Milestone: ---

Hello,

When assembling the following bit of assembly for any Thumb-2 target:
.syntax unified
.thumb
bl sym
.space 0x1ffffff
sym: bx lr

The assembler accepts this and generates a bl with a 'wrapped-around' offset:
Disassembly of section .text:

00000000 <sym-0x2000003>:
       0:       f7ff ffff       bl      2 <sym-0x2000001>
        ...

02000003 <sym>:
 2000003:       4770            bx      lr
        ...

This doesn't seem quite right to me. Note that using 'b.w' instead of 'b',
which has the same  –16777216,16777214 offset range, will produce a diagnostic
'branch out of range'.

Regards,
Andre

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