read.h revision 104834
1262569Simp/* read.h - of read.c 2262569Simp Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3262569Simp 2000 4262569Simp Free Software Foundation, Inc. 5262569Simp 6262569Simp This file is part of GAS, the GNU Assembler. 7262569Simp 8262569Simp GAS is free software; you can redistribute it and/or modify 9262569Simp it under the terms of the GNU General Public License as published by 10262569Simp the Free Software Foundation; either version 2, or (at your option) 11262569Simp any later version. 12262569Simp 13262569Simp GAS is distributed in the hope that it will be useful, 14262569Simp but WITHOUT ANY WARRANTY; without even the implied warranty of 15262569Simp MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16262569Simp GNU General Public License for more details. 17262569Simp 18262569Simp You should have received a copy of the GNU General Public License 19262569Simp along with GAS; see the file COPYING. If not, write to the Free 20262569Simp Software Foundation, 59 Temple Place - Suite 330, Boston, MA 21262569Simp 02111-1307, USA. */ 22262569Simp 23262569Simpextern char *input_line_pointer; /* -> char we are parsing now. */ 24262569Simp 25262569Simp/* Define to make whitespace be allowed in many syntactically 26262569Simp unnecessary places. Normally undefined. For compatibility with 27262569Simp ancient GNU cc. */ 28262569Simp/* #undef PERMIT_WHITESPACE */ 29262569Simp#define PERMIT_WHITESPACE 30262569Simp 31262569Simp#ifdef PERMIT_WHITESPACE 32262569Simp#define SKIP_WHITESPACE() \ 33262569Simp { \ 34262569Simp if (* input_line_pointer == ' ') \ 35262569Simp ++ input_line_pointer; \ 36262569Simp } 37262569Simp#else 38262569Simp#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' ) 39262569Simp#endif 40262569Simp 41262569Simp#define LEX_NAME (1) /* may continue a name */ 42262569Simp#define LEX_BEGIN_NAME (2) /* may begin a name */ 43262569Simp#define LEX_END_NAME (4) /* ends a name */ 44262569Simp 45270864Simp#define is_name_beginner(c) \ 46270864Simp ( lex_type[(unsigned char) (c)] & LEX_BEGIN_NAME ) 47270864Simp#define is_part_of_name(c) \ 48270864Simp ( lex_type[(unsigned char) (c)] & LEX_NAME ) 49270864Simp#define is_name_ender(c) \ 50270864Simp ( lex_type[(unsigned char) (c)] & LEX_END_NAME ) 51270864Simp 52270864Simp#ifndef is_a_char 53262569Simp#define CHAR_MASK (0xff) 54262569Simp#define NOT_A_CHAR (CHAR_MASK+1) 55262569Simp#define is_a_char(c) (((unsigned) (c)) <= CHAR_MASK) 56262569Simp#endif /* is_a_char() */ 57262569Simp 58262569Simpextern char lex_type[]; 59262569Simpextern char is_end_of_line[]; 60262569Simp 61262569Simpextern int is_it_end_of_statement PARAMS ((void)); 62262569Simp 63262569Simpextern int target_big_endian; 64262569Simp 65262569Simp/* These are initialized by the CPU specific target files (tc-*.c). */ 66262569Simpextern const char comment_chars[]; 67262569Simpextern const char line_comment_chars[]; 68262569Simpextern const char line_separator_chars[]; 69262569Simp 70262569Simp/* Table of -I directories. */ 71262569Simpextern char **include_dirs; 72262569Simpextern int include_dir_count; 73262569Simpextern int include_dir_maxlen; 74262569Simp 75262569Simp/* The offset in the absolute section. */ 76262569Simpextern addressT abs_section_offset; 77262569Simp 78262569Simp/* The label on a line, used by some of the pseudo-ops. */ 79262569Simpextern symbolS *line_label; 80262569Simp 81262569Simp/* This is used to support MRI common sections. */ 82262569Simpextern symbolS *mri_common_symbol; 83262569Simp 84262569Simp/* True if a stabs line debug statement is currently being emitted. */ 85262569Simpextern int outputting_stabs_line_debug; 86262569Simp 87262569Simp/* Possible arguments to .linkonce. */ 88262569Simpenum linkonce_type { 89262569Simp LINKONCE_UNSET = 0, 90262569Simp LINKONCE_DISCARD, 91262569Simp LINKONCE_ONE_ONLY, 92262569Simp LINKONCE_SAME_SIZE, 93262569Simp LINKONCE_SAME_CONTENTS 94262569Simp}; 95262569Simp 96262569Simp#define IGNORE_OPCODE_CASE 97262569Simp#ifdef IGNORE_OPCODE_CASE 98262569Simpextern char original_case_string[]; 99262569Simp#endif 100262569Simp 101262569Simpextern void pop_insert PARAMS ((const pseudo_typeS *)); 102262569Simpextern unsigned int get_stab_string_offset 103262569Simp PARAMS ((const char *string, const char *stabstr_secname)); 104262569Simpextern void aout_process_stab PARAMS ((int, const char *, int, int, int)); 105262569Simpextern char *demand_copy_C_string PARAMS ((int *len_pointer)); 106262569Simpextern char get_absolute_expression_and_terminator 107262569Simp PARAMS ((long *val_pointer)); 108262569Simpextern offsetT get_absolute_expression PARAMS ((void)); 109262569Simpextern unsigned int next_char_of_string PARAMS ((void)); 110262569Simpextern void s_mri_sect PARAMS ((char *)); 111262569Simpextern char *mri_comment_field PARAMS ((char *)); 112262569Simpextern void mri_comment_end PARAMS ((char *, int)); 113262569Simpextern void add_include_dir PARAMS ((char *path)); 114262569Simpextern void cons PARAMS ((int nbytes)); 115262569Simpextern void demand_empty_rest_of_line PARAMS ((void)); 116262569Simpextern void emit_expr PARAMS ((expressionS *exp, unsigned int nbytes)); 117262569Simpextern void emit_leb128_expr PARAMS ((expressionS *, int)); 118262569Simpextern void equals PARAMS ((char *sym_name, int reassign)); 119262569Simpextern void float_cons PARAMS ((int float_type)); 120262569Simpextern void ignore_rest_of_line PARAMS ((void)); 121262569Simpextern void discard_rest_of_line PARAMS ((void)); 122262569Simpextern int output_leb128 PARAMS ((char *, valueT, int sign)); 123262569Simpextern void pseudo_set PARAMS ((symbolS * symbolP)); 124262569Simpextern void read_a_source_file PARAMS ((char *name)); 125262569Simpextern void read_begin PARAMS ((void)); 126262569Simpextern void read_print_statistics PARAMS ((FILE *)); 127262569Simpextern int sizeof_leb128 PARAMS ((valueT, int sign)); 128262569Simpextern void stabs_generate_asm_file PARAMS ((void)); 129262569Simpextern void stabs_generate_asm_lineno PARAMS ((void)); 130262569Simpextern void stabs_generate_asm_func PARAMS ((const char *, const char *)); 131262569Simpextern void stabs_generate_asm_endfunc PARAMS ((const char *, const char *)); 132262569Simpextern void do_repeat PARAMS((int,const char *,const char *)); 133262569Simpextern void end_repeat PARAMS((int)); 134262569Simp 135262569Simpextern void generate_lineno_debug PARAMS ((void)); 136262569Simp 137262569Simpextern void s_abort PARAMS ((int)) ATTRIBUTE_NORETURN; 138262569Simpextern void s_align_bytes PARAMS ((int arg)); 139262569Simpextern void s_align_ptwo PARAMS ((int)); 140262569Simpextern void s_app_file_string PARAMS ((char *)); 141262569Simpextern void s_app_file PARAMS ((int)); 142262569Simpextern void s_app_line PARAMS ((int)); 143262569Simpextern void s_bad_endr PARAMS ((int)); 144262569Simpextern void s_comm PARAMS ((int)); 145262569Simpextern void s_data PARAMS ((int)); 146262569Simpextern void s_desc PARAMS ((int)); 147262569Simpextern void s_else PARAMS ((int arg)); 148262569Simpextern void s_elseif PARAMS ((int arg)); 149262569Simpextern void s_end PARAMS ((int arg)); 150262569Simpextern void s_endif PARAMS ((int arg)); 151262569Simpextern void s_err PARAMS ((int)); 152262569Simpextern void s_fail PARAMS ((int)); 153262569Simpextern void s_fill PARAMS ((int)); 154262569Simpextern void s_float_space PARAMS ((int mult)); 155262569Simpextern void s_func PARAMS ((int)); 156262569Simpextern void do_s_func PARAMS ((int, const char *)); 157262569Simpextern void s_globl PARAMS ((int arg)); 158262569Simpextern void s_if PARAMS ((int arg)); 159262569Simpextern void s_ifc PARAMS ((int arg)); 160262569Simpextern void s_ifdef PARAMS ((int arg)); 161262569Simpextern void s_ifeqs PARAMS ((int arg)); 162262569Simpextern void s_ignore PARAMS ((int arg)); 163262569Simpextern void s_include PARAMS ((int arg)); 164262569Simpextern void s_irp PARAMS ((int arg)); 165262569Simpextern void s_lcomm PARAMS ((int needs_align)); 166262569Simpextern void s_lcomm_bytes PARAMS ((int needs_align)); 167262569Simpextern void s_leb128 PARAMS ((int sign)); 168262569Simpextern void s_linkonce PARAMS ((int)); 169262569Simpextern void s_lsym PARAMS ((int)); 170262569Simpextern void s_macro PARAMS ((int)); 171262569Simpextern void s_mexit PARAMS ((int)); 172262569Simpextern void s_mri PARAMS ((int)); 173262569Simpextern void s_mri_common PARAMS ((int)); 174262569Simpextern void s_org PARAMS ((int)); 175262569Simpextern void s_print PARAMS ((int)); 176262569Simpextern void s_purgem PARAMS ((int)); 177262569Simpextern void s_rept PARAMS ((int)); 178262569Simpextern void s_set PARAMS ((int)); 179262569Simpextern void s_space PARAMS ((int mult)); 180262569Simpextern void s_stab PARAMS ((int what)); 181262569Simpextern void s_struct PARAMS ((int)); 182262569Simpextern void s_text PARAMS ((int)); 183262569Simpextern void stringer PARAMS ((int append_zero)); 184262569Simpextern void s_xstab PARAMS ((int what)); 185262569Simpextern void s_rva PARAMS ((int)); 186262569Simpextern void s_incbin PARAMS ((int)); 187262569Simp