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: RFA: Add


Unfortunately there are problems with this patch, disregarding the
off-line issue about whether the port should be contributed.

The cirrus.h header file does not belong in the generic libc/include/machine
directory.  Such files should be placed off of the individual machine directories.
More importantly though, the file is GPL licensed.  We don't put any GPL code in newlib.
One of the exceptions: the linux port, is LGPL but it requires a bunch of things from
glibc so has been this way from the very beginning.  The arm port is currently under a
bsd-like license and I don't intend to change this for this header file.  Is this
header file really necessary?  Shouldn't this code be part of libgcc instead?

-- Jeff J.

Nick Clifton wrote:
Hi Jeff,

May I have permission to apply the patch below please ?

It adds support to newlib for the Cirrus EP9312 processor. Support
for this chip was recently added to GCC.

I also made a few small changes to configure.host to restore the
alpha-sorting of the entries in some of the case statements. I hope
that this is OK.

Cheers
Nick

2003-02-10 Nick Clifton <nickc@redhat.com>

* Add support for Cirrus Maverick ARM co-processor:

2001-05-08 Aldy Hernandez <aldyh@redhat.com>

* libc/include/machine/cirrus.h: New file.

2000-09-13 Aldy Hernandez <aldyh@redhat.com>

* libc/include/machine/ieeefp.h: Set IEEE_BIG_ENDIAN or
IEEE_LITTLE_ENDIAN depending on endian mode (cirrus).

2000-08-11 Aldy Hernandez <aldyh@redhat.com>

* configure.host: set sys_dir, syscall_dir, and
newlib_cflags for ep9312 host.

* configure.host: Restore alpha sorting of entries in case
statements.

Index: newlib/configure.host
===================================================================
RCS file: /cvs/src/src/newlib/configure.host,v
retrieving revision 1.45
diff -c -3 -p -w -r1.45 configure.host
*** newlib/configure.host 8 Feb 2003 04:30:22 -0000 1.45
--- newlib/configure.host 10 Feb 2003 11:44:08 -0000
*************** case "${host_cpu}" in
*** 88,103 ****
avr*)
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
;;
- d10v*)
machine_dir=d10v
;;
d30v*)
machine_dir=d30v
;;
fr30)
machine_dir=fr30
;;
h8300)
machine_dir=h8300
;;
--- 88,108 ----
avr*)
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
;;
d10v*)
machine_dir=d10v
;;
d30v*)
machine_dir=d30v
;;
+ ep9312)
+ machine_dir=arm
+ ;;
fr30)
machine_dir=fr30
;;
+ frv)
+ machine_dir=frv
+ ;;
h8300)
machine_dir=h8300
;;
*************** case "${host_cpu}" in
*** 204,212 ****
machine_dir=v850
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 "
;;
- frv)
- machine_dir=frv
- ;;
w65*)
machine_dir=w65
;;
--- 209,214 ----
*************** case "${host}" in
*** 311,316 ****
--- 313,321 ----
d30v*)
sys_dir=
;;
+ ep9312-*-*)
+ sys_dir=arm
+ ;;
h8300-*-hms*)
sys_dir=h8300hms
;;
*************** case "${host}" in
*** 481,490 ****
--- 486,504 ----
newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
syscall_dir=
;;
+ ep9312-*-*)
+ syscall_dir=syscalls
+ newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
+ newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+ ;;
fr30-*-*)
newlib_cflags="${newlib_cflags}"
syscall_dir=syscalls
;;
+ frv-*-*)
+ syscall_dir=syscalls
+ newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG"
+ ;;
h8300*-*-*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
*************** case "${host}" in
*** 602,611 ****
v850ea-*-*)
syscall_dir=syscalls
;;
- frv-*-*)
- syscall_dir=syscalls
- newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG"
- ;;
w65-*-*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
--- 616,621 ----

Index: newlib/libc/include/machine/ieeefp.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/ieeefp.h,v
retrieving revision 1.16
diff -c -3 -p -w -r1.16 ieeefp.h
*** newlib/libc/include/machine/ieeefp.h 24 Jan 2003 15:46:04 -0000 1.16
--- newlib/libc/include/machine/ieeefp.h 10 Feb 2003 11:44:08 -0000
***************
*** 50,56 ****

*/
! #if (defined(__arm__) || defined(__thumb__))
/* ARM always has big-endian words. Within those words the byte ordering
will be big or little endian depending upon the target. */
#define __IEEE_BIG_ENDIAN
--- 50,56 ----

*/
! #if (defined(__arm__) || defined(__thumb__)) && !defined(__MAVERICK__)
/* ARM always has big-endian words. Within those words the byte ordering
will be big or little endian depending upon the target. */
#define __IEEE_BIG_ENDIAN
***************
*** 233,238 ****
--- 233,246 ----
#define __SMALL_BITFIELDS
#define _DOUBLE_IS_32BITS
#endif
+ + #ifdef __MAVERICK__
+ #ifdef __ARMEL__
+ # define __IEEE_LITTLE_ENDIAN
+ #else /* must be __ARMEB__ */
+ # define __IEEE_BIG_ENDIAN
+ #endif /* __ARMEL__ */
+ #endif /* __MAVERICK__ */
#ifndef __IEEE_BIG_ENDIAN
#ifndef __IEEE_LITTLE_ENDIAN

*** /dev/null Sat Oct 19 15:41:17 2002
--- newlib/libc/include/machine/cirrus.h Sat Feb 8 12:32:03 2003
***************
*** 0 ****
--- 1,45 ----
+ /* Cirrus specific include file.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ + Contributed by Red Hat.
+ + This file is part of GNU CC.
+ + GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ + GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ + You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+ + #ifdef __MAVERICK__
+ #ifndef _CIRRUS_H_
+ #define _CIRRUS_H_
+ + /* cfmac32 inline instruction. Performs X += Y * Z. */
+ #define cfmac32(x,y,z) \
+ do { \
+ double __c1, __c2, __c3; \
+ __asm__ ("cfmv64lr %Z1, %0\n\tcfmv64lr %Z2, %4\n\tcfmv64lr %Z3, %5\n\tcfmac32 %Y1, %Y2, %Y3\n\tcfmvr64l %0, %Z1" \
+ : "+r" (x), "=v" (__c1), "=v" (__c2), "=v" (__c3) \
+ : "r" (y), "r" (z)); \
+ } while (0)
+ + /* cfmsc32 inline instruction. Performs X -= Y * Z. */
+ #define cfmsc32(x,y,z) \
+ do { \
+ double __c1, __c2, __c3; \
+ __asm__ ("cfmv64lr %Z1, %0\n\tcfmv64lr %Z2, %4\n\tcfmv64lr %Z3, %5\n\tcfmsc32 %Y1, %Y2, %Y3\n\tcfmvr64l %0, %Z1" \
+ : "+r" (x), "=v" (__c1), "=v" (__c2), "=v" (__c3) \
+ : "r" (y), "r" (z)); \
+ } while (0)
+ #endif /* _CIRRUS_H_ */
+ #endif /* __MAVERICK__ */



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