/* Instruction printing code for Score
- Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
Contributed by:
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
#include "sysdep.h"
#include "dis-asm.h"
#define DEFINE_TABLE
-/*****************************************************************************/
#include "opintl.h"
#include "bfd.h"
#include "elf/internal.h"
#include "elf/score.h"
-/*****************************************************************************/
+#ifdef BFD64
/* s3_s7: opcodes and export prototypes. */
extern int
s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
{0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
{0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
};
-/*****************************************************************************/
+\f
#ifndef streq
#define streq(a,b) (strcmp ((a), (b)) == 0)
for (insn = score_opcodes; insn->assembler; insn++)
{
- /* using insn->mask &0xff00000000 to distinguish 48/32 bit */
+ /* Using insn->mask &0xff00000000 to distinguish 48/32 bit. */
if (((insn->mask & 0xff0000000000LL)!=0) && (given & insn->mask) == insn->value)
{
info->bytes_per_chunk = 2;
abort ();
}
break;
-
- default:
- abort ();
}
+ default:
+ abort ();
}
}
else
func (stream, _("<illegal instruction>"));
return 6;
#endif
-
+
abort ();
}
{
struct score_opcode *insn;
void *stream = info->stream;
- int rb_equal_zero=1;
+ int rb_equal_zero=1;
fprintf_ftype func = info->fprintf_func;
for (insn = score_opcodes; insn->assembler; insn++)
abort ();
}
break;
-
- default:
- abort ();
}
+ default:
+ abort ();
}
}
else
func (stream, _("<illegal instruction>"));
return 2;
#endif
+
/* No match. */
abort ();
}
{
unsigned char b[6];
bfd_vma given,given_h , given_l, given_16, given_32, given_48;
-
bfd_vma ridparity;
int status;
void *stream = info->stream;
fprintf_ftype func = info->fprintf_func;
+
info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
info->bytes_per_chunk = 2;
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 4, info);
/* Set given_16. */
given_16 = given;
- /* judge if now is insn_16_p */
+ /* Judge if now is insn_16_p. */
if ((given & 0x8000)==0)
return print_insn_score16 (pc, info, given);
/* Set given_32. */
given_32 = given;
- /* judge if now is insn_32 */
+ /* Judge if now is insn_32. */
if ((given &0x80008000)==0x80000000)
{
/* Get rid of parity. */
}
}
- /* the insn is 48 bit */
+ /* The insn is 48 bit. */
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 6, info);
if (status != 0)
{
}
/* Check 0x800080008000, 0x80008000, 0x8000. */
-
if ((given_48 & 0x800080008000LL) != 0x800080000000LL)
{
#if (SCORE_SIMULATOR_ACTIVE)
else
return s7_print_insn (pc, info, TRUE);
}
+#else /* not BFD64 */
+int
+print_insn_big_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ struct disassemble_info * info ATTRIBUTE_UNUSED)
+{
+ abort ();
+}
+
+int
+print_insn_little_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ struct disassemble_info * info ATTRIBUTE_UNUSED)
+{
+ abort ();
+}
+#endif