public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
@ 2014-03-02 12:04 ` m_nistor at yahoo dot com
  2014-03-02 15:11 ` paolo.carlini at oracle dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-02 12:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Nistor, Mihail-Marian <m_nistor at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |blocker


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
  2014-03-02 12:04 ` [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards m_nistor at yahoo dot com
@ 2014-03-02 15:11 ` paolo.carlini at oracle dot com
  2014-03-03  8:06 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-02 15:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
  2014-03-02 12:04 ` [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards m_nistor at yahoo dot com
  2014-03-02 15:11 ` paolo.carlini at oracle dot com
@ 2014-03-03  8:06 ` jakub at gcc dot gnu.org
  2014-03-03 17:52 ` m_nistor at yahoo dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-03  8:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It uses the DWARF ABI register number mapping for .debug_frame and a slightly
different one for .eh_frame.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-03-03  8:06 ` jakub at gcc dot gnu.org
@ 2014-03-03 17:52 ` m_nistor at yahoo dot com
  2014-03-06  5:05 ` [Bug target/60387] " m_nistor at yahoo dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-03 17:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #2 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
More details about how to reproduce the first problem. 
By using the gcc version - GNU C 4.8.1 20130531 (Wed Sep 4 08:04:01 CDT 2013)
I have defined a local variable (vf1) that has a vector resister as storage
class, the C definition is below:
register vector float vf1 = {0.1f, 0.2f, 0.3f, 0.4f};
A piece of dump from .debug_info is below: 
<2><24f>: Abbrev Number: 7 (DW_TAG_variable)
    <250>   DW_AT_name        : vf1    
    <254>   DW_AT_decl_file   : 1    
    <255>   DW_AT_decl_line   : 13    
    <256>   DW_AT_type        : <0x2ee>    
    <25a>   DW_AT_location    : 2 byte block: 90 64     (DW_OP_regx: 100
(r100)) // the correct expression should be: (DW_OP_regx: 1124 (r1124))
A piece of dump from .debug_frame is below:
000000d0 00000034 000000c0 FDE cie=000000c0 pc=0010018c..001002fc
  DW_CFA_advance_loc: 4 to 00100190
  DW_CFA_def_cfa_offset: 192
  DW_CFA_advance_loc: 84 to 001001e4
  DW_CFA_offset_extended_sf: r65 at cfa+4
  DW_CFA_offset: r31 at cfa-4
  DW_CFA_offset_extended: r100 at cfa-160 // the correct expression should be:
r1124 at cfa-160

As you can see, the compiler uses a wrong DWARF register index for vector
register, in this case the compiler should generate  1124 (r1124) instead of
100 (r100), so the ppc gcc compiler is not compatible with the PPC ABI. 

Please let me know if you need more information to reproduce the second
problem.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-03-03 17:52 ` m_nistor at yahoo dot com
@ 2014-03-06  5:05 ` m_nistor at yahoo dot com
  2014-03-06  7:19 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-06  5:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #4 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
Created attachment 32281
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32281&action=edit
I have attached all information you requested.

I have attached all information you requested. As you can see, in the
main.o.txt file the section .debug_frame was not generated for the C++
application.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-03-06  5:05 ` [Bug target/60387] " m_nistor at yahoo dot com
@ 2014-03-06  7:19 ` pinskia at gcc dot gnu.org
  2014-03-06  7:43 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-06  7:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://sourceware.org/ml/gdb-patches/2012-11/msg00682.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-03-06  7:19 ` pinskia at gcc dot gnu.org
@ 2014-03-06  7:43 ` pinskia at gcc dot gnu.org
  2014-03-06  9:37 ` m_nistor at yahoo dot com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-06  7:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
http://gcc.gnu.org/ml/gcc-patches/2009-06/msg00159.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40521#c3

https://www.sourceware.org/ml/binutils/2009-10/msg00028.html



We only emit debug_frame iff eh_frame is not being emitted (so -fno-exceptions
or normal C code).  Since this is duplicated information, we don't need extra
information and have extra space.  Yes eh_frame and debug_frame for PPC use two
different numbers but that is a fact of life and you need to live with it as
the ABI is fixed for both.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-03-06  7:43 ` pinskia at gcc dot gnu.org
@ 2014-03-06  9:37 ` m_nistor at yahoo dot com
  2014-03-06  9:49 ` m_nistor at yahoo dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-06  9:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #7 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
Hello,

Doe to the fact that the gcc is not compatible with the DWARF and PPC ABI for
the PPC processors, as you said that is a fact of life and we need to live with
it. Users must always be informed when a compiler does not comply with an ABI,
so please add a notice in the release note to inform the user that the ppc gcc
is not compatible with the DWARF and PPC ABI. And please also add information
about exception from these standards and provide information about the new
DWARF register number mapping that is used by gcc in the .eh_frame section. 
My 2 cents.
Mihai


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-03-06  9:37 ` m_nistor at yahoo dot com
@ 2014-03-06  9:49 ` m_nistor at yahoo dot com
  2014-03-06 10:04 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-06  9:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Nistor, Mihail-Marian <m_nistor at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #8 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
Hello,

Doe to the fact that the gcc is not compatible with the DWARF and PPC ABI for
the PPC processors, as you said that is a fact of life and we need to live with
it. Users must always be informed when a compiler does not comply with an ABI,
so please add a notice in the release note to inform the user that the ppc gcc
is not compatible with the DWARF and PPC ABI. And please also add information
about exception from these standards and provide information about the new
DWARF register number mapping that is used by gcc in the .eh_frame section. 
My 2 cents.
Mihai


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-03-06  9:49 ` m_nistor at yahoo dot com
@ 2014-03-06 10:04 ` pinskia at gcc dot gnu.org
  2014-03-06 12:33 ` m_nistor at yahoo dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-06 10:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Please read the links I gave.  They give the background on what is going on and
why even we cannot change it.  Having the eh_frame being different from
debug_frame is now part of the GNU ABI and cannot be changed.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2014-03-06 10:04 ` pinskia at gcc dot gnu.org
@ 2014-03-06 12:33 ` m_nistor at yahoo dot com
  2014-03-06 12:38 ` jakub at gcc dot gnu.org
  2014-03-06 19:21 ` m_nistor at yahoo dot com
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-06 12:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #10 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
Could you please show me where this information is in the GNU ABI?
My request is to add all exceptions from the standards to release note.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2014-03-06 12:33 ` m_nistor at yahoo dot com
@ 2014-03-06 12:38 ` jakub at gcc dot gnu.org
  2014-03-06 19:21 ` m_nistor at yahoo dot com
  12 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 12:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
But what exceptions are you talking about?  I believe for .dwarf_frame PPC now
emits the psABI mandated register numbers, and .eh_frame, being a GCC
invention, simply has different register numbering, there is no reason why it
would need to follow the psABI, it has it's own ABI (of course it would be
better if it used the same register numbering, and it does on most targets). 
So what exactly you want to document and why?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
       [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-03-06 12:38 ` jakub at gcc dot gnu.org
@ 2014-03-06 19:21 ` m_nistor at yahoo dot com
  12 siblings, 0 replies; 13+ messages in thread
From: m_nistor at yahoo dot com @ 2014-03-06 19:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #12 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
The ppc gcc uses the DWARF register number mapping that is defined by the
psABI, but the main problem is: the psABI is for AI32/64 architectures. The
DWARF register number mapping is also used to encode all debug data information
so the affected DWARF sections are:  .debug_info and .debug_frame. The ppc gcc
must document division from the PPC ABI standard (see an example at comment 2).
It should also specify that the internal/unofficial DWARF register number
mapping will be used for .eh_frame and DWARF standard.
The AI32/64 ABI consists of the following: psABI, ABI-EH and SWCONV (see more
information at http://mentorembedded.github.io/cxx-abi/abi.html on 1.5 Base
Document). An important notice here is the primary API for this architecture
(psABI) refers ABI-EH and SWCONV documents. In the SWCONV document the AI32/64
describes how the debugger should access the data that are particular for this
architecture (see more information in 11. Stack Unwinding and Exception
Handling chapter).

I didn’t see any documents on how the support is done for PPC architecture.
This document must be provided and the PPC ABI must refer to it.

I don’t think that the most important rules from the “11.3 Coding Conventions
for Reliable Unwinding” chapter from SWCONV were followed by the ppc gcc
implementation. The “prolog” and “epilog”   ranges do not obey these rules
defined in 11 chapter.

Until the above problems is solved we have a reference from DWARF3/4 that
should be resolved by using undocumented ABI (the test case is: the debugger
should compute the location for a local variable that is related to the frame
base (DW_AT_location is defined as DW_OP_fbreg) and the value for
DW_AT_frame_base is defined as DW_OP_call_frame_cfa for current function).  

I have been looking to see a full specification and implementation for this
custom solution.
>From gcc-bugs-return-445659-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 06 19:41:34 2014
Return-Path: <gcc-bugs-return-445659-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16046 invoked by alias); 6 Mar 2014 19:41:34 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16025 invoked by uid 48); 6 Mar 2014 19:41:31 -0000
From: "chengniansun at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/60442] No -Wparentheses warning for "if (a += b)"
Date: Thu, 06 Mar 2014 19:41:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: chengniansun at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60442-4-n9xSeSuytB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60442-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60442-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-03/txt/msg00528.txt.bz2
Content-length: 451

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`442

--- Comment #3 from Chengnian Sun <chengniansun at gmail dot com> ---
(In reply to Jakub Jelinek from comment #1)
> I'm not convinced there is anything wrong.  The reason to warn about if(a > b) or if(a = a + b) is that way too often people just mean to write if(a => b)
> or if(a == a + b) instead, but confusing += for == happens orders of
> magnitude less often.

Thanks, Jakub and Jonathan.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-03-06 19:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-60387-4@http.gcc.gnu.org/bugzilla/>
2014-03-02 12:04 ` [Bug c++/60387] The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards m_nistor at yahoo dot com
2014-03-02 15:11 ` paolo.carlini at oracle dot com
2014-03-03  8:06 ` jakub at gcc dot gnu.org
2014-03-03 17:52 ` m_nistor at yahoo dot com
2014-03-06  5:05 ` [Bug target/60387] " m_nistor at yahoo dot com
2014-03-06  7:19 ` pinskia at gcc dot gnu.org
2014-03-06  7:43 ` pinskia at gcc dot gnu.org
2014-03-06  9:37 ` m_nistor at yahoo dot com
2014-03-06  9:49 ` m_nistor at yahoo dot com
2014-03-06 10:04 ` pinskia at gcc dot gnu.org
2014-03-06 12:33 ` m_nistor at yahoo dot com
2014-03-06 12:38 ` jakub at gcc dot gnu.org
2014-03-06 19:21 ` m_nistor at yahoo dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).