multi-line strings in sim/igen

Richard Henderson rth@redhat.com
Sun Jun 2 14:58:00 GMT 2002


GCC 3.1 warns, mainline errors.

Ok?


r~


	* igen/gen-engine.c (print_run_body): Avoid multi-line strings.
	* igen/lf.c (lf_print__gnu_copyleft): Likewise.

Index: sim/igen/gen-engine.c
===================================================================
RCS file: /cvs/src/src/sim/igen/gen-engine.c,v
retrieving revision 1.1.1.1
diff -c -p -d -r1.1.1.1 gen-engine.c
*** sim/igen/gen-engine.c	16 Apr 1999 01:35:04 -0000	1.1.1.1
--- sim/igen/gen-engine.c	2 Jun 2002 21:55:12 -0000
*************** print_run_body (lf *file,
*** 98,118 ****
    if (!options.gen.smp)
      {
        
!       lf_putstr (file, "
! /* CASE 1: NO SMP (with or with out instruction cache).
! 
! In this case, we can take advantage of the fact that the current
! instruction address (CIA) does not need to be read from / written to
! the CPU object after the execution of an instruction.
! 
! Instead, CIA is only saved when the main loop exits.  This occures
! when either sim_engine_halt or sim_engine_restart is called.  Both of
! these functions save the current instruction address before halting /
! restarting the simulator.
! 
! As a variation, there may also be support for an instruction cracking
! cache. */
! 
  ");
  
        lf_putstr (file, "\n");
--- 98,118 ----
    if (!options.gen.smp)
      {
        
!       lf_putstr (file, "\
! /* CASE 1: NO SMP (with or with out instruction cache).\n\
! \n\
! In this case, we can take advantage of the fact that the current\n\
! instruction address (CIA) does not need to be read from / written to\n\
! the CPU object after the execution of an instruction.\n\
! \n\
! Instead, CIA is only saved when the main loop exits.  This occures\n\
! when either sim_engine_halt or sim_engine_restart is called.  Both of\n\
! these functions save the current instruction address before halting /\n\
! restarting the simulator.\n\
! \n\
! As a variation, there may also be support for an instruction cracking\n\
! cache. */\n\
! \n\
  ");
  
        lf_putstr (file, "\n");
*************** cache. */
*** 215,228 ****
    if (options.gen.smp)
      {
        
!       lf_putstr (file, "
! /* CASE 2: SMP (With or without ICACHE)
! 
! The complexity here comes from needing to correctly halt the simulator
! when it is aborted.  For instance, if cpu0 requests a restart then
! cpu1 will normally be the next cpu that is run.  Cpu0 being restarted
! after all the other CPU's and the event queue have been processed */
! 
  ");
        
        lf_putstr (file, "\n");
--- 215,228 ----
    if (options.gen.smp)
      {
        
!       lf_putstr (file, "\
! /* CASE 2: SMP (With or without ICACHE)\n\
! \n\
! The complexity here comes from needing to correctly halt the simulator\n\
! when it is aborted.  For instance, if cpu0 requests a restart then\n\
! cpu1 will normally be the next cpu that is run.  Cpu0 being restarted\n\
! after all the other CPU's and the event queue have been processed */\n\
! \n\
  ");
        
        lf_putstr (file, "\n");
Index: sim/igen/lf.c
===================================================================
RCS file: /cvs/src/src/sim/igen/lf.c,v
retrieving revision 1.1.1.1
diff -c -p -d -r1.1.1.1 lf.c
*** sim/igen/lf.c	16 Apr 1999 01:35:05 -0000	1.1.1.1
--- sim/igen/lf.c	2 Jun 2002 21:55:12 -0000
*************** lf_print__gnu_copyleft (lf *file)
*** 259,285 ****
    case lf_is_c:
    case lf_is_h:
      nr += lf_printf(file, "\
! /*  This file is part of the program psim.
! 
!     Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
! 
!     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 of the License, or
!     (at your option) any later version.
! 
!     This program 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 this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
!  
!     --
! 
!     This file was generated by the program %s */
  ", filter_filename(file->program));
      break;
    default:
--- 259,285 ----
    case lf_is_c:
    case lf_is_h:
      nr += lf_printf(file, "\
! /*  This file is part of the program psim.\n\
! \n\
!     Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>\n\
! \n\
!     This program is free software; you can redistribute it and/or modify\n\
!     it under the terms of the GNU General Public License as published by\n\
!     the Free Software Foundation; either version 2 of the License, or\n\
!     (at your option) any later version.\n\
! \n\
!     This program is distributed in the hope that it will be useful,\n\
!     but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
!     GNU General Public License for more details.\n\
!  \n\
!     You should have received a copy of the GNU General Public License\n\
!     along with this program; if not, write to the Free Software\n\
!     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
! \n\
!     --\n\
! \n\
!     This file was generated by the program %s */\n\
  ", filter_filename(file->program));
      break;
    default:



More information about the Gdb-patches mailing list