aboutsummaryrefslogtreecommitdiff
path: root/opcodes/tic30-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-12-02 13:13:37 +0000
committerAlan Modra <amodra@gmail.com>2002-12-02 13:13:37 +0000
commit6a51a8a8d34f57a9b88de4961c67d0a4cb7026e3 (patch)
tree2188ef42e5ae09fc9a9238f35d54564ef9779ba5 /opcodes/tic30-dis.c
parent4c83186b7629c3e0645034df71a9ae4ac77e1e8a (diff)
downloadgdb-6a51a8a8d34f57a9b88de4961c67d0a4cb7026e3.zip
gdb-6a51a8a8d34f57a9b88de4961c67d0a4cb7026e3.tar.gz
gdb-6a51a8a8d34f57a9b88de4961c67d0a4cb7026e3.tar.bz2
* arm-dis.c (print_insn_arm): Constify "insn". Formatting.
(print_insn_thumb): Likewise. * h8500-dis.c (print_insn_h8500): Constify "opcode". * mcore-dis.c (print_insn_mcore): Constify "op". Formatting. * ns32k-dis.c (print_insn_arg <case 'F'>): Use a union to avoid type-punned pointer warnings. <case 'L'>: Likewise. Fix error message too. * pdp11-dis.c (print_reg): Warning fix. * sh-dis.c (print_movxy): Constify "op" param. (print_insn_ddt): Constify sh_opcode_info vars. (print_insn_ppi): Likewise. (print_insn_sh): Likewise. * tic30-dis.c (cnvt_tmsfloat_ieee): Use a union to avoid type-punned pointer warnings. * w65-dis.c (print_insn_w65): Constify "op".
Diffstat (limited to 'opcodes/tic30-dis.c')
-rw-r--r--opcodes/tic30-dis.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/opcodes/tic30-dis.c b/opcodes/tic30-dis.c
index 67956f7..f410d74 100644
--- a/opcodes/tic30-dis.c
+++ b/opcodes/tic30-dis.c
@@ -1,5 +1,5 @@
/* Disassembly routines for TMS320C30 architecture
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This program is free software; you can redistribute it and/or modify
@@ -663,6 +663,10 @@ cnvt_tmsfloat_ieee (tmsfloat, size, ieeefloat)
float *ieeefloat;
{
unsigned long exp, sign, mant;
+ union {
+ unsigned long l;
+ float f;
+ } val;
if (size == 2)
{
@@ -705,6 +709,7 @@ cnvt_tmsfloat_ieee (tmsfloat, size, ieeefloat)
if (tmsfloat == 0x80000000)
sign = mant = exp = 0;
tmsfloat = sign | exp | mant;
- *ieeefloat = *((float *) &tmsfloat);
+ val.l = tmsfloat;
+ *ieeefloat = val.f;
return 1;
}