* read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare.
(s_func): Declare.
* read.c (potable): Add .func,.endfunc.
(s_func): New function.
* stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New
functions.
(in_doc_func_p,current_function_label): New static globals.
(stabs_generate_asm_lineno): Emit function relative stabs if in .func.
-start-sanitize-sky
Sun May 31 15:43:06 1998 Doug Evans <devans@canuck.cygnus.com>
+ Implement .func/.endfunc pseudo-ops.
+ * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare.
+ (s_func): Declare.
+ * read.c (potable): Add .func,.endfunc.
+ (s_func): New function.
+ * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New
+ functions.
+ (in_doc_func_p,current_function_label): New static globals.
+ (stabs_generate_asm_lineno): Emit function relative stabs if in .func.
+
+start-sanitize-sky
* config/tc-dvp.h (ELF_TC_SPECIAL_SECTIONS): Delete .vuoverlay_table.
(VUOVERLAY_SECTION_PREFIX,VUOVERLAY_TABLE_SECTION_NAME): Delete.
* config/tc-dvp.c (vuoverlay_string_section): New static global.
{"elsec", s_else, 0},
{"end", s_end, 0},
{"endc", s_endif, 0},
+ {"endfunc", s_func, 1},
{"endif", s_endif, 0},
/* endef */
{"equ", s_set, 0},
{"fill", s_fill, 0},
{"float", float_cons, 'f'},
{"format", s_ignore, 0},
+ {"func", s_func, 0},
{"global", s_globl, 0},
{"globl", s_globl, 0},
{"hword", cons, 2},
if (i > include_dir_maxlen)
include_dir_maxlen = i;
} /* add_include_dir() */
-
+\f
/* Output debugging information to denote the source file. */
static void
#endif
}
+/* Output debugging information to mark a function entry point or end point.
+ END_P is zero for .func, and non-zero for .endfunc. */
+
+void
+s_func (end_p)
+ int end_p;
+{
+ /* Record the current function so that we can issue an error message for
+ misplaced .func,.endfunc, and also so that .endfunc needs no
+ arguments. */
+ static char *current_name;
+ static char *current_label;
+
+ if (end_p)
+ {
+ if (current_name == NULL)
+ {
+ as_bad (_("missing .func"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_endfunc (current_name, current_label);
+
+ current_name = current_label = NULL;
+ }
+ else /* ! end_p */
+ {
+ char *name,*label;
+ char delim1,delim2;
+
+ if (current_name != NULL)
+ {
+ as_bad (_(".endfunc missing for previous .func"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ name = input_line_pointer;
+ delim1 = get_symbol_end ();
+ name = xstrdup (name);
+ *input_line_pointer = delim1;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ {
+ /* Missing entry point, use function's name. */
+ label = name;
+ }
+ else
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ label = input_line_pointer;
+ delim2 = get_symbol_end ();
+ label = xstrdup (label);
+ *input_line_pointer = delim2;
+ }
+
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_func (name, label);
+
+ current_name = name;
+ current_label = label;
+ }
+
+ demand_empty_rest_of_line ();
+}
+\f
void
s_ignore (arg)
int arg;
/* read.h - of read.c
- Copyright (C) 1986, 90, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 1997
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
extern const char line_comment_chars[];
extern const char line_separator_chars[];
+/* Table of -I directories. */
+extern char **include_dirs;
+extern int include_dir_count;
+extern int include_dir_maxlen;
+
/* The offset in the absolute section. */
extern addressT abs_section_offset;
extern void read_begin PARAMS ((void));
extern void read_print_statistics PARAMS ((FILE *));
extern int sizeof_leb128 PARAMS ((valueT, int sign));
+extern void stabs_generate_asm_file PARAMS ((void));
extern void stabs_generate_asm_lineno PARAMS ((void));
+extern void stabs_generate_asm_func PARAMS ((const char *, const char *));
+extern void stabs_generate_asm_endfunc PARAMS ((const char *, const char *));
extern void s_abort PARAMS ((int));
extern void s_align_bytes PARAMS ((int arg));
extern void s_fail PARAMS ((int));
extern void s_fill PARAMS ((int));
extern void s_float_space PARAMS ((int mult));
+extern void s_func PARAMS ((int));
extern void s_globl PARAMS ((int arg));
extern void s_if PARAMS ((int arg));
extern void s_ifc PARAMS ((int arg));
extern void s_include PARAMS ((int arg));
extern void s_irp PARAMS ((int arg));
extern void s_lcomm PARAMS ((int needs_align));
+extern void s_lcomm_bytes PARAMS ((int needs_align));
extern void s_leb128 PARAMS ((int sign));
extern void s_linkonce PARAMS ((int));
extern void s_lsym PARAMS ((int));