diff options
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r-- | gas/config/tc-alpha.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index a90ceb4..f9ca351 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -589,7 +589,7 @@ get_alpha_reloc_tag (long sequence) sprintf (buffer, "!%ld", sequence); - info = (struct alpha_reloc_tag *) str_hash_find (alpha_literal_hash, buffer); + info = str_hash_find (alpha_literal_hash, buffer); if (! info) { size_t len = strlen (buffer); @@ -1170,8 +1170,7 @@ assemble_tokens_to_insn (const char *opname, const struct alpha_opcode *opcode; /* Search opcodes. */ - opcode = (const struct alpha_opcode *) str_hash_find (alpha_opcode_hash, - opname); + opcode = str_hash_find (alpha_opcode_hash, opname); if (opcode) { int cpumatch; @@ -3318,8 +3317,7 @@ assemble_tokens (const char *opname, #endif if (local_macros_on) { - macro = (const struct alpha_macro *) str_hash_find (alpha_macro_hash, - opname); + macro = str_hash_find (alpha_macro_hash, opname); if (macro) { found_something = 1; @@ -3333,8 +3331,7 @@ assemble_tokens (const char *opname, } /* Search opcodes. */ - opcode = (const struct alpha_opcode *) str_hash_find (alpha_opcode_hash, - opname); + opcode = str_hash_find (alpha_opcode_hash, opname); if (opcode) { found_something = 1; @@ -3789,7 +3786,7 @@ s_alpha_end (int dummy ATTRIBUTE_UNUSED) if (sym && cur_frame_data) { OBJ_SYMFIELD_TYPE *obj = symbol_get_obj (sym); - expressionS *exp = XNEW (expressionS); + expressionS *exp = notes_alloc (sizeof (*exp)); obj->size = exp; exp->X_op = O_subtract; @@ -5368,7 +5365,7 @@ alpha_handle_align (fragS *fragp) 0x00, 0x00, 0xfe, 0x2f }; - int bytes, fix; + size_t bytes, fix; char *p; if (fragp->fr_type != rs_align_code) @@ -5376,16 +5373,14 @@ alpha_handle_align (fragS *fragp) bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; p = fragp->fr_literal + fragp->fr_fix; - fix = 0; - if (bytes & 3) + fix = bytes & 3; + if (fix) { - fix = bytes & 3; memset (p, 0, fix); p += fix; bytes -= fix; } - if (bytes & 4) { memcpy (p, unop, 4); @@ -5393,11 +5388,13 @@ alpha_handle_align (fragS *fragp) bytes -= 4; fix += 4; } - - memcpy (p, nopunop, 8); - fragp->fr_fix += fix; - fragp->fr_var = 8; + + if (bytes) + { + memcpy (p, nopunop, 8); + fragp->fr_var = 8; + } } /* Public interface functions. */ |