type
stringclasses
5 values
content
stringlengths
9
163k
functions
void s_fill (int ignore ATTRIBUTE_UNUSED) { expressionS rep_exp; long size = 1; long fill = 0; char *p; #ifdef md_flush_pending_output md_flush_pending_output (); #endif #ifdef md_cons_align md_cons_align (1); #endif get_known_segmented_expression (&rep_exp); if (*input_line_pointer == ',') { ...
functions
else if (rep_exp.X_op == O_constant && rep_exp.X_add_number <= 0) { if (rep_exp.X_add_number < 0) as_warn (_("repeat < 0; .fill ignored")); size = 0; }
functions
void s_globl (int ignore ATTRIBUTE_UNUSED) { char *name; int c; symbolS *symbolP; char *stop = NULL; char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); do { if ((name = read_symbol_name ()) == NULL) return; symbolP = symbol_find_or_make (name); S_SET_EXTERNAL (s...
functions
void s_irp (int irpc) { char *file, *eol; unsigned int line; sb s; const char *err; sb out; as_where (&file, &line); eol = find_end_of_line (input_line_pointer, 0); sb_build (&s, eol - input_line_pointer); sb_add_buffer (&s, input_line_pointer, eol - input_line_pointer); input_line_pointer = eol; ...
functions
void s_linkonce (int ignore ATTRIBUTE_UNUSED) { enum linkonce_type type; SKIP_WHITESPACE (); type = LINKONCE_DISCARD; if (!is_end_of_line[(unsigned char) *input_line_pointer]) { char *s; char c; s = input_line_pointer; c = get_symbol_end (); if (strcasecmp (s, "discard") ==...
functions
void bss_alloc (symbolS *symbolP, addressT size, int align) { char *pfrag; segT current_seg = now_seg; subsegT current_subseg = now_subseg; segT bss_seg = bss_section; #if defined (TC_MIPS) || defined (TC_ALPHA) if (OUTPUT_FLAVOR == bfd_target_ecoff_flavour || OUTPUT_FLAVOR == bfd_target_elf_flavour) ...
functions
offsetT parse_align (int align_bytes) { expressionS exp; addressT align; SKIP_WHITESPACE (); if (*input_line_pointer != ',') { no_align: as_bad (_("expected alignment after size")); ignore_rest_of_line (); return -1; }
functions
void s_lcomm (int needs_align) { s_comm_internal (needs_align, s_lcomm_internal); }
functions
void s_lcomm_bytes (int needs_align) { s_comm_internal (needs_align * 2, s_lcomm_internal); }
functions
void s_lsym (int ignore ATTRIBUTE_UNUSED) { char *name; expressionS exp; symbolS *symbolP; /* We permit ANY defined expression: BSD4.2 demands constants. */ if ((name = read_symbol_name ()) == NULL) return; if (*input_line_pointer != ',') { as_bad (_("expected comma after \"%s\""), name); ...
functions
int get_line_sb (sb *line, int in_macro) { char *eol; if (input_line_pointer[-1] == '\n') bump_line_counters (); if (input_line_pointer >= buffer_limit) { buffer_limit = input_scrub_next_buffer (&input_line_pointer); if (buffer_limit == 0) return 0; }
functions
size_t get_non_macro_line_sb (sb *line) { return get_line_sb (line, 0); }
functions
size_t get_macro_line_sb (sb *line) { return get_line_sb (line, 1); }
functions
void s_macro (int ignore ATTRIBUTE_UNUSED) { char *file, *eol; unsigned int line; sb s; const char *err; const char *name; as_where (&file, &line); eol = find_end_of_line (input_line_pointer, 0); sb_build (&s, eol - input_line_pointer); sb_add_buffer (&s, input_line_pointer, eol - input_line_pointer...
functions
void s_mexit (int ignore ATTRIBUTE_UNUSED) { if (macro_nest) { cond_exit_macro (macro_nest); buffer_limit = input_scrub_next_buffer (&input_line_pointer); }
functions
void s_mri (int ignore ATTRIBUTE_UNUSED) { int on; #ifdef MRI_MODE_CHANGE int old_flag; #endif on = get_absolute_expression (); #ifdef MRI_MODE_CHANGE old_flag = flag_mri; #endif if (on != 0) { flag_mri = 1; #ifdef TC_M68K flag_m68k_mri = 1; #endif macro_mri_mode (1); }
functions
void do_org (segT segment, expressionS *exp, int fill) { if (segment != now_seg && segment != absolute_section && segment != expr_section) as_bad (_("invalid segment \"%s\""), segment_name (segment)); if (now_seg == absolute_section) { if (fill != 0) as_warn (_("ignoring fill value in ab...
functions
void s_org (int ignore ATTRIBUTE_UNUSED) { segT segment; expressionS exp; long temp_fill; #ifdef md_flush_pending_output md_flush_pending_output (); #endif /* The m68k MRI assembler has a different meaning for .org. It means to create an absolute section at a given address. We can't support that...
functions
void s_mri_sect (char *type ATTRIBUTE_UNUSED) { #ifdef TC_M68K char *name; char c; segT seg; SKIP_WHITESPACE (); name = input_line_pointer; if (!ISDIGIT (*name)) c = get_symbol_end (); else { do { ++input_line_pointer; }
functions
void s_print (int ignore ATTRIBUTE_UNUSED) { char *s; int len; s = demand_copy_C_string (&len); if (s != NULL) printf ("%s\n", s); demand_empty_rest_of_line (); }
functions
void s_purgem (int ignore ATTRIBUTE_UNUSED) { if (is_it_end_of_statement ()) { demand_empty_rest_of_line (); return; }
functions
void s_bad_end (int endr) { as_warn (_(".end%c encountered without preceding %s"), endr ? 'r' : 'm', endr ? ".rept, .irp, or .irpc" : ".macro"); demand_empty_rest_of_line (); }
functions
void s_rept (int ignore ATTRIBUTE_UNUSED) { int count; count = get_absolute_expression (); do_repeat (count, "REPT", "ENDR"); }
functions
void do_repeat (int count, const char *start, const char *end) { sb one; sb many; sb_new (&one); if (!buffer_and_nest (start, end, &one, get_non_macro_line_sb)) { as_bad (_("%s without %s"), start, end); return; }
functions
void do_repeat_with_expander (int count, const char * start, const char * end, const char * expander) { sb one; sb many; sb_new (&one); if (!buffer_and_nest (start, end, &one, get_non_macro_line_sb)) { as_bad (_("%s without %s"), start, end); return; }
functions
void end_repeat (int extra) { cond_exit_macro (macro_nest); while (extra-- >= 0) buffer_limit = input_scrub_next_buffer (&input_line_pointer); }
functions
void assign_symbol (char *name, int mode) { symbolS *symbolP; if (name[0] == '.' && name[1] == '\0') { /* Turn '. = mumble' into a .org mumble. */ segT segment; expressionS exp; segment = get_known_segmented_expression (&exp); if (!need_pass_2) do_org (segment, &exp, 0); ...
functions
void s_set (int equiv) { char *name; /* Especial apologies for the random logic: this just grew, and could be parsed much more simply! Dean in haste. */ if ((name = read_symbol_name ()) == NULL) return; if (*input_line_pointer != ',') { as_bad (_("expected comma after \"%s\""), name);...
functions
void s_space (int mult) { expressionS exp; expressionS val; char *p = 0; char *stop = NULL; char stopc = 0; int bytes; #ifdef md_flush_pending_output md_flush_pending_output (); #endif #ifdef md_cons_align md_cons_align (1); #endif if (flag_mri) stop = mri_comment_field (&stopc); /* In m68k ...
functions
else if (mri_common_symbol != NULL) { valueT mri_val; mri_val = S_GET_VALUE (mri_common_symbol); if ((mri_val & 1) != 0) { S_SET_VALUE (mri_common_symbol, mri_val + 1); if (line_label != NULL) { expressionS *symexp; symexp = symbol_get_value_expression (line_label); know (sy...
functions
void s_float_space (int float_type) { offsetT count; int flen; char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT]; char *stop = NULL; char stopc = 0; #ifdef md_cons_align md_cons_align (1); #endif if (flag_mri) stop = mri_comment_field (&stopc); count = get_absolute_expression (); SKIP_WHITESPACE ()...
functions
void s_struct (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); abs_section_offset = get_absolute_expression (); #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) /* The ELF backend needs to know that we are changing sections, so that ...
functions
void s_text (int ignore ATTRIBUTE_UNUSED) { int temp; temp = get_absolute_expression (); subseg_set (text_section, (subsegT) temp); demand_empty_rest_of_line (); }
functions
void s_weakref (int ignore ATTRIBUTE_UNUSED) { char *name; symbolS *symbolP; symbolS *symbolP2; expressionS exp; if ((name = read_symbol_name ()) == NULL) return; symbolP = symbol_find_or_make (name); if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP)) { if (!S_IS_VOLATILE (symbolP)...
functions
void demand_empty_rest_of_line (void) { SKIP_WHITESPACE (); if (is_end_of_line[(unsigned char) *input_line_pointer]) input_line_pointer++; else { if (ISPRINT (*input_line_pointer)) as_bad (_("junk at end of line, first unrecognized character is `%c'"), *input_line_pointer); else as_bad (_...
functions
void ignore_rest_of_line (void) { while (input_line_pointer < buffer_limit && !is_end_of_line[(unsigned char) *input_line_pointer]) input_line_pointer++; input_line_pointer++; /* Return pointing just after end-of-line. */ know (is_end_of_line[(unsigned char) input_line_pointer[-1]]); }
functions
void set_zero_frag (symbolS *symbolP) { if (symbol_get_frag (symbolP)->fr_type != rs_dummy) symbol_set_frag (symbolP, &zero_address_frag); }
functions
void pseudo_set (symbolS *symbolP) { expressionS exp; segT seg; know (symbolP); /* NULL pointer is logic error. */ if (!S_IS_FORWARD_REF (symbolP)) (void) expression (&exp); else (void) deferred_expression (&exp); if (exp.X_op == O_illegal) as_bad (_("illegal expression")); else if (exp.X...
functions
void do_parse_cons_expression (expressionS *exp, int nbytes ATTRIBUTE_UNUSED) { (void) TC_PARSE_CONS_EXPRESSION (exp, nbytes); }
functions
void cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */ int rva) { int c; expressionS exp; char *stop = NULL; char stopc = 0; #ifdef md_flush_pending_output md_flush_pending_output (); #endif if (flag_mri) stop = mri_comment_field (&stopc); if (is_it_end_of_statement ()) { d...
functions
void cons (int size) { cons_worker (size, 0); }
functions
void s_rva (int size) { cons_worker (size, 1); }
functions
void s_reloc (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; char stopc = 0; expressionS exp; char *r_name; int c; struct reloc_list *reloc; reloc = (struct reloc_list *) xmalloc (sizeof (*reloc)); if (flag_mri) stop = mri_comment_field (&stopc); expression (&exp); switch (exp.X_op) { ...
functions
void emit_expr (expressionS *exp, unsigned int nbytes) { emit_expr_with_reloc (exp, nbytes, TC_PARSE_CONS_RETURN_NONE); }
functions
void emit_expr_with_reloc (expressionS *exp, unsigned int nbytes, TC_PARSE_CONS_RETURN_TYPE reloc) { operatorT op; char *p; valueT extra_digit = 0; /* Don't do anything if we are going to make another pass. */ if (need_pass_2) return; frag_grow (nbytes); dot_value = frag_now_fix ();...
functions
else if (op == O_big && exp->X_add_number <= 0) { as_bad (_("floating point number invalid")); exp->X_add_number = 0; op = O_constant; }
functions
else if (op == O_register) { as_warn (_("register value used as expression")); op = O_constant; }
functions
else if (op == O_big) { unsigned int size; LITTLENUM_TYPE *nums; size = exp->X_add_number * CHARS_PER_LITTLENUM; if (nbytes < size) { int i = nbytes / CHARS_PER_LITTLENUM; if (i != 0) { LITTLENUM_TYPE sign = 0; if ((generic_bignum[--i] & (1 << (LITTLENUM_NUMBE...
functions
void emit_expr_fix (expressionS *exp, unsigned int nbytes, fragS *frag, char *p, TC_PARSE_CONS_RETURN_TYPE r ATTRIBUTE_UNUSED) { int offset = 0; unsigned int size = nbytes; memset (p, 0, size); /* Generate a fixS to record the symbol value. */ #ifdef TC_CONS_FIX_NEW TC_CONS_FIX_NEW (frag, p - frag...
functions
else switch (size) { case 1: r = BFD_RELOC_8; break; case 2: r = BFD_RELOC_16; break; case 3: r = BFD_RELOC_24; break; case 4: r = BFD_RELOC_32; break; case 8: r = BFD_RELOC_64; break; default: as_bad (_("unsupported BFD relocation size %u"), size); return; ...
functions
void parse_mri_cons (expressionS *exp, unsigned int nbytes) { if (*input_line_pointer != '\'' && (input_line_pointer[1] != '\'' || (*input_line_pointer != 'A' && *input_line_pointer != 'E'))) TC_PARSE_CONS_EXPRESSION (exp, nbytes); else { unsigned int scan; unsigned int result = ...
functions
int hex_float (int float_type, char *bytes) { int length; int i; switch (float_type) { case 'f': case 'F': case 's': case 'S': length = 4; break; case 'd': case 'D': case 'r': case 'R': length = 8; break; case 'x': case 'X': length = 12;...
functions
void float_cons (/* Clobbers input_line-pointer, checks end-of-line. */ int float_type /* 'f':.ffloat ... 'F':.float ... */) { char *p; int length; /* Number of chars in an object. */ char *err; /* Error from scanning floating literal. */ char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT]; if (is_it_en...
functions
REPEAT_CONS_EXPRESSIONS if (*input_line_pointer == ':') { expressionS count_exp; ++input_line_pointer; expression (&count_exp); if (count_exp.X_op != O_constant || count_exp.X_add_number <= 0) as_warn (_("unresolvable or nonpositive repeat count; using 1")); else cou...
functions
endif while (--count >= 0) { p = frag_more (length); memcpy (p, temp, (unsigned int) length); }
functions
int sizeof_sleb128 (offsetT value) { int size = 0; unsigned byte; do { byte = (value & 0x7f); /* Sadly, we cannot rely on typical arithmetic right shift behaviour. Fortunately, we can structure things so that the extra work reduces to a noop on systems that do things "properly". */ val...
functions
int sizeof_uleb128 (valueT value) { int size = 0; do { value >>= 7; size += 1; }
functions
int sizeof_leb128 (valueT value, int sign) { if (sign) return sizeof_sleb128 ((offsetT) value); else return sizeof_uleb128 (value); }
functions
int output_sleb128 (char *p, offsetT value) { char *orig = p; int more; do { unsigned byte = (value & 0x7f); /* Sadly, we cannot rely on typical arithmetic right shift behaviour. Fortunately, we can structure things so that the extra work reduces to a noop on systems that do things "properly...
functions
int output_uleb128 (char *p, valueT value) { char *orig = p; do { unsigned byte = (value & 0x7f); value >>= 7; if (value != 0) /* More bytes to follow. */ byte |= 0x80; *p++ = byte; }
functions
int output_leb128 (char *p, valueT value, int sign) { if (sign) return output_sleb128 (p, (offsetT) value); else return output_uleb128 (p, value); }
functions
int output_big_sleb128 (char *p, LITTLENUM_TYPE *bignum, int size) { char *orig = p; valueT val = 0; int loaded = 0; unsigned byte; /* Strip leading sign extensions off the bignum. */ while (size > 1 && bignum[size - 1] == LITTLENUM_MASK && bignum[size - 2] > LITTLENUM_MASK / 2) size--; do ...
functions
int output_big_uleb128 (char *p, LITTLENUM_TYPE *bignum, int size) { char *orig = p; valueT val = 0; int loaded = 0; unsigned byte; /* Strip leading zeros off the bignum. */ /* XXX: Is this needed? */ while (size > 0 && bignum[size - 1] == 0) size--; do { if (loaded < 7 && size > 0) {...
functions
int output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, int size, int sign) { if (sign) return output_big_sleb128 (p, bignum, size); else return output_big_uleb128 (p, bignum, size); }
functions
void emit_leb128_expr (expressionS *exp, int sign) { operatorT op = exp->X_op; unsigned int nbytes; if (op == O_absent || op == O_illegal) { as_warn (_("zero assumed for missing expression")); exp->X_add_number = 0; op = O_constant; }
functions
else if (op == O_big && exp->X_add_number <= 0) { as_bad (_("floating point number invalid")); exp->X_add_number = 0; op = O_constant; }
functions
else if (op == O_register) { as_warn (_("register value used as expression")); op = O_constant; }
functions
endif if (op == O_constant) { /* If we've got a constant, emit the thing directly right now. */ valueT value = exp->X_add_number; int size; char *p; size = sizeof_leb128 (value, sign); p = frag_more (size); output_leb128 (p, value, sign); }
functions
else if (op == O_big) { /* O_big is a different sort of constant. */ int size; char *p; size = output_big_leb128 (NULL, generic_bignum, exp->X_add_number, sign); p = frag_more (size); output_big_leb128 (p, generic_bignum, exp->X_add_number, sign); }
functions
void s_leb128 (int sign) { expressionS exp; #ifdef md_flush_pending_output md_flush_pending_output (); #endif do { expression (&exp); emit_leb128_expr (&exp, sign); }
functions
void stringer_append_char (int c, int bitsize) { if (!target_big_endian) FRAG_APPEND_1_CHAR (c); switch (bitsize) { case 64: FRAG_APPEND_1_CHAR (0); FRAG_APPEND_1_CHAR (0); FRAG_APPEND_1_CHAR (0); FRAG_APPEND_1_CHAR (0); /* Fall through. */ case 32: FRAG_APPEND_...
functions
void stringer (int bits_appendzero) { const int bitsize = bits_appendzero & ~7; const int append_zero = bits_appendzero & 1; unsigned int c; #if !defined(NO_LISTING) && defined (OBJ_ELF) char *start; #endif #ifdef md_flush_pending_output md_flush_pending_output (); #endif #ifdef md_cons_align md_cons_alig...
functions
else if (dwarf_file_string) { c = input_line_pointer[-1]; input_line_pointer[-1] = '\0'; listing_source_file (start); input_line_pointer[-1] = c; }
functions
int next_char_of_string (void) { unsigned int c; c = *input_line_pointer++ & CHAR_MASK; switch (c) { case '\"': c = NOT_A_CHAR; break; case '\n': as_warn (_("unterminated string; newline inserted")); bump_line_counters (); break; #ifndef NO_STRING_ESCAPES case '\\'...
functions
segT get_segmented_expression (expressionS *expP) { segT retval; retval = expression (expP); if (expP->X_op == O_illegal || expP->X_op == O_absent || expP->X_op == O_big) { as_bad (_("expected address expression")); expP->X_op = O_constant; expP->X_add_number = 0; retval =...
functions
segT get_known_segmented_expression (expressionS *expP) { segT retval = get_segmented_expression (expP); if (retval == undefined_section) { /* There is no easy way to extract the undefined symbol from the expression. */ if (expP->X_add_symbol != NULL && S_GET_SEGMENT (expP->X_add_symbol) != e...
functions
int is_it_end_of_statement (void) { SKIP_WHITESPACE (); return (is_end_of_line[(unsigned char) *input_line_pointer]); }
functions
void equals (char *sym_name, int reassign) { char *stop = NULL; char stopc = 0; input_line_pointer++; if (*input_line_pointer == '=') input_line_pointer++; if (reassign < 0 && *input_line_pointer == '=') input_line_pointer++; while (*input_line_pointer == ' ' || *input_line_pointer == '\t') in...
functions
void s_incbin (int x ATTRIBUTE_UNUSED) { FILE * binfile; char * path; char * filename; char * binfrag; long skip = 0; long count = 0; long bytes; int len; #ifdef md_flush_pending_output md_flush_pending_output (); #endif #ifdef md_cons_align md_cons_align (1); #endif SKIP_WHITESPACE ()...
functions
void s_include (int arg ATTRIBUTE_UNUSED) { char *filename; int i; FILE *try_file; char *path; if (!flag_m68k_mri) { filename = demand_copy_string (&i); if (filename == NULL) { /* demand_copy_string has already printed an error and called ignore_rest_of_line. */ return; }
functions
void add_include_dir (char *path) { int i; if (include_dir_count == 0) { include_dirs = (char **) xmalloc (2 * sizeof (*include_dirs)); include_dirs[0] = "."; /* Current dir. */ include_dir_count = 2; }
functions
void generate_file_debug (void) { if (debug_type == DEBUG_STABS) stabs_generate_asm_file (); }
functions
void generate_lineno_debug (void) { switch (debug_type) { case DEBUG_UNSPECIFIED: case DEBUG_NONE: case DEBUG_DWARF: break; case DEBUG_STABS: stabs_generate_asm_lineno (); break; case DEBUG_ECOFF: ecoff_generate_asm_lineno (); break; case DEBUG_DWARF2: /...
functions
void s_func (int end_p) { do_s_func (end_p, NULL); }
functions
void do_s_func (int end_p, const char *default_prefix) { /* 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 ...
functions
void s_bundle_align_mode (int arg ATTRIBUTE_UNUSED) { unsigned int align = get_absolute_expression (); SKIP_WHITESPACE (); demand_empty_rest_of_line (); if (align > (unsigned int) TC_ALIGN_LIMIT) as_fatal (_(".bundle_align_mode alignment too large (maximum %u)"), (unsigned int) TC_ALIGN_LIMIT); i...
functions
void s_bundle_lock (int arg ATTRIBUTE_UNUSED) { demand_empty_rest_of_line (); if (bundle_align_p2 == 0) { as_bad (_(".bundle_lock is meaningless without .bundle_align_mode")); return; }
functions
void s_bundle_unlock (int arg ATTRIBUTE_UNUSED) { unsigned int size; demand_empty_rest_of_line (); if (bundle_lock_frag == NULL) { as_bad (_(".bundle_unlock without preceding .bundle_lock")); return; }
functions
void s_ignore (int arg ATTRIBUTE_UNUSED) { ignore_rest_of_line (); }
functions
void read_print_statistics (FILE *file) { hash_print_statistics (file, "pseudo-op table", po_hash); }
functions
void input_scrub_insert_line (const char *line) { sb newline; size_t len = strlen (line); sb_build (&newline, len); sb_add_buffer (&newline, line, len); input_scrub_include_sb (&newline, input_line_pointer, 0); sb_kill (&newline); buffer_limit = input_scrub_next_buffer (&input_line_pointer); }
functions
void input_scrub_insert_file (char *path) { input_scrub_include_file (path, input_line_pointer); buffer_limit = input_scrub_next_buffer (&input_line_pointer); }
includes
#include <linux/kernel.h>
includes
#include <linux/module.h>
includes
#include <linux/fb.h>
includes
#include <linux/console.h>
includes
#include <linux/pci.h>
includes
#include <linux/pci_ids.h>
includes
#include <linux/delay.h>
includes
#include <linux/string.h>