Implement fcnv in objdump
PATCH 1/1 Implement fcnv in objdump
2003-02-24 Matthew Wilcox <[email protected]>
* hppa-dis.c (print_insn_hppa): Implement fcnv instruction modifiers.
Index: opcodes/hppa-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/hppa-dis.c,v
retrieving revision 1.41
hppa-dis.c +28 -4
@@ -123,6 +123,8 @@ static const char *const short_bytes_com"" ,",b,m" ,",e" ,",e,m" };static const char *const float_format_names[] = {",sgl" ,",dbl" ,"" ,",quad" }; +static const char *const fcnv_fixed_names[] = {",w" ,",dw" ,"" ,",qw" }; +static const char *const fcnv_ufixed_names[] = {",uw" ,",udw" ,"" ,",uqw" };static const char *const float_comp_names[] = { ",false?", ",false", ",?", ",!<=>", ",=", ",=t", ",?=", ",!<>",
@@ -397,7 +399,7 @@ print_insn_hppa (memaddr, info)#endif (*info->fprintf_func) (info->stream,"%s" , opcode->name); -if (!strchr ("cfCY?-+nHNZFIuv" , opcode->args[0 ])) +if (!strchr ("cfCY?-+nHNZFIuv{" , opcode->args[0 ])) (*info->fprintf_func) (info->stream," " );for (s = opcode->args; *s !='\0' ; ++s) {
@@ -1131,11 +1136,33 @@ print_insn_hppa (memaddr, info)break ; } -/* ?!? FIXME */ case '_' : +break ;/* Dealt with by '{' */ +case '{' : -fputs_filtered ("Disassembler botch.\n" , info); -break ; + { +int sub =GET_FIELD (insn,14 ,16 ); +int df =GET_FIELD (insn,17 ,18 ); +int sf =GET_FIELD (insn,19 ,20 ); +const char *const * source = float_format_names; +const char *const * dest = float_format_names; +char *t ="" ; +if (sub ==4 ) + { +fputs_filtered (",UND " , info); +break ; + } +if ((sub &3 ) ==3 ) + t =",t" ; +if ((sub &3 ) ==1 ) + source = (sub &4 ) ? fcnv_ufixed_names : fcnv_fixed_names; +if (sub &2 ) + dest = (sub &4 ) ? fcnv_ufixed_names : fcnv_fixed_names; + + (*info->fprintf_func) (info->stream,"%s%s%s " , + t, source[sf], dest[df]); +break ; + }case 'm' : {
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Alan Modra
AppliedQuoted 1 line · Matthew Wilcox
*
hppa-dis.c(print_insn_hppa): Implement fcnv instruction modifiers.
Applied.
Signature · 2 lines
Alan Modra IBM OzLabs - Linux Technology Centre
Alan Modra
AppliedQuoted 1 line · Matthew Wilcox
*
hppa-dis.c(print_insn_hppa): Implement fcnv instruction modifiers.
Applied.
Signature · 2 lines
Alan Modra IBM OzLabs - Linux Technology Centre