From 1e12595d6460f1f44f8f0f79171029a91b66c696 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Thu, 27 Feb 1997 04:05:18 +0000 Subject: [PATCH] * config/tc-tic80.c (FLT_CHARS): Change from "dD" to "fF". (find_opcode): Match operands that can be floats. (build_insn): Handle O_big (float) expressions and build correct opcode. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-tic80.c | 27 +++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 02f21d47f43..bb829504d10 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +start-sanitize-tic80 +Wed Feb 26 20:47:12 1997 Fred Fish + + * config/tc-tic80.c (FLT_CHARS): Change from "dD" to "fF". + (find_opcode): Match operands that can be floats. + (build_insn): Handle O_big (float) expressions and build + correct opcode. + +end-sanitize-tic80 Wed Feb 26 18:19:00 1997 Stan Shebs * configure.in (mips*-*-lnews*): New target, also make empty diff --git a/gas/config/tc-tic80.c b/gas/config/tc-tic80.c index 44c408aff92..6f18d44571c 100644 --- a/gas/config/tc-tic80.c +++ b/gas/config/tc-tic80.c @@ -45,8 +45,8 @@ const char line_separator_chars[] = ""; const char EXP_CHARS[] = "eE"; /* Characters which mean that a number is a floating point constant, - as in 0d1.0. */ -const char FLT_CHARS[] = "dD"; + as in 0f1.0. */ +const char FLT_CHARS[] = "fF"; /* This table describes all the machine specific pseudo-ops the assembler has to support. The fields are: @@ -418,9 +418,14 @@ find_opcode (opcode, myops) match = 0; } break; + case O_big: + if ((num > 0) || !(flags & TIC80_OPERAND_FLOAT)) + { + match = 0; + } + break; case O_illegal: case O_symbol_rva: - case O_big: case O_uminus: case O_bit_not: case O_logical_not: @@ -664,9 +669,23 @@ build_insn (opcode, opers) internal_error_a ("unhandled operand modifier", opers[expi].X_add_number); } break; + case O_big: + extended++; + { + union { + unsigned long l; + LITTLENUM_TYPE words[10]; + } u; + gen_to_words (u.words, 2, 8L); /* FIXME: magic numbers */ + /* FIXME: More magic, swap the littlenums */ + u.words[2] = u.words[0]; + u.words[0] = u.words [1]; + u.words[1] = u.words [2]; + insn[1] = u.l; + } + break; case O_illegal: case O_symbol_rva: - case O_big: case O_uminus: case O_bit_not: case O_logical_not: -- 2.30.2