public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch gas]: Set correct dwarf2 return column value for x64 windows target
@ 2011-01-21 16:07 Kai Tietz
  2011-01-26  9:41 ` Kai Tietz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kai Tietz @ 2011-01-21 16:07 UTC (permalink / raw)
  To: Binutils; +Cc: Nick Clifton

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Hello,

this patch corrects the value of dwarf2_return_column in tc-i386 for
x64 windows, which has a different call-clobber set.

ChangeLog

2011-01-21  Kai Tietz

        * config/tc-i386.c (md_begin): Set for x64 windows COFF target
        x86_dwarf2_return_column to 32.

Tested for x86-64-pc-mingw32. Ok for apply?

Regards,
Kai

[-- Attachment #2: dw2_retcol.txt --]
[-- Type: text/plain, Size: 580 bytes --]

Index: tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.460
diff -u -3 -r1.460 tc-i386.c
--- tc-i386.c	17 Jan 2011 18:40:29 -0000	1.460
+++ tc-i386.c	21 Jan 2011 16:00:15 -0000
@@ -2371,7 +2371,12 @@
 
   if (flag_code == CODE_64BIT)
     {
+#if defined (OBJ_COFF) && defined (TE_PE)
+      x86_dwarf2_return_column = (OUTPUT_FLAVOR == bfd_target_coff_flavour
+				  ? 32 : 16);
+#else
       x86_dwarf2_return_column = 16;
+#endif
       x86_cie_data_alignment = -8;
     }
   else

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

* Re: [patch gas]: Set correct dwarf2 return column value for x64 windows target
  2011-01-21 16:07 [patch gas]: Set correct dwarf2 return column value for x64 windows target Kai Tietz
@ 2011-01-26  9:41 ` Kai Tietz
  2011-01-26 10:06   ` Nick Clifton
  2013-12-18  0:38 ` Pierre Muller
       [not found] ` <52b0ee91.86f7440a.25e6.54c3SMTPIN_ADDED_BROKEN@mx.google.com>
  2 siblings, 1 reply; 8+ messages in thread
From: Kai Tietz @ 2011-01-26  9:41 UTC (permalink / raw)
  To: Kai Tietz; +Cc: Binutils, Nick Clifton

binutils-owner@sourceware.org wrote on 21.01.2011 17:06:28:

> Hello,
> 
> this patch corrects the value of dwarf2_return_column in tc-i386 for
> x64 windows, which has a different call-clobber set.
> 
> ChangeLog
> 
> 2011-01-21  Kai Tietz
> 
>         * config/tc-i386.c (md_begin): Set for x64 windows COFF target
>         x86_dwarf2_return_column to 32.
> 
> Tested for x86-64-pc-mingw32. Ok for apply?
> 
> Regards,
> Kai
> [attachment "dw2_retcol.txt" deleted by Kai Tietz/Onevision] 

PING

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

* Re: [patch gas]: Set correct dwarf2 return column value for x64 windows target
  2011-01-26  9:41 ` Kai Tietz
@ 2011-01-26 10:06   ` Nick Clifton
  2011-01-26 10:16     ` Kai Tietz
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2011-01-26 10:06 UTC (permalink / raw)
  To: Kai Tietz; +Cc: Kai Tietz, Binutils

Hi Kai,

>> 2011-01-21  Kai Tietz
>>
>>          * config/tc-i386.c (md_begin): Set for x64 windows COFF target
>>          x86_dwarf2_return_column to 32.

Approved - please apply.

(Sorry for the delay).

Cheers
   Nick



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

* Re: [patch gas]: Set correct dwarf2 return column value for x64 windows target
  2011-01-26 10:06   ` Nick Clifton
@ 2011-01-26 10:16     ` Kai Tietz
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Tietz @ 2011-01-26 10:16 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Kai Tietz, Binutils

2011/1/26 Nick Clifton <nickc@redhat.com>:
> Hi Kai,
>
>>> 2011-01-21  Kai Tietz
>>>
>>>         * config/tc-i386.c (md_begin): Set for x64 windows COFF target
>>>         x86_dwarf2_return_column to 32.
>
> Approved - please apply.
>
> (Sorry for the delay).
>
> Cheers
>  Nick

Applied.

Thanks,
Kai

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

* RE: [patch gas]: Set correct dwarf2 return column value for x64 windows target
  2011-01-21 16:07 [patch gas]: Set correct dwarf2 return column value for x64 windows target Kai Tietz
  2011-01-26  9:41 ` Kai Tietz
@ 2013-12-18  0:38 ` Pierre Muller
       [not found] ` <52b0ee91.86f7440a.25e6.54c3SMTPIN_ADDED_BROKEN@mx.google.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Pierre Muller @ 2013-12-18  0:38 UTC (permalink / raw)
  To: 'Kai Tietz', 'Binutils'; +Cc: 'Nick Clifton'

  Hi all,

  sorry to dig out this very old stuff...
but I do not understand that patch which 
seem to me to be responsible for the fact that 
mingw64 CFI states that the return column is 32 (which corresponds to xmm15
register)
This is also seen in GDB where info frame always states
that register xmm15 is saved at the same location than rip...

  In fact, I was puzzled by this xmm15 saved register and it took me some
time
to understand why xmm15 was used.
  I finally tracked it down to the patch below,
and by reverting it in gas/cconfig/tc-i386.c
I was able to get more sensible frame information both
with objdump -W and with GDB.

  Could it be that the reason of your patch:
" which has a different call-clobber set."
  does not apply anymore and that thus using 16 which is indeed
the dwarf register number of RIP register
is the correct value?

Pierre Muller...
tired after a long bug hunt...

PS: I also tried out the cygwin64 target and the patch
seems also wrong there.

> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Kai Tietz
> Envoyé : vendredi 21 janvier 2011 17:06
> À : Binutils
> Cc : Nick Clifton
> Objet : [patch gas]: Set correct dwarf2 return column value for x64
> windows target
> 
> Hello,
> 
> this patch corrects the value of dwarf2_return_column in tc-i386 for
> x64 windows, which has a different call-clobber set.
> 
> ChangeLog
> 
> 2011-01-21  Kai Tietz
> 
>         * config/tc-i386.c (md_begin): Set for x64 windows COFF target
>         x86_dwarf2_return_column to 32.
> 
> Tested for x86-64-pc-mingw32. Ok for apply?
> 
> Regards,
> Kai

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

* Re: [patch gas]: Set correct dwarf2 return column value for x64 windows target
       [not found] ` <52b0ee91.86f7440a.25e6.54c3SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2013-12-18  7:19   ` Kai Tietz
  2013-12-18  7:37     ` Pierre Muller
  0 siblings, 1 reply; 8+ messages in thread
From: Kai Tietz @ 2013-12-18  7:19 UTC (permalink / raw)
  To: Pierre Muller; +Cc: Binutils, Nick Clifton

Hmm, the call-clobber-set is still different between x86_64 abi and
x64 ms abi.  So this is for sure not the case.  It is a bit long ago
to recall all details.  nevertheless save-region for x64 is/was quite
different.

You weren't trying by accident to use x86_64 abi to interpret x64 one?

Kai

2013/12/18 Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>:
>   Hi all,
>
>   sorry to dig out this very old stuff...
> but I do not understand that patch which
> seem to me to be responsible for the fact that
> mingw64 CFI states that the return column is 32 (which corresponds to xmm15
> register)
> This is also seen in GDB where info frame always states
> that register xmm15 is saved at the same location than rip...
>
>   In fact, I was puzzled by this xmm15 saved register and it took me some
> time
> to understand why xmm15 was used.
>   I finally tracked it down to the patch below,
> and by reverting it in gas/cconfig/tc-i386.c
> I was able to get more sensible frame information both
> with objdump -W and with GDB.
>
>   Could it be that the reason of your patch:
> " which has a different call-clobber set."
>   does not apply anymore and that thus using 16 which is indeed
> the dwarf register number of RIP register
> is the correct value?
>
> Pierre Muller...
> tired after a long bug hunt...
>
> PS: I also tried out the cygwin64 target and the patch
> seems also wrong there.
>
>> -----Message d'origine-----
>> De : binutils-owner@sourceware.org [mailto:binutils-
>> owner@sourceware.org] De la part de Kai Tietz
>> Envoyé : vendredi 21 janvier 2011 17:06
>> À : Binutils
>> Cc : Nick Clifton
>> Objet : [patch gas]: Set correct dwarf2 return column value for x64
>> windows target
>>
>> Hello,
>>
>> this patch corrects the value of dwarf2_return_column in tc-i386 for
>> x64 windows, which has a different call-clobber set.
>>
>> ChangeLog
>>
>> 2011-01-21  Kai Tietz
>>
>>         * config/tc-i386.c (md_begin): Set for x64 windows COFF target
>>         x86_dwarf2_return_column to 32.
>>
>> Tested for x86-64-pc-mingw32. Ok for apply?
>>
>> Regards,
>> Kai

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

* RE: [patch gas]: Set correct dwarf2 return column value for x64 windows target
  2013-12-18  7:19   ` Kai Tietz
@ 2013-12-18  7:37     ` Pierre Muller
  2014-01-09 16:50       ` [PING: patch " Pierre Muller
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Muller @ 2013-12-18  7:37 UTC (permalink / raw)
  To: 'Kai Tietz'; +Cc: 'Binutils', 'Nick Clifton'



> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Kai Tietz
> Envoyé : mercredi 18 décembre 2013 08:19
> À : Pierre Muller
> Cc : Binutils; Nick Clifton
> Objet : Re: [patch gas]: Set correct dwarf2 return column value for x64
> windows target
> 
> Hmm, the call-clobber-set is still different between x86_64 abi and
> x64 ms abi.  So this is for sure not the case.  It is a bit long ago
> to recall all details.  nevertheless save-region for x64 is/was quite
> different.

  I agree that the ABI specify other register conventions for Microsoft
as compared to the other ABI used by all other OSes.
  Nevertheless, the dwarf numbering of x86_64 registers is unique, no?
Thus I do not understand how the return_column, which is 
really only the dwarf number associated to the register which
contains the Return Address information could be different.
  In any case, xmm15 does not seem to be a reasonable value.


 
> You weren't trying by accident to use x86_64 abi to interpret x64 one?

  Maybe, but again, I don't understand how that could matter.

Pierre
 
> Kai
> 
> 2013/12/18 Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>:
> >   Hi all,
> >
> >   sorry to dig out this very old stuff...
> > but I do not understand that patch which
> > seem to me to be responsible for the fact that
> > mingw64 CFI states that the return column is 32 (which corresponds to
> xmm15
> > register)
> > This is also seen in GDB where info frame always states
> > that register xmm15 is saved at the same location than rip...
> >
> >   In fact, I was puzzled by this xmm15 saved register and it took me
> some
> > time
> > to understand why xmm15 was used.
> >   I finally tracked it down to the patch below,
> > and by reverting it in gas/cconfig/tc-i386.c
> > I was able to get more sensible frame information both
> > with objdump -W and with GDB.
> >
> >   Could it be that the reason of your patch:
> > " which has a different call-clobber set."
> >   does not apply anymore and that thus using 16 which is indeed
> > the dwarf register number of RIP register
> > is the correct value?
> >
> > Pierre Muller...
> > tired after a long bug hunt...
> >
> > PS: I also tried out the cygwin64 target and the patch
> > seems also wrong there.
> >
> >> -----Message d'origine-----
> >> De : binutils-owner@sourceware.org [mailto:binutils-
> >> owner@sourceware.org] De la part de Kai Tietz
> >> Envoyé : vendredi 21 janvier 2011 17:06
> >> À : Binutils
> >> Cc : Nick Clifton
> >> Objet : [patch gas]: Set correct dwarf2 return column value for x64
> >> windows target
> >>
> >> Hello,
> >>
> >> this patch corrects the value of dwarf2_return_column in tc-i386 for
> >> x64 windows, which has a different call-clobber set.
> >>
> >> ChangeLog
> >>
> >> 2011-01-21  Kai Tietz
> >>
> >>         * config/tc-i386.c (md_begin): Set for x64 windows COFF
> target
> >>         x86_dwarf2_return_column to 32.
> >>
> >> Tested for x86-64-pc-mingw32. Ok for apply?
> >>
> >> Regards,
> >> Kai

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

* [PING: patch gas]: Set correct dwarf2 return column value for x64 windows target
  2013-12-18  7:37     ` Pierre Muller
@ 2014-01-09 16:50       ` Pierre Muller
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre Muller @ 2014-01-09 16:50 UTC (permalink / raw)
  To: 'Kai Tietz'; +Cc: 'Binutils', 'Nick Clifton'

  The xmm15 saved register is still reported by GDB 7.6.90,
I completely forgot to ping this issue...

Pierre Muller
  
> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Pierre Muller
> Envoyé : mercredi 18 décembre 2013 08:37
> À : 'Kai Tietz'
> Cc : 'Binutils'; 'Nick Clifton'
> Objet : RE: [patch gas]: Set correct dwarf2 return column value for x64
> windows target
> 
> 
> 
> > -----Message d'origine-----
> > De : binutils-owner@sourceware.org [mailto:binutils-
> > owner@sourceware.org] De la part de Kai Tietz
> > Envoyé : mercredi 18 décembre 2013 08:19
> > À : Pierre Muller
> > Cc : Binutils; Nick Clifton
> > Objet : Re: [patch gas]: Set correct dwarf2 return column value for
> x64
> > windows target
> >
> > Hmm, the call-clobber-set is still different between x86_64 abi and
> > x64 ms abi.  So this is for sure not the case.  It is a bit long ago
> > to recall all details.  nevertheless save-region for x64 is/was quite
> > different.
> 
>   I agree that the ABI specify other register conventions for Microsoft
> as compared to the other ABI used by all other OSes.
>   Nevertheless, the dwarf numbering of x86_64 registers is unique, no?
> Thus I do not understand how the return_column, which is
> really only the dwarf number associated to the register which
> contains the Return Address information could be different.
>   In any case, xmm15 does not seem to be a reasonable value.
> 
> 
> 
> > You weren't trying by accident to use x86_64 abi to interpret x64
> one?
> 
>   Maybe, but again, I don't understand how that could matter.
> 
> Pierre
> 
> > Kai
> >
> > 2013/12/18 Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>:
> > >   Hi all,
> > >
> > >   sorry to dig out this very old stuff...
> > > but I do not understand that patch which
> > > seem to me to be responsible for the fact that
> > > mingw64 CFI states that the return column is 32 (which corresponds
> to
> > xmm15
> > > register)
> > > This is also seen in GDB where info frame always states
> > > that register xmm15 is saved at the same location than rip...
> > >
> > >   In fact, I was puzzled by this xmm15 saved register and it took
> me
> > some
> > > time
> > > to understand why xmm15 was used.
> > >   I finally tracked it down to the patch below,
> > > and by reverting it in gas/cconfig/tc-i386.c
> > > I was able to get more sensible frame information both
> > > with objdump -W and with GDB.
> > >
> > >   Could it be that the reason of your patch:
> > > " which has a different call-clobber set."
> > >   does not apply anymore and that thus using 16 which is indeed
> > > the dwarf register number of RIP register
> > > is the correct value?
> > >
> > > Pierre Muller...
> > > tired after a long bug hunt...
> > >
> > > PS: I also tried out the cygwin64 target and the patch
> > > seems also wrong there.
> > >
> > >> -----Message d'origine-----
> > >> De : binutils-owner@sourceware.org [mailto:binutils-
> > >> owner@sourceware.org] De la part de Kai Tietz
> > >> Envoyé : vendredi 21 janvier 2011 17:06
> > >> À : Binutils
> > >> Cc : Nick Clifton
> > >> Objet : [patch gas]: Set correct dwarf2 return column value for
> x64
> > >> windows target
> > >>
> > >> Hello,
> > >>
> > >> this patch corrects the value of dwarf2_return_column in tc-i386
> for
> > >> x64 windows, which has a different call-clobber set.
> > >>
> > >> ChangeLog
> > >>
> > >> 2011-01-21  Kai Tietz
> > >>
> > >>         * config/tc-i386.c (md_begin): Set for x64 windows COFF
> > target
> > >>         x86_dwarf2_return_column to 32.
> > >>
> > >> Tested for x86-64-pc-mingw32. Ok for apply?
> > >>
> > >> Regards,
> > >> Kai

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

end of thread, other threads:[~2014-01-09 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 16:07 [patch gas]: Set correct dwarf2 return column value for x64 windows target Kai Tietz
2011-01-26  9:41 ` Kai Tietz
2011-01-26 10:06   ` Nick Clifton
2011-01-26 10:16     ` Kai Tietz
2013-12-18  0:38 ` Pierre Muller
     [not found] ` <52b0ee91.86f7440a.25e6.54c3SMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18  7:19   ` Kai Tietz
2013-12-18  7:37     ` Pierre Muller
2014-01-09 16:50       ` [PING: patch " Pierre Muller

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).