diff options
author | Jeff Law <law@redhat.com> | 1996-11-18 23:05:06 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-11-18 23:05:06 +0000 |
commit | 43d695a1e9bf36893b10483e2fbb0e400b52859d (patch) | |
tree | 6f36cbd51e5e87962568dacbd2f8b1b23b99d0c4 | |
parent | d39e0e6d61b2c9730101c683821668b48da9e4a9 (diff) | |
download | fsf-binutils-gdb-43d695a1e9bf36893b10483e2fbb0e400b52859d.zip fsf-binutils-gdb-43d695a1e9bf36893b10483e2fbb0e400b52859d.tar.gz fsf-binutils-gdb-43d695a1e9bf36893b10483e2fbb0e400b52859d.tar.bz2 |
* config/tc-mn10300.c (mn10300_insert_operand): Provide prototype
via PARAMS.
(check_operand): Likewise.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mn10300.c | 25 |
2 files changed, 24 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index bc5011b..fe76333 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 18 15:26:55 1996 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (mn10300_insert_operand): Provide prototype + via PARAMS. + (check_operand): Likewise. + start-sanitize-d10v Mon Nov 18 15:22:28 1996 Michael Meissner <meissner@tiktok.cygnus.com> diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index fd3fd9b..02f78b1 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -54,9 +54,13 @@ const char FLT_CHARS[] = "dD"; /* local functions */ -static unsigned long mn10300 - PARAMS ((unsigned long insn, const struct mn10300_operand *operand, - offsetT val, char *file, unsigned int line)); +static void mn10300_insert_operand PARAMS ((unsigned long *, unsigned long *, + const struct mn10300_operand *, + offsetT, char *, unsigned, + unsigned)); +static unsigned long check_operand PARAMS ((unsigned long, + const struct mn10300_operand *, + offsetT)); static int reg_name_search PARAMS ((const struct reg_name *, int, const char *)); static boolean register_name PARAMS ((expressionS *expressionP)); static boolean system_register_name PARAMS ((expressionS *expressionP)); @@ -858,7 +862,10 @@ mn10300_insert_operand (insnp, extensionp, operand, val, file, line, shift) unsigned int line; unsigned int shift; { - if (operand->bits != 32) + /* No need to check 32bit operands for a bit. Note that + MN10300_OPERAND_SPLIT is an implicit 32bit operand. */ + if (operand->bits != 32 + && (operand->flags & MN10300_OPERAND_SPLIT) == 0) { long min, max; offsetT test; @@ -893,8 +900,9 @@ mn10300_insert_operand (insnp, extensionp, operand, val, file, line, shift) if ((operand->flags & MN10300_OPERAND_SPLIT) != 0) { - *insnp |= (val >> 16) & 0xffff; - *extensionp |= (val & 0xffff) << operand->shift; + *insnp |= (val >> 32 - operand->bits) & ((1 << operand->bits) - 1); + *extensionp |= ((val & ((1 << (32 - operand->bits)) - 1)) + << operand->shift); } else if ((operand->flags & MN10300_OPERAND_EXTENDED) == 0) { @@ -922,7 +930,10 @@ check_operand (insn, operand, val) const struct mn10300_operand *operand; offsetT val; { - if (operand->bits != 32) + /* No need to check 32bit operands for a bit. Note that + MN10300_OPERAND_SPLIT is an implicit 32bit operand. */ + if (operand->bits != 32 + && (operand->flags & MN10300_OPERAND_SPLIT) == 0) { long min, max; offsetT test; |