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]

v850 patch to eliminate store to ctbp


The ctbp is a v850e specific register.  It does not exist on the v850.
The startup code is trying to initialize it anyways.  The v850 architecture
manual says that writes to undefined control registers have undefined
behaviour, so it is not wise to do this.  This patch deletes the problematic
startup code.  Since we have separate startup code for the v850 and v850e,
this code isn't doing anything useful anyways.

This was tested with a make check-gcc on an uberbaum tree configured for v850.

I have checked in the patch and added myself to the write-after-approval
section of the MAINTAINERS file with Jeff Johnson's permission.

2002-09-27  Jim Wilson  <wilson@redhat.com>

	* libc/sys/sysnecv850/crt0.S (start): Delete v850 code for initializing
	the ctbp register.

Index: crt0.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/sysnecv850/crt0.S,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 crt0.S
*** crt0.S	17 Feb 2000 19:39:50 -0000	1.1.1.1
--- crt0.S	27 Sep 2002 19:11:30 -0000
*************** _start:
*** 42,57 ****
  	movhi   hi(__gp),	r0,	gp
  	movea   lo(__gp),	gp,	gp
  
- 	/* Initialise the call table base pointer.
- 	We do this even though we are supposedly 
- 	assembling this file for the v850 as this
- 	allows us to use the same binary for all
- 	versions of the v850 architecture.  */
- 	
- 	movhi   hi(__ctbp),	r0,     r6
- 	movea   lo(__ctbp),	r6,     r6
- 	ldsr    r6,             ctbp
- 
  	movhi   hi(_edata),	r0,	r6
  	movea   lo(_edata),	r6,	r6
  	movhi   hi(_end),	r0,	r7
--- 42,47 ----


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