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]

Preparations for IA64/VMS


The patch makes some changes to ia64.c and ia64.h that don't do anything
for any current configuration but pave the way for the IA64/VMS port.
Mostly these correct support for the Intel assembler (non-GAS).

2003-10-10  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/ia64/ia64.c (ia64_vms_init_libfuncs): New function.
	(ia64_output_function_prologue): Only write .prologue if --with-gnu-as.
	(ia64_initialize_trampoline): If not using GAS, declare trampoline
	as global.
	* config/ia64/ia64.h (ASM_APP_ON, ASM_APP_OFF): Add vers for not GAS.
	(ASM_OUTPUT_DEBUG_LABEL): Likewise.
	
*** config/ia64/ia64.c	7 Oct 2003 02:23:40 -0000	1.251
--- config/ia64/ia64.c	10 Oct 2003 21:52:46 -0000
*************** static void ia64_hpux_file_end (void)
*** 256,259 ****
--- 256,261 ----
  static void ia64_hpux_init_libfuncs (void)
       ATTRIBUTE_UNUSED;
+ static void ia64_vms_init_libfuncs (void)
+      ATTRIBUTE_UNUSED;
  
  static tree ia64_handle_model_attribute (tree *, tree, tree, int, bool *);
*************** ia64_output_function_prologue (FILE *fil
*** 3133,3137 ****
      }
  
!   if (mask)
      fprintf (file, "\t.prologue %d, %d\n", mask,
  	     ia64_dbx_register_number (grsave));
--- 3135,3139 ----
      }
  
!   if (mask && TARGET_GNU_AS)
      fprintf (file, "\t.prologue %d, %d\n", mask,
  	     ia64_dbx_register_number (grsave));
*************** ia64_initialize_trampoline (rtx addr, rt
*** 3216,3219 ****
--- 3218,3234 ----
    rtx addr_reg, eight = GEN_INT (8);
  
+   /* The Intel assembler requires that the global __ia64_trampoline symbol
+      be declared explicitly */
+   if (!TARGET_GNU_AS)
+     {
+       static bool declared_ia64_trampoline = false;
+ 
+       if (!declared_ia64_trampoline)
+ 	{
+ 	  declared_ia64_trampoline = true;
+ 	  fputs ("\t.global\t__ia64_trampoline\n", asm_out_file);
+ 	}
+     }
+ 
    /* Load up our iterator.  */
    addr_reg = gen_reg_rtx (Pmode);
*************** ia64_hpux_file_end (void)
*** 8308,8311 ****
--- 8323,8327 ----
  
  /* Rename all the TFmode libfuncs using the HPUX conventions.  */
+ 
  static void
  ia64_hpux_init_libfuncs (void)
*************** ia64_hpux_init_libfuncs (void)
*** 8339,8342 ****
--- 8355,8373 ----
    set_conv_libfunc (sfloat_optab, TFmode, SImode, "_U_Qfcnvxf_sgl_to_quad");
    set_conv_libfunc (sfloat_optab, TFmode, DImode, "_U_Qfcnvxf_dbl_to_quad");
+ }
+ 
+ /* Rename the division and modulus functions in VMS.  */
+ 
+ static void
+ ia64_vms_init_libfuncs (void)
+ {
+   set_optab_libfunc (sdiv_optab, SImode, "OTS$DIV_I");
+   set_optab_libfunc (sdiv_optab, DImode, "OTS$DIV_L");
+   set_optab_libfunc (udiv_optab, SImode, "OTS$DIV_UI");
+   set_optab_libfunc (udiv_optab, DImode, "OTS$DIV_UL");
+   set_optab_libfunc (smod_optab, SImode, "OTS$REM_I");
+   set_optab_libfunc (smod_optab, DImode, "OTS$REM_L");
+   set_optab_libfunc (umod_optab, SImode, "OTS$REM_UI");
+   set_optab_libfunc (umod_optab, DImode, "OTS$REM_UL");
  }
  
*** config/ia64/ia64.h	27 Sep 2003 04:48:19 -0000	1.157
--- config/ia64/ia64.h	10 Oct 2003 21:52:49 -0000
*************** do {									\
*** 1746,1760 ****
     group of consecutive ones.  */
  
! /* ??? This won't work with the Intel assembler, because it does not accept
!    # as a comment start character.  However, //APP does not work in gas, so we
!    can't use that either.  Same problem for ASM_APP_OFF below.  */
! 
! #define ASM_APP_ON "#APP\n"
  
  /* A C string constant for text to be output after each `asm' statement or
     group of consecutive ones.  */
  
! #define ASM_APP_OFF "#NO_APP\n"
! 
  
  /* Output of Uninitialized Variables.  */
--- 1746,1755 ----
     group of consecutive ones.  */
  
! #define ASM_APP_ON (TARGET_GNU_AS ? "#APP\n" : "//APP\n")
  
  /* A C string constant for text to be output after each `asm' statement or
     group of consecutive ones.  */
  
! #define ASM_APP_OFF (TARGET_GNU_AS ? "#NO_APP\n" : "//NO_APP\n")
  
  /* Output of Uninitialized Variables.  */
*************** do {									\
*** 2134,2138 ****
  
  #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
!   fprintf (FILE, "[.%s%d:]\n", PREFIX, NUM)
  
  /* Use section-relative relocations for debugging offsets.  Unlike other
--- 2129,2133 ----
  
  #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
!   fprintf (FILE, TARGET_GNU_AS ? "[.%s%d:]\n" : ".%s%d:\n", PREFIX, NUM)
  
  /* Use section-relative relocations for debugging offsets.  Unlike other


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