aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m32r-ibld.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1999-08-29 21:16:25 +0000
committerDoug Evans <dje@google.com>1999-08-29 21:16:25 +0000
commiteb1b03df1a293f7aebb67e1deeba4b0bb21c3f9a (patch)
tree9f7297c1dd108f4cb2ab54eb6c4619940b01529a /opcodes/m32r-ibld.c
parent1174497c8ae1bf9293addcb216c48dbdbf487e4f (diff)
downloadgdb-eb1b03df1a293f7aebb67e1deeba4b0bb21c3f9a.zip
gdb-eb1b03df1a293f7aebb67e1deeba4b0bb21c3f9a.tar.gz
gdb-eb1b03df1a293f7aebb67e1deeba4b0bb21c3f9a.tar.bz2
* fr30-asm.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
* m32r-asm.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild. * m32r-opinst.c: Rebuild.
Diffstat (limited to 'opcodes/m32r-ibld.c')
-rw-r--r--opcodes/m32r-ibld.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/opcodes/m32r-ibld.c b/opcodes/m32r-ibld.c
index fa15d7e..5b78547 100644
--- a/opcodes/m32r-ibld.c
+++ b/opcodes/m32r-ibld.c
@@ -579,7 +579,7 @@ m32r_cgen_insert_operand (cd, opindex, fields, buffer, pc)
CGEN_INSN_BYTES_PTR buffer;
bfd_vma pc;
{
- const char * errmsg;
+ const char * errmsg = NULL;
unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
switch (opindex)
@@ -612,7 +612,6 @@ m32r_cgen_insert_operand (cd, opindex, fields, buffer, pc)
errmsg = insert_normal (cd, fields->f_r1, 0, 0, 4, 4, 32, total_length, buffer);
break;
case M32R_OPERAND_HASH :
- errmsg = insert_normal (cd, fields->f_nil, 0, 0, 0, 0, 0, total_length, buffer);
break;
case M32R_OPERAND_HI16 :
errmsg = insert_normal (cd, fields->f_hi16, 0|(1<<CGEN_IFLD_SIGN_OPT), 0, 16, 16, 32, total_length, buffer);
@@ -665,6 +664,8 @@ m32r_cgen_insert_operand (cd, opindex, fields, buffer, pc)
}
/* Main entry point for operand extraction.
+ The result is <= 0 for error, >0 for success.
+ ??? Actual values aren't well defined right now.
This function is basically just a big switch statement. Earlier versions
used tables to look up the function to use, but
@@ -687,7 +688,8 @@ m32r_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
CGEN_FIELDS * fields;
bfd_vma pc;
{
- int length;
+ /* Assume success (for those operands that are nops). */
+ int length = 1;
unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
switch (opindex)
@@ -723,7 +725,6 @@ m32r_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_r1);
break;
case M32R_OPERAND_HASH :
- length = extract_normal (cd, ex_info, insn_value, 0, 0, 0, 0, 0, total_length, pc, & fields->f_nil);
break;
case M32R_OPERAND_HI16 :
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGN_OPT), 0, 16, 16, 32, total_length, pc, & fields->f_hi16);
@@ -816,7 +817,7 @@ m32r_cgen_get_int_operand (cd, opindex, fields)
value = fields->f_r1;
break;
case M32R_OPERAND_HASH :
- value = fields->f_nil;
+ value = 0;
break;
case M32R_OPERAND_HI16 :
value = fields->f_hi16;
@@ -894,7 +895,7 @@ m32r_cgen_get_vma_operand (cd, opindex, fields)
value = fields->f_r1;
break;
case M32R_OPERAND_HASH :
- value = fields->f_nil;
+ value = 0;
break;
case M32R_OPERAND_HI16 :
value = fields->f_hi16;
@@ -976,7 +977,6 @@ m32r_cgen_set_int_operand (cd, opindex, fields, value)
fields->f_r1 = value;
break;
case M32R_OPERAND_HASH :
- fields->f_nil = value;
break;
case M32R_OPERAND_HI16 :
fields->f_hi16 = value;
@@ -1051,7 +1051,6 @@ m32r_cgen_set_vma_operand (cd, opindex, fields, value)
fields->f_r1 = value;
break;
case M32R_OPERAND_HASH :
- fields->f_nil = value;
break;
case M32R_OPERAND_HI16 :
fields->f_hi16 = value;