Bug 20143 - 4.0 bootstrap unreasonably requires 64-bit target type mode support.
Summary: 4.0 bootstrap unreasonably requires 64-bit target type mode support.
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 15:16 UTC by Paul Schlie
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: ppc-apple-darwin7.8
Target: avr-unknown-unknown
Build: ppc-apple-darwin7.8
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Schlie 2005-02-22 15:16:42 UTC
Although I don't believe this is a regression, I do believe it's a bug which should
ideally be remedied as soon as reasonably possible; as it seems unreasonable to
require any target to support data types more than twice as large as it's pointer
type, or required by the language standards; so feel that this should be considered
a reasonably important failure to remedy.

To demonstrate this bug, simply reduce the defined long long size in avr.h to the
size of a long which is defined as being 32-bits; resulting in:

In file included from /Applications/avr/avr-src/gcc/unwind-dw2.c:36:
/Applications/avr/avr-src/gcc/unwind.h:59: error: unable to emulate 'DI'
In file included from /Applications/avr/avr-src/gcc/unwind-dw2.c:40:
/Applications/avr/avr-src/gcc/unwind-pe.h: In function 'read_encoded_value_with_base':
/Applications/avr/avr-src/gcc/unwind-pe.h:191: error: unable to emulate 'DI'
/Applications/avr/avr-src/gcc/unwind-pe.h:194: error: unable to emulate 'DI'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
Comment 1 Andrew Pinski 2005-02-22 15:19:16 UTC
Dwarf2 unwinding requires long long.
Comment 2 Eric Weddington 2005-02-23 23:32:27 UTC
Please explain why you think it is a bug for the avr to support long long. Your
description sounds like an opinion.

The pointer size on the AVR is currently 16 bits. This will change in the near
future to either 24 bits or 32 bits.
Comment 3 Paul Schlie 2005-02-24 02:49:46 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.

> Please explain why you think it is a bug for the avr to support long long.
> Your description sounds like an opinion.
> 
> The pointer size on the AVR is currently 16 bits. This will change in the
> near future to either 24 bits or 32 bits.

Simply because no data type size support should be required beyond that
reasonably required by the source language itself.

Please note that enabling the compiler to build with limited but perfectly
reasonable 32-bit maxim data types, does not prohibit the it's ability to
support significantly larger data types if desired for whatever reason; so
nor should the desire to restrict data type size support be inhibited.)

As an aside, please don't confuse support of > 64KB FLASH program memory on
larger AVR's, with the architecture's inherent 16-bit data pointer / 64KB
data address space, as the two are orthogonal.  Atmel has already clearly
positioned ARM to pick up where the AVR architecture leaves off; so although
we may likely see 256KB program + 8KB-32KB data memory versions forthcoming,
that's likely about it; as avr's target market has no corresponding need of
significantly more, not to mention it would bring the avr (an 8-bit machine)
needlessly to it's knees attempting to shuffle extended pointers around,
which wouldn't be too clever even if Atmel were to facilitate them; hence
Atmel's, and others, positioning of ARM and similar 16/32 based embedded
controllers. (Atmel understands what the avr is/isn't, to their credit.)


Comment 4 Eric Weddington 2005-02-24 14:04:21 UTC
Subject: Re:  4.0 bootstrap unreasonably requires 64-bit
 target type mode support.

schlie at comcast dot net wrote:

>------- Additional Comments From schlie at comcast dot net  2005-02-24 02:49 -------
>Subject: Re:  4.0 bootstrap unreasonably requires
> 64-bit target type mode support.
>
>  
>
>>Please explain why you think it is a bug for the avr to support long long.
>>Your description sounds like an opinion.
>>
>>The pointer size on the AVR is currently 16 bits. This will change in the
>>near future to either 24 bits or 32 bits.
>>    
>>
>
>Simply because no data type size support should be required beyond that
>reasonably required by the source language itself.
>  
>
This is not an explanation; you are simply restating what you said earlier.

>Please note that enabling the compiler to build with limited but perfectly
>reasonable 32-bit maxim data types, does not prohibit the it's ability to
>support significantly larger data types if desired for whatever reason; so
>nor should the desire to restrict data type size support be inhibited.)
>  
>
If you experiment with the code, then you need to be prepared to 
unforseen limits.

>As an aside, please don't confuse support of > 64KB FLASH program memory on
>larger AVR's, with the architecture's inherent 16-bit data pointer / 64KB
>data address space, as the two are orthogonal.  Atmel has already clearly
>positioned ARM to pick up where the AVR architecture leaves off; so although
>we may likely see 256KB program + 8KB-32KB data memory versions forthcoming,
>that's likely about it; as avr's target market has no corresponding need of
>significantly more, not to mention it would bring the avr (an 8-bit machine)
>needlessly to it's knees attempting to shuffle extended pointers around,
>which wouldn't be too clever even if Atmel were to facilitate them; hence
>Atmel's, and others, positioning of ARM and similar 16/32 based embedded
>controllers. (Atmel understands what the avr is/isn't, to their credit.)
>
>  
>
And a GCC bug report is not the place to get into a philosophical 
argument concerning Atmel's marketing practices. Please choose a more 
appropriate place to expound upon things unrelated to a GCC bug.

You filed this "bug report" because you experimented and changed 
*working code* in CVS. The answer is "don't do that then". The change 
you made was not approved by either of the AVR maintainers and you ran 
into a limitation of the DWARF2 debugging format.

I don't see how this is valid bug. The bug is in *your* changes, not in 
the FSF tree. GCC Bugzilla is a place for bugs in working FSF releases 
or for future extensions that are currently be worked on. AFAIK, there 
are no current plans to change long long to 32 bits. Feel free to 
contact either of the AVR maintainers, Denis Chertykov or Marek 
Michalkiewicz about this. But as this stands, this not a bug.



Comment 5 Paul Schlie 2005-02-24 14:22:54 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.

>>> Comments From ericw at evcohs dot com  2005-02-24 14:04
>>> Please explain why you think it is a bug for the avr to support long long.

- I'll try to type it slower, but don't think it would help; what's being
  asserted is that the support of 64-bit long long should not be required to
  build the compiler. (Any particular reason you believe it should be?)

> This is not an explanation; you are simply restating what you said earlier.
> ...

- Maybe if you read it a over few times it may hopefully become apparent?
  (sorry, I don't know how to state it any clearer or simpler than I have)



Comment 6 Eric Weddington 2005-02-24 14:31:01 UTC
Subject: Re:  4.0 bootstrap unreasonably requires 64-bit
 target type mode support.

schlie at comcast dot net wrote:

>------- Additional Comments From schlie at comcast dot net  2005-02-24 14:22 -------
>Subject: Re:  4.0 bootstrap unreasonably requires
> 64-bit target type mode support.
>
>  
>
>>>>Comments From ericw at evcohs dot com  2005-02-24 14:04
>>>>Please explain why you think it is a bug for the avr to support long long.
>>>>        
>>>>
>
>- I'll try to type it slower, but don't think it would help; what's being
>  asserted is that the support of 64-bit long long should not be required to
>  build the compiler. (Any particular reason you believe it should be?)
>  
>
The code in CVS works. Your personal change did not. You need to explain 
why you think your personal change, to not support 64-bit long long, 
should be the new default for the avr port. And you need to explain it 
on the gcc mailing list, not in the context of a GCC bug report that 
describes a bug in your personal experimental changes. And as a courtesy 
you should CC the AVR maintainers.

Again, you're just restating what you've said earlier without giving a 
reason.
Comment 7 Paul Schlie 2005-02-24 14:32:56 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.


> ------- Additional Comments From schlie at comcast dot net  2005-02-24 14:22
> Subject: Re:  4.0 bootstrap unreasonably requires
>  64-bit target type mode support.
> 
>>>> Comments From ericw at evcohs dot com  2005-02-24 14:04
>>>> Please explain why you think it is a bug for the avr to support long long.
> 
> - I'll try to type it slower, but don't think it would help; what's being
>   asserted is that the support of 64-bit long long should not be required to
>   build the compiler. (Any particular reason you believe it should be?)
> 
>> This is not an explanation; you are simply restating what you said earlier.
>> ...
> 
> - Maybe if you read it a over few times it may hopefully become apparent?
>   (sorry, I don't know how to state it any clearer or simpler than I have)

Maybe I can be clearer, I am not stating that the avr port should not
support 64-bit long long; just asserting that any port should not require
64-bit integers to be able to build the compiler, if the language it's
being built to support does not correspondingly require it.

(the avr port was simply used as an example demonstration of the problem)


Comment 8 Steven Bosscher 2005-02-24 15:46:10 UTC
Can't you work around this by disabling dwarf2 support?
Comment 9 Paul Schlie 2005-02-24 16:14:16 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.

> Maybe I can be clearer, I am not stating that the avr port should not
> support 64-bit long long; just asserting that any port should not require
> 64-bit integers to be able to build the compiler, if the language it's
> being built to support does not correspondingly require it.
> 
> (the avr port was simply used as an example demonstration of the problem)

The further good news is that upon reviewing the DWARF2 spec in detail,
and GCC's implementation, it's clear that a 32-bit DWARF data structure
is sufficient to support any target with 32-bit or less data type sizes.

(which seems that it may be reasonably easy to support by declaring the
DWARF data structure size as a function of the size of target's the maxim
declared data type size; although possibly limited to a practical minimum
of 32-bits, which seems much more reasonable for smaller targets)

[ I'll try  a few experiments ]



Comment 10 Eric Weddington 2005-02-24 16:21:03 UTC
Subject: Re:  4.0 bootstrap unreasonably requires 64-bit
 target type mode support.

schlie at comcast dot net wrote:

>------- Additional Comments From schlie at comcast dot net  2005-02-24 16:14 -------
>Subject: Re:  4.0 bootstrap unreasonably requires
> 64-bit target type mode support.
>
>  
>
>>Maybe I can be clearer, I am not stating that the avr port should not
>>support 64-bit long long; just asserting that any port should not require
>>64-bit integers to be able to build the compiler, if the language it's
>>being built to support does not correspondingly require it.
>>
>>(the avr port was simply used as an example demonstration of the problem)
>>    
>>
>
>The further good news is that upon reviewing the DWARF2 spec in detail,
>and GCC's implementation, it's clear that a 32-bit DWARF data structure
>is sufficient to support any target with 32-bit or less data type sizes.
>
>(which seems that it may be reasonably easy to support by declaring the
>DWARF data structure size as a function of the size of target's the maxim
>declared data type size; although possibly limited to a practical minimum
>of 32-bits, which seems much more reasonable for smaller targets)
>
>[ I'll try  a few experiments ]
>
>
>
>  
>
Good.

Can somebody with sufficient permissions please close this non-bug?




Comment 11 Paul Schlie 2005-02-24 17:11:22 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.

> From: ericw at evcohs dot com <gcc-bugzilla@gcc.gnu.org>
> Can somebody with sufficient permissions please close this non-bug?

I'm sorry, but have to ask: why are you so apparently negatively concerned
about the resolution of topic which would only provide the WINAVR product,
which you apparently have a vested interest in, and other small targets,
with increased build flexibility to seemingly everyone's benefit?

(I can only surmise you still don't understand this to be the case?)

How may I help clear up your confusion?



Comment 12 Andrew Pinski 2005-02-24 17:17:36 UTC
Not a bug.
Comment 13 Paul Schlie 2005-02-24 17:25:06 UTC
Subject: Re:  4.0 bootstrap unreasonably requires
 64-bit target type mode support.

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-24
> Not a bug.
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|                            |WONTFIX

Unfortunately understand the necessity to presently mark it as such.

And, sorry for the apparent confusion invoked by it's presence.