diff options
author | Nick Clifton <nickc@redhat.com> | 2006-09-16 18:12:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2006-09-16 18:12:17 +0000 |
commit | 0112cd268b205d8176b8b4d00988a334822956cf (patch) | |
tree | 67d11340ff93c7dbc29c8917bc03d9d24555f43d /opcodes/cris-dis.c | |
parent | 4fa3602bd53183badf1d259128a5f951f32db8cb (diff) | |
download | gdb-0112cd268b205d8176b8b4d00988a334822956cf.zip gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.gz gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.bz2 |
* bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its
argument and emits the string followed by a comma and then the length of
the string.
(CONST_STRNEQ): New macro. Checks to see if a variable string has a constant
string as its initial characters.
(CONST_STRNCPY): New macro. Copies a constant string to the start of a
variable string.
* bfd-in2.h: Regenerate.
* <remainign files>: Make use of the new macros.
Diffstat (limited to 'opcodes/cris-dis.c')
-rw-r--r-- | opcodes/cris-dis.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/opcodes/cris-dis.c b/opcodes/cris-dis.c index f6c63cb..137bed7 100644 --- a/opcodes/cris-dis.c +++ b/opcodes/cris-dis.c @@ -1,5 +1,5 @@ /* Disassembler code for CRIS. - Copyright 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Axis Communications AB, Lund, Sweden. Written by Hans-Peter Nilsson. @@ -783,7 +783,7 @@ print_with_operands (const struct cris_opcode *opcodep, better way). */ if (opcodep->name[0] == 'j') { - if (strncmp (opcodep->name, "jsr", 3) == 0) + if (CONST_STRNEQ (opcodep->name, "jsr")) /* It's "jsr" or "jsrc". */ info->insn_type = dis_jsr; else @@ -1360,16 +1360,16 @@ print_with_operands (const struct cris_opcode *opcodep, itself or in a "move.d const,rN, sub.d rN,rM"-like sequence. */ if (TRACE_CASE && case_offset_counter == 0) { - if (strncmp (opcodep->name, "sub", 3) == 0) + if (CONST_STRNEQ (opcodep->name, "sub")) case_offset = last_immediate; /* It could also be an "add", if there are negative case-values. */ - else if (strncmp (opcodep->name, "add", 3) == 0) + else if (CONST_STRNEQ (opcodep->name, "add")) /* The first case is the negated operand to the add. */ case_offset = -last_immediate; /* A bound insn will tell us the number of cases. */ - else if (strncmp (opcodep->name, "bound", 5) == 0) + else if (CONST_STRNEQ (opcodep->name, "bound")) no_of_case_offsets = last_immediate + 1; /* A jump or jsr or branch breaks the chain of insns for a |