From 43d695a1e9bf36893b10483e2fbb0e400b52859d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 18 Nov 1996 23:05:06 +0000 Subject: [PATCH] * config/tc-mn10300.c (mn10300_insert_operand): Provide prototype via PARAMS. (check_operand): Likewise. --- gas/ChangeLog | 6 ++++++ gas/config/tc-mn10300.c | 25 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index bc5011b93ef..fe76333fe41 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 diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index fd3fd9b285e..02f78b19a9c 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; -- 2.30.2