This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: h8300-elf: Incorrect value of UINT_MAX for -mh -mint32 target.


Kazu Hirata wrote:
Hi Jeff,


I assume that __H8300__ was meant to be added to the H3800 macros
below - correct?  It has been removed from the old test but not
added to the new code.

Correct.  Thank you for pointing that out.  What about the patch
below?  It collects all of the H8/300 code into one block.

Patch applied.  Thanks.  I would like to create newlib-1.11.0 in the next
couple of days.  Can you comment on Venky's sim patch?
If the sim changes will be likely to be accepted by gdb, then I would
like to make his changes part of that up-coming release.

-- Jeff J.

Kazu Hirata

Index: config.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
retrieving revision 1.34
diff -c -5 -r1.34 config.h
*** config.h 11 Oct 2002 10:28:30 -0000 1.34
--- config.h 16 Dec 2002 21:26:37 -0000
***************
*** 2,25 ****
#define __SYS_CONFIG_H__
#include <machine/ieeefp.h> /* floating point macros */
/* exceptions first */
! #if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) || defined(__W65__) || defined (__H8300S__)
#define __SMALL_BITFIELDS
/* ??? This conditional is true for the h8500 and the w65, defining H8300
in those cases probably isn't the right thing to do. */
#define H8300 1
#endif
/* 16 bit integer machines */
! #if defined(__Z8001__) || defined(__Z8002__) || defined(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__) || defined (__AVR__)
#undef INT_MAX
#undef UINT_MAX
#define INT_MAX 32767
#define UINT_MAX 65535
#endif
#ifdef __W65__
#define __SMALL_BITFIELDS
#endif
--- 2,34 ----
#define __SYS_CONFIG_H__
#include <machine/ieeefp.h> /* floating point macros */
/* exceptions first */
! #if defined(__H8500__) || defined(__W65__)
#define __SMALL_BITFIELDS
/* ??? This conditional is true for the h8500 and the w65, defining H8300
in those cases probably isn't the right thing to do. */
#define H8300 1
#endif
/* 16 bit integer machines */
! #if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || defined (__mn10200__) || defined (__AVR__)
#undef INT_MAX
#undef UINT_MAX
#define INT_MAX 32767
#define UINT_MAX 65535
+ #endif
+ + #if defined (__H8300__) || defined (__H8300H__) || defined(__H8300S__)
+ #define __SMALL_BITFIELDS
+ #define H8300 1
+ #undef INT_MAX
+ #undef UINT_MAX
+ #define INT_MAX __INT_MAX__
+ #define UINT_MAX (__INT_MAX__ * 2U + 1)
#endif
#ifdef __W65__
#define __SMALL_BITFIELDS
#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]