aboutsummaryrefslogtreecommitdiff
path: root/opcodes/tic80-dis.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1997-01-13 23:05:49 +0000
committerFred Fish <fnf@specifix.com>1997-01-13 23:05:49 +0000
commit003df61759ea3d819edb67056bf8acc0060b8e56 (patch)
tree7d1636e1623fce626d9742aa2d8019f013c80abd /opcodes/tic80-dis.c
parented6e7b0897321553bebdea07cbcd1976ab668cfb (diff)
downloadgdb-003df61759ea3d819edb67056bf8acc0060b8e56.zip
gdb-003df61759ea3d819edb67056bf8acc0060b8e56.tar.gz
gdb-003df61759ea3d819edb67056bf8acc0060b8e56.tar.bz2
* tic80-dis.c (print_insn_tic80): Print floating point operands
as floats. * tic80-opc.c (SPFI): Add single precision floating point immediate operand type. (ROTATE): Add rotate operand type for shifts. (ENDMASK): Add for shifts. (n): Macro for the 'n' bit. (i): Macro for the 'i' bit. (PD): Macro for the 'PD' field. (P2): Macro for the 'P2' field. (P1): Macro for the 'P1' field. (tic80_operands): Add entries for "exts", "extu", "fadd", "fcmp", and "fdiv".
Diffstat (limited to 'opcodes/tic80-dis.c')
-rw-r--r--opcodes/tic80-dis.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/opcodes/tic80-dis.c b/opcodes/tic80-dis.c
index fed68ae..02a4110 100644
--- a/opcodes/tic80-dis.c
+++ b/opcodes/tic80-dis.c
@@ -280,6 +280,14 @@ print_insn_tic80 (memaddr, info)
(*info -> fprintf_func) (info -> stream, "%#lx", value);
}
}
+ else if ((operand -> flags & TIC80_OPERAND_FLOAT) != 0)
+ {
+ /* FIXME: depends upon sizeof (long) == sizeof (float) */
+ union { float f; long l; } fval;
+
+ fval.l = value;
+ (*info -> fprintf_func) (info -> stream, "%g", fval.f);
+ }
else
{
if ((value > 999 || value < -999)