aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-z8k.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-z8k.c')
-rw-r--r--gas/config/tc-z8k.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index 4cfb302..83a732f 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -164,7 +164,7 @@ md_begin (void)
opcode_entry_type *fake_opcode;
fake_opcode = XNEW (opcode_entry_type);
fake_opcode->name = md_pseudo_table[idx].poc_name;
- fake_opcode->func = (void *) (md_pseudo_table + idx);
+ fake_opcode->p = md_pseudo_table + idx;
fake_opcode->opcode = 250;
str_hash_insert (opcode_hash_control, fake_opcode->name, fake_opcode, 0);
}
@@ -1032,7 +1032,6 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
{
unsigned char *output_ptr = buffer;
int c;
- int nibble;
unsigned int *class_ptr;
frag_wane (frag_now);
@@ -1044,7 +1043,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE
memset (buffer, 0, sizeof (buffer));
class_ptr = this_try->byte_info;
- for (nibble = 0; (c = *class_ptr++); nibble++)
+ while ((c = *class_ptr++) != 0)
{
switch (c & CLASS_MASK)
@@ -1236,7 +1235,7 @@ md_assemble (char *str)
*op_end = 0; /* Zero-terminate op code string for str_hash_find() call. */
- opcode = (opcode_entry_type *) str_hash_find (opcode_hash_control, op_start);
+ opcode = str_hash_find (opcode_hash_control, op_start);
if (opcode == NULL)
{
@@ -1248,7 +1247,7 @@ md_assemble (char *str)
if (opcode->opcode == 250)
{
- pseudo_typeS *p;
+ const pseudo_typeS *p;
char oc;
char *old = input_line_pointer;
@@ -1260,7 +1259,7 @@ md_assemble (char *str)
*old = '\n';
while (is_whitespace (*input_line_pointer))
input_line_pointer++;
- p = (pseudo_typeS *) (opcode->func);
+ p = opcode->p;
(p->poc_handler) (p->poc_val);
input_line_pointer = old;
@@ -1407,7 +1406,7 @@ md_section_align (segT seg, valueT size)
void
md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
{
- long val = * (long *) valP;
+ offsetT val = *valP;
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
switch (fixP->fx_r_type)