[Top][All Lists]

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

[Bug gas/15393] New: .string with hex should be parsed differently

From: louis.granboulan.developer at gmail dot com
Subject: [Bug gas/15393] New: .string with hex should be parsed differently
Date: Wed, 24 Apr 2013 09:32:28 +0000


             Bug #: 15393
           Summary: .string with hex should be parsed differently
           Product: binutils
           Version: 2.22
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gas
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified

This happens e.g. when using GNU as 2.22 on an Ubuntu on x86.
I use the Intel syntax (.intel_syntax noprefix)
The string
.string "\x9b23;"
is parsed in two bytes: 0x23 and 0x3b
while I would have expected four bytes: 0x9b 0x32 0x33 0x3b

The reason is that the hex parser does not stop after two characters, and
therefore the hex value is 0x9b23 which becomes the character 0x23

This behaviour is inconsistent with the octal parsing. For example
.string "\23323;"
becomes: 0x9b 0x32 0x33 0x3b
because the octal value is understood to be \233

Given that the behaviour for octal value is expected by gcc, I consider that
the behabiour for hex values is a bug, even if the specifications of GNU as
don't seem to force one behaviour or the other

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]