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]

h8300 normal mode patch


This is a follow-on to Dhananjay's recent h8300 -mn patch:

    http://sources.redhat.com/ml/newlib/2003/msg00276.html

Some files in libc/sys/h8300hms were not changed, causing a link
failure with -mn.  Patch tested on h8300-elf.  OK to install?

Richard


	* libc/sys/h8300hms/setarch.h: New file.
	* libc/sys/h8300hms/close.S, libc/sys/h8300hms/fstat.S,
	libc/sys/h8300hms/lseek.S, libc/sys/h8300hms/open.S,
	libc/sys/h8300hms/read.S, libc/sys/h8300hms/stat.S,
	libc/sys/h8300hms/write.S, libc/sys/h8300hms/crt0.S: Use it.

Index: newlib/libc/sys/h8300hms/close.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/close.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 close.S
*** newlib/libc/sys/h8300hms/close.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/close.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,12 ****
  ;int close(int fd);
  ;Integer arguments have to be zero extended.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,7 ----
  ;int close(int fd);
  ;Integer arguments have to be zero extended.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/fstat.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/fstat.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 fstat.S
*** newlib/libc/sys/h8300hms/fstat.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/fstat.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,12 ****
  ;int fstat(int filedes, struct stat *buf);
  ;Integer arguments have to be zero extended.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,7 ----
  ;int fstat(int filedes, struct stat *buf);
  ;Integer arguments have to be zero extended.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/lseek.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/lseek.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 lseek.S
*** newlib/libc/sys/h8300hms/lseek.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/lseek.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,12 ****
  ;off_t lseek(int fildes, off_t offset, int whence);
  ;Integer arguments have to be zero extended.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,7 ----
  ;off_t lseek(int fildes, off_t offset, int whence);
  ;Integer arguments have to be zero extended.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/open.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/open.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 open.S
*** newlib/libc/sys/h8300hms/open.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/open.S	9 Jun 2003 07:51:19 -0000
***************
*** 3,14 ****
  ;The second argument is taken from the stack,
  ;hence it is not zero extended here.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 3,9 ----
  ;The second argument is taken from the stack,
  ;hence it is not zero extended here.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/read.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/read.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 read.S
*** newlib/libc/sys/h8300hms/read.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/read.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,12 ****
  ;ssize_t read(int fd, void *buf, size_t count);
  ;Integer arguments have to be zero extended.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,7 ----
  ;ssize_t read(int fd, void *buf, size_t count);
  ;Integer arguments have to be zero extended.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/stat.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/stat.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 stat.S
*** newlib/libc/sys/h8300hms/stat.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/stat.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,11 ****
  ;int stat(const char *file_name, struct stat *buf);
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,6 ----
  ;int stat(const char *file_name, struct stat *buf);
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/write.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/write.S,v
retrieving revision 1.1
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 write.S
*** newlib/libc/sys/h8300hms/write.S	25 Feb 2003 20:36:29 -0000	1.1
--- newlib/libc/sys/h8300hms/write.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,13 ****
  ;ssize_t write(int fd, const void *buf, size_t count);
  ;Integer arguments have to be zero extended.
  
! #if defined(__H8300H__)
! 	.h8300h
! #endif
! 
! #if defined(__H8300S__)
! 	.h8300s
! #endif
  
  	.section .text
  	.align 2
--- 1,7 ----
  ;ssize_t write(int fd, const void *buf, size_t count);
  ;Integer arguments have to be zero extended.
  
! #include "setarch.h"
  
  	.section .text
  	.align 2
Index: newlib/libc/sys/h8300hms/crt0.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/h8300hms/crt0.S,v
retrieving revision 1.7
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.7 crt0.S
*** newlib/libc/sys/h8300hms/crt0.S	28 May 2003 18:00:17 -0000	1.7
--- newlib/libc/sys/h8300hms/crt0.S	9 Jun 2003 07:51:19 -0000
***************
*** 1,5 ****
--- 1,7 ----
  ; h8/300 and h8/300h start up file.
  
+ #include "setarch.h"
+ 
  #ifdef __H8300__
  
  	.section .text
*************** _stack:	.word 	1
*** 36,46 ****
  
  #ifdef __H8300H__
  
- #ifdef __NORMAL_MODE__
- 	.h8300hn
- #else
- 	.h8300h
- #endif
  	.section .text
  	.global	_start
  _start:
--- 38,43 ----
*************** _stack:	.long 	1
*** 74,84 ****
  #endif
  
  #ifdef __H8300S__
! #ifdef __NORMAL_MODE__
! 	.h8300sn
! #else
! 	.h8300s
! #endif
  	.section .text
  	.global	_start
  _start:
--- 71,77 ----
  #endif
  
  #ifdef __H8300S__
! 
  	.section .text
  	.global	_start
  _start:
*** /dev/null	Thu Apr 11 15:25:15 2002
--- newlib/libc/sys/h8300hms/setarch.h	Mon Jun  9 08:48:21 2003
***************
*** 0 ****
--- 1,14 ----
+ #ifdef __H8300H__
+ #ifdef __NORMAL_MODE__
+ 	.h8300hn
+ #else
+ 	.h8300h
+ #endif
+ #endif
+ #ifdef __H8300S__
+ #ifdef __NORMAL_MODE__
+ 	.h8300sn
+ #else
+ 	.h8300s
+ #endif
+ #endif


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