From 778c521b857dee73d0864173a20c4e6708844134 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 10 Oct 1996 20:33:47 +0000 Subject: [PATCH] * config/tc-mn10300.c (md_assemble): Use FMT_* macros for formats rather than hard-coded constants. Minor cleanup. --- gas/ChangeLog | 3 +++ gas/config/tc-mn10300.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index c7b4363ee11..8c3118bd5ec 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,8 @@ Thu Oct 10 12:05:45 1996 Jeffrey A Law (law@cygnus.com) + * config/tc-mn10300.c (md_assemble): Use FMT_* macros for + formats rather than hard-coded constants. + * config/tc-mn10300.c (md_assemble): Format D5 instructions are 7 bytes long. Write out instructions in big-endian format. diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index f1de133e18f..601a860fd9b 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -664,26 +664,26 @@ keep_going: input_line_pointer = str; - /* XXX */ - if (opcode->format == 1) + /* Determine the size of the instruction. */ + if (opcode->format == FMT_S0) size = 1; - if (opcode->format == 2 || opcode->format == 6) + if (opcode->format == FMT_S1 || opcode->format == FMT_D0) size = 2; - if (opcode->format == 3 || opcode->format == 7) + if (opcode->format == FMT_S2 || opcode->format == FMT_D1) size = 3; - if (opcode->format == 4) + if (opcode->format == FMT_S4) size = 5; - if (opcode->format == 5 || opcode->format == 10) + if (opcode->format == FMT_S6 || opcode->format == FMT_D5) size = 7; - if (opcode->format == 8) + if (opcode->format == FMT_D2) size = 4; - if (opcode->format == 9) + if (opcode->format == FMT_D4) size = 6; /* Write out the instruction. */ -- 2.30.2