RFA: Add support for sh2e.
Nick Clifton
nickc@redhat.com
Thu Jan 23 18:46:00 GMT 2003
Hi Guys,
I am contributing the SH2E port developed by Red Hat. May I apply
the patch below to the newlib sources please ?
Cheers
Nick
newlib/ChangeLog
2003-01-23 Nick Clifton <nickc@redhat.com>
* Add sh2e support:
2002-04-02 Alexandre Oliva <aoliva@redhat.com>
* libc/machine/sh/asm.h: Added __SH2E__ next to __SH3E__.
* libc/machine/sh/setjmp.S: Likewise.
* libc/include/machine/ieeefp.h: Likewise.
Index: newlib/libc/include/machine/ieeefp.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/ieeefp.h,v
retrieving revision 1.15
diff -c -3 -p -w -r1.15 ieeefp.h
*** newlib/libc/include/machine/ieeefp.h 18 Jan 2003 08:55:07 -0000 1.15
--- newlib/libc/include/machine/ieeefp.h 23 Jan 2003 17:17:11 -0000
***************
*** 94,100 ****
#else
#define __IEEE_BIG_ENDIAN
#endif
! #if defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__)
#define _DOUBLE_IS_32BITS
#endif
#endif
--- 94,100 ----
#else
#define __IEEE_BIG_ENDIAN
#endif
! #if defined(__SH2E__) || defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__)
#define _DOUBLE_IS_32BITS
#endif
#endif
Index: newlib/libc/machine/sh/asm.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/sh/asm.h,v
retrieving revision 1.4
diff -c -3 -p -w -r1.4 asm.h
*** newlib/libc/machine/sh/asm.h 7 Jul 2002 00:27:20 -0000 1.4
--- newlib/libc/machine/sh/asm.h 23 Jan 2003 17:17:11 -0000
***************
*** 22,28 ****
#define ENTRY(name) \
_ENTRY(_C_LABEL(name))
! #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \
|| defined (__SH4_SINGLE__) || defined (__SH4__)) \
|| defined (__SH4_SINGLE_ONLY__) || defined (__SH5__)
#define DELAYED_BRANCHES
--- 22,28 ----
#define ENTRY(name) \
_ENTRY(_C_LABEL(name))
! #if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \
|| defined (__SH4_SINGLE__) || defined (__SH4__)) \
|| defined (__SH4_SINGLE_ONLY__) || defined (__SH5__)
#define DELAYED_BRANCHES
Index: newlib/libc/machine/sh/setjmp.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/sh/setjmp.S,v
retrieving revision 1.2
diff -c -3 -p -w -r1.2 setjmp.S
*** newlib/libc/machine/sh/setjmp.S 8 Feb 2002 07:11:09 -0000 1.2
--- newlib/libc/machine/sh/setjmp.S 23 Jan 2003 17:17:11 -0000
*************** ENTRY(setjmp)
*** 72,78 ****
movi 0, r2
blink tr0, r63
#else
! #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
add #(13*4),r4
#else
add #(9*4),r4
--- 72,78 ----
movi 0, r2
blink tr0, r63
#else
! #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
add #(13*4),r4
#else
add #(9*4),r4
*************** ENTRY(setjmp)
*** 80,86 ****
sts.l pr,@-r4
! #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
fmov.s fr15,@-r4 ! call saved floating point registers
fmov.s fr14,@-r4
fmov.s fr13,@-r4
--- 80,86 ----
sts.l pr,@-r4
! #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
fmov.s fr15,@-r4 ! call saved floating point registers
fmov.s fr14,@-r4
fmov.s fr13,@-r4
*************** ENTRY(longjmp)
*** 173,179 ****
mov.l @r4+,r14
mov.l @r4+,r15
! #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
fmov.s @r4+,fr12 ! call saved floating point registers
fmov.s @r4+,fr13
fmov.s @r4+,fr14
--- 173,179 ----
mov.l @r4+,r14
mov.l @r4+,r15
! #if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
fmov.s @r4+,fr12 ! call saved floating point registers
fmov.s @r4+,fr13
fmov.s @r4+,fr14
More information about the Newlib
mailing list