This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

fix Xtensa libgcc copyright messages



This patch fixes two problems.  (In retrospect, it should have been two
separate patches.)  First, and most importantly, the libgcc files in the
Xtensa port were missing the special libgcc licensing text in the copyright
message.  I had already fixed that for the 3.0 branch as part of a separate
patch that was irrelevant for the post-3.0 code.  This fixes it for the
3.1 branch.  Second, the Xtensa libgcc code had assumed that the processor
supports the Xtensa zero-overhead loop instructions, which is not (or will
not) always be the case.  The patch modifies the libgcc code to work either
with or without the zero-overhead loop instructions.

Already applied to the 3.1 branch and top-of-trunk.

2002-03-12  Bob Wilson  <bob.wilson@acm.org>

        * config/xtensa/xtensa-config.h: Define XCHAL_HAVE_LOOPS.
        * config/xtensa/lib1funcs.asm: Fix copyright to include
        special case for libgcc files.
        (__udivsi3): Avoid loop instructions when XCHAL_HAVE_LOOPS is 0.
        (__divsi3): Likewise.
        (__umodsi3): Likewise.
        (__modsi3): Likewise.
        * config/xtensa/lib2funcs.S: Fix copyright to include
        special case for libgcc files.

Index: xtensa-config.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa-config.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -3 -r1.1 -r1.2
*** xtensa-config.h	2002/01/23 21:03:50	1.1
--- xtensa-config.h	2002/03/12 20:02:36	1.2
***************
*** 1,7 ****
  /* Xtensa configuration settings.
!    Copyright (C) 2001 Free Software Foundation, Inc.
     Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
  
  This program 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)
--- 1,12 ----
  /* Xtensa configuration settings.
!    Copyright (C) 2001,2002 Free Software Foundation, Inc.
     Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
  
+ ** NOTE: This file was automatically generated by the Xtensa Processor
+ ** Generator.  Changes made here will be lost when this file is
+ ** updated or replaced with the settings for a different Xtensa
+ ** processor configuration.  DO NOT EDIT!
+ 
  This program 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)
***************
*** 29,34 ****
--- 34,40 ----
  #define XCHAL_HAVE_NSA			1
  #define XCHAL_HAVE_MINMAX		0
  #define XCHAL_HAVE_SEXT			0
+ #define XCHAL_HAVE_LOOPS		1
  #define XCHAL_HAVE_BOOLEANS		0
  #define XCHAL_HAVE_FP			0
  #define XCHAL_HAVE_FP_DIV		0
Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/lib1funcs.asm,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -3 -r1.1 -r1.2
*** lib1funcs.asm	2002/01/23 21:03:50	1.1
--- lib1funcs.asm	2002/03/12 20:02:36	1.2
***************
*** 1,5 ****
  /* Assembly functions for the Xtensa version of libgcc1.
!    Copyright (C) 2001 Free Software Foundation, Inc.
     Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
  
  This file is part of GCC.
--- 1,5 ----
  /* Assembly functions for the Xtensa version of libgcc1.
!    Copyright (C) 2001,2002 Free Software Foundation, Inc.
     Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
  
  This file is part of GCC.
***************
*** 9,14 ****
--- 9,23 ----
  Software Foundation; either version 2, or (at your option) any later
  version.
  
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file.  (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combine
+ executable.)
+ 
  GCC 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
***************
*** 211,223 ****
--- 220,239 ----
  	movi	a2, 0		# quotient = 0
  
  	# test-subtract-and-shift loop; one quotient bit on each iteration
+ #if XCHAL_HAVE_LOOPS
  	loopnez	a4, .Lloopend
+ #endif /* XCHAL_HAVE_LOOPS */
+ .Lloop:
  	bltu	a6, a3, .Lzerobit
  	sub	a6, a6, a3
  	addi	a2, a2, 1
  .Lzerobit:
  	slli	a2, a2, 1
  	srli	a3, a3, 1
+ #if !XCHAL_HAVE_LOOPS
+ 	addi	a4, a4, -1
+ 	bnez	a4, .Lloop
+ #endif /* !XCHAL_HAVE_LOOPS */
  .Lloopend:
  
  	bltu	a6, a3, .Lreturn
***************
*** 270,282 ****
--- 286,305 ----
  	movi	a2, 0		# quotient = 0
  
  	# test-subtract-and-shift loop; one quotient bit on each iteration
+ #if XCHAL_HAVE_LOOPS
  	loopnez	a4, .Lloopend
+ #endif /* XCHAL_HAVE_LOOPS */
+ .Lloop:
  	bltu	a6, a3, .Lzerobit
  	sub	a6, a6, a3
  	addi	a2, a2, 1
  .Lzerobit:
  	slli	a2, a2, 1
  	srli	a3, a3, 1
+ #if !XCHAL_HAVE_LOOPS
+ 	addi	a4, a4, -1
+ 	bnez	a4, .Lloop
+ #endif /* !XCHAL_HAVE_LOOPS */
  .Lloopend:
  
  	bltu	a6, a3, .Lreturn
***************
*** 331,341 ****
--- 354,371 ----
  	sll	a3, a3		# divisor <<= count
  
  	# test-subtract-and-shift loop
+ #if XCHAL_HAVE_LOOPS
  	loopnez	a4, .Lloopend
+ #endif /* XCHAL_HAVE_LOOPS */
+ .Lloop:
  	bltu	a2, a3, .Lzerobit
  	sub	a2, a2, a3
  .Lzerobit:
  	srli	a3, a3, 1
+ #if !XCHAL_HAVE_LOOPS
+ 	addi	a4, a4, -1
+ 	bnez	a4, .Lloop
+ #endif /* !XCHAL_HAVE_LOOPS */
  .Lloopend:
  
  	bltu	a2, a3, .Lreturn
***************
*** 384,394 ****
--- 414,431 ----
  	sll	a3, a3		# udivisor <<= count
  
  	# test-subtract-and-shift loop
+ #if XCHAL_HAVE_LOOPS
  	loopnez	a4, .Lloopend
+ #endif /* XCHAL_HAVE_LOOPS */
+ .Lloop:
  	bltu	a2, a3, .Lzerobit
  	sub	a2, a2, a3
  .Lzerobit:
  	srli	a3, a3, 1
+ #if !XCHAL_HAVE_LOOPS
+ 	addi	a4, a4, -1
+ 	bnez	a4, .Lloop
+ #endif /* !XCHAL_HAVE_LOOPS */
  .Lloopend:
  
  	bltu	a2, a3, .Lreturn
Index: lib2funcs.S
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/lib2funcs.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -3 -r1.1 -r1.2
*** lib2funcs.S	2002/01/23 21:03:50	1.1
--- lib2funcs.S	2002/03/12 20:02:36	1.2
***************
*** 9,14 ****
--- 9,23 ----
  Software Foundation; either version 2, or (at your option) any later
  version.
  
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file.  (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combine
+ executable.)
+ 
  GCC 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

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