* [avr] Patch for -mint8 option
@ 2002-11-24 23:55 Svein E. Seldal
2002-12-17 8:58 ` unreviewed patch Svein E. Seldal
2003-05-10 10:57 ` [avr] Patch for -mint8 option -- " Svein E. Seldal
0 siblings, 2 replies; 5+ messages in thread
From: Svein E. Seldal @ 2002-11-24 23:55 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 626 bytes --]
Hello,
I have put together a little patch for setting the size of the long long
type when the -mint8 option is used. As there are no 32-bits type in
-mint8 mode, and the fact that none of the other sizeof's are compliant
to the C-specification, I think that it would be appropriate to do this.
I have also modified the specs to define the symbol __AVR_INT8__, making
it possible for applications to differentiate when -mint8 are used or not.
Svein
gcc/ChangeLog:
2002-11-25 Svein E. Seldal <Svein.Seldal@solidas.com>
* config/avr/avr.h: Reduce the long long type to 32-bit in
-mint8 mode and define __AVR_INT8__
[-- Attachment #2: avr-mint8.diff --]
[-- Type: text/plain, Size: 2036 bytes --]
Index: gcc/config/avr/avr.h
===================================================================
RCS file: /prosjekt/gnu/gcc/gcc/gcc/config/avr/avr.h,v
retrieving revision 1.71
diff -c -3 -p -r1.71 avr.h
*** gcc/config/avr/avr.h 24 Sep 2002 12:48:52 -0000 1.71
--- gcc/config/avr/avr.h 20 Nov 2002 10:40:46 -0000
*************** Boston, MA 02111-1307, USA. */
*** 38,43 ****
--- 38,45 ----
builtin_define ("__AVR_MEGA__"); \
if (TARGET_NO_INTERRUPTS) \
builtin_define ("__NO_INTERRUPTS__"); \
+ if (TARGET_INT8) \
+ builtin_define ("__AVR_INT8__"); \
} \
while (0)
*************** extern int avr_asm_only_p;
*** 204,210 ****
used in `cpp'. */
! #define LONG_LONG_TYPE_SIZE 64
/* A C expression for the size in bits of the type `long long' on the
target machine. If you don't define this, the default is two
words. If you want to support GNU Ada on your machine, the value
--- 206,212 ----
used in `cpp'. */
! #define LONG_LONG_TYPE_SIZE ( INT_TYPE_SIZE == 8 ? 32 : 64 )
/* A C expression for the size in bits of the type `long long' on the
target machine. If you don't define this, the default is two
words. If you want to support GNU Ada on your machine, the value
*************** extern int avr_case_values_threshold;
*** 2508,2514 ****
(and ANSI C) library functions `memcpy' and `memset' rather than
the BSD functions `bcopy' and `bzero'. */
! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
/* A C string constant that tells the GNU CC driver program options to
pass to CPP. It can also specify how to translate options you
--- 2510,2516 ----
(and ANSI C) library functions `memcpy' and `memset' rather than
the BSD functions `bcopy' and `bzero'. */
! #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mint8:-D__AVR_INT8__}"
/* A C string constant that tells the GNU CC driver program options to
pass to CPP. It can also specify how to translate options you
^ permalink raw reply [flat|nested] 5+ messages in thread
* unreviewed patch
2002-11-24 23:55 [avr] Patch for -mint8 option Svein E. Seldal
@ 2002-12-17 8:58 ` Svein E. Seldal
2003-05-10 10:57 ` [avr] Patch for -mint8 option -- " Svein E. Seldal
1 sibling, 0 replies; 5+ messages in thread
From: Svein E. Seldal @ 2002-12-17 8:58 UTC (permalink / raw)
To: gcc-patches
Hi,
This patch has not been reviewed yet. Any news?
http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01502.html
Svein
^ permalink raw reply [flat|nested] 5+ messages in thread
* [avr] Patch for -mint8 option -- unreviewed patch
2002-11-24 23:55 [avr] Patch for -mint8 option Svein E. Seldal
2002-12-17 8:58 ` unreviewed patch Svein E. Seldal
@ 2003-05-10 10:57 ` Svein E. Seldal
2003-05-30 14:05 ` unreviwed patch -- 3rd attempt (since 2002-11) Svein E. Seldal
2003-06-04 18:13 ` [avr] Patch for -mint8 option -- unreviewed patch Jim Wilson
1 sibling, 2 replies; 5+ messages in thread
From: Svein E. Seldal @ 2003-05-10 10:57 UTC (permalink / raw)
Cc: gcc-patches
Hi all,
I'm still waiting for approval to check this in:
http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01502.html
I was hoping on getting this into 3.3, but I totally forgot about it...
Regards,
Svein
^ permalink raw reply [flat|nested] 5+ messages in thread
* unreviwed patch -- 3rd attempt (since 2002-11)
2003-05-10 10:57 ` [avr] Patch for -mint8 option -- " Svein E. Seldal
@ 2003-05-30 14:05 ` Svein E. Seldal
2003-06-04 18:13 ` [avr] Patch for -mint8 option -- unreviewed patch Jim Wilson
1 sibling, 0 replies; 5+ messages in thread
From: Svein E. Seldal @ 2003-05-30 14:05 UTC (permalink / raw)
To: gcc-patches
Svein E. Seldal wrote:
>
> Hi all,
>
> I'm still waiting for approval to check this in:
>
> http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01502.html
Regards,
Svein
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [avr] Patch for -mint8 option -- unreviewed patch
2003-05-10 10:57 ` [avr] Patch for -mint8 option -- " Svein E. Seldal
2003-05-30 14:05 ` unreviwed patch -- 3rd attempt (since 2002-11) Svein E. Seldal
@ 2003-06-04 18:13 ` Jim Wilson
1 sibling, 0 replies; 5+ messages in thread
From: Jim Wilson @ 2003-06-04 18:13 UTC (permalink / raw)
To: Svein E. Seldal; +Cc: gcc-patches, denisc, marekm
Using 32-bit long long with an 8-bit target is sensible, and is already
done for some other 8-bit targets. So the concept is OK.
You are defining __AVR_INT8__ in two places, which seems redundant. You
only need it in one place. The correct place would be the first one in
TARGET_CPU_CPP_BUILTINS.
The ChangeLog entry isn't correct. You need to list every macro
modified, and briefly describe the change. You haven't done this. So
it should look something like this
* config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Define __AVR_INT8__
(LONG_LONG_TYPE_SIZE): Check INT_TYPE_SIZE.
The patch is OK with these changes.
The avr has two listed maintainers, so I included them in the cc's in
case they want to comment.
I was going to suggest that a doc change was missing, but then I noticed
that the -mint8 option isn't documented. Perhaps you could add the
missing documentation?
Jim
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-06-04 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-24 23:55 [avr] Patch for -mint8 option Svein E. Seldal
2002-12-17 8:58 ` unreviewed patch Svein E. Seldal
2003-05-10 10:57 ` [avr] Patch for -mint8 option -- " Svein E. Seldal
2003-05-30 14:05 ` unreviwed patch -- 3rd attempt (since 2002-11) Svein E. Seldal
2003-06-04 18:13 ` [avr] Patch for -mint8 option -- unreviewed patch Jim Wilson
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).