From c87ba6712cd424d06dfa450b1b4ea4bc86fb3198 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 18 Aug 1993 00:34:51 -0600 Subject: [PATCH] pa.h (TARGET_GAS): New target flag to control use of GAS specific assembler directives. * pa.h (TARGET_GAS): New target flag to control use of GAS specific assembler directives. (TARGET_SWITCHES): Support -mgas and -mno-gas. (ASM_DECLARE_FUNCTION_NAME): If TARGET_GAS, then emit .PARAM directives for static functions so that argument relocations work. From-SVN: r5173 --- gcc/config/pa/pa.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 7140868..929a8ae 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -74,6 +74,12 @@ extern int target_flags; #define TARGET_TRAILING_COLON (target_flags & 64) +/* Emit directives only understood by GAS. This allows parameter + relocations to work for static functions. There is no way + to make them work the HP assembler at this time. */ + +#define TARGET_GAS (target_flags & 128) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } @@ -97,10 +103,12 @@ extern int target_flags; {"no-disable-indexing", -32},\ {"trailing-colon", 64}, \ {"no-trailing-colon", -64}, \ + {"gas", 128}, \ + {"no-gas", -128}, \ { "", TARGET_DEFAULT}} #ifndef TARGET_DEFAULT -#define TARGET_DEFAULT 0 +#define TARGET_DEFAULT 128 /* TARGET_GAS + TARGET_JUMP_IN_DELAY */ #endif #define DBX_DEBUGGING_INFO @@ -866,10 +874,19 @@ extern enum cmp_type hppa_branch_type; tree tree_type = TREE_TYPE (DECL); \ tree parm; \ int i; \ - if (TREE_PUBLIC (DECL)) \ + if (TREE_PUBLIC (DECL) || TARGET_GAS) \ { extern int current_function_varargs; \ - fputs ("\t.EXPORT ", FILE); assemble_name (FILE, NAME); \ - fputs (",ENTRY,PRIV_LEV=3", FILE); \ + if (TREE_PUBLIC (DECL)) \ + { \ + fputs ("\t.EXPORT ", FILE); \ + assemble_name (FILE, NAME); \ + fputs (",ENTRY,PRIV_LEV=3", FILE); \ + } \ + else \ + { \ + fputs ("\t.PARAM ", FILE); \ + assemble_name (FILE, NAME); \ + } \ for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4; \ parm = TREE_CHAIN (parm)) \ { \ -- 2.7.4