s/BIG_ENDIAN/BFD_ENDIAN_BIG/

This commit is contained in:
Andrew Cagney 2002-01-05 04:30:46 +00:00
parent ca4976a694
commit d7449b42d3
48 changed files with 148 additions and 128 deletions

View File

@ -1,3 +1,22 @@
2002-01-04 Andrew Cagney <ac131313@redhat.com>
* defs.h (BIG_ENDIAN): Delete macro definition.
* a29k-tdep.c, arch-utils.c, arm-tdep.c, ax-gdb.c, ch-exp.c,
coffread.c, cris-tdep.c, d10v-tdep.c, d30v-tdep.c, defs.h,
findvar.c, infcmd.c, mem-break.c, mips-tdep.c, mn10300-tdep.c,
printcmd.c, remote-os9k.c, remote-rdi.c, remote-rdp.c,
remote-sim.c, remote.c, rs6000-tdep.c, sh-tdep.c, sparcl-tdep.c,
stabsread.c, valops.c, valprint.c, config/a29k/tm-a29k.h,
config/a29k/tm-vx29k.h, config/arm/tm-arm.h,
config/d30v/tm-d30v.h, config/fr30/tm-fr30.h,
config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
config/m32r/tm-m32r.h, config/m68k/tm-m68k.h,
config/m88k/tm-m88k.h, config/mips/tm-mips.h, config/pa/tm-hppa.h,
config/sparc/tm-sparc.h, config/z8k/tm-z8k.h, mi/mi-cmd-disas.c,
mi/mi-main.c: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
* gdbarch.sh: Replace BIG_ENDIAN with BFD_ENDIAN_BIG.
* gdbarch.c: Re-generate.
2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* thread-db.c (thread_db_new_objfile): Do not enable thread_db

View File

@ -914,7 +914,7 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
int
gdb_print_insn_a29k (bfd_vma memaddr, disassemble_info *info)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return print_insn_big_a29k (memaddr, info);
else
return print_insn_little_a29k (memaddr, info);

View File

@ -62,7 +62,7 @@ legacy_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
breakpoint. On some machines, breakpoints are handled by the
target environment and we don't have to worry about them here. */
#ifdef BIG_BREAKPOINT
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
static unsigned char big_break_insn[] = BIG_BREAKPOINT;
*lenptr = sizeof (big_break_insn);
@ -70,7 +70,7 @@ legacy_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
}
#endif
#ifdef LITTLE_BREAKPOINT
if (TARGET_BYTE_ORDER != BIG_ENDIAN)
if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG)
{
static unsigned char little_break_insn[] = LITTLE_BREAKPOINT;
*lenptr = sizeof (little_break_insn);
@ -194,7 +194,7 @@ default_float_format (struct gdbarch *gdbarch)
#endif
switch (byte_order)
{
case BIG_ENDIAN:
case BFD_ENDIAN_BIG:
return &floatformat_ieee_single_big;
case BFD_ENDIAN_LITTLE:
return &floatformat_ieee_single_little;
@ -215,7 +215,7 @@ default_double_format (struct gdbarch *gdbarch)
#endif
switch (byte_order)
{
case BIG_ENDIAN:
case BFD_ENDIAN_BIG:
return &floatformat_ieee_double_big;
case BFD_ENDIAN_LITTLE:
return &floatformat_ieee_double_little;
@ -401,9 +401,9 @@ generic_register_virtual_size (int regnum)
#ifdef TARGET_BYTE_ORDER_SELECTABLE
/* compat - Catch old targets that expect a selectable byte-order to
default to BIG_ENDIAN */
default to BFD_ENDIAN_BIG */
#ifndef TARGET_BYTE_ORDER_DEFAULT
#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_BIG
#endif
#endif
#if !TARGET_BYTE_ORDER_SELECTABLE_P
@ -417,7 +417,7 @@ generic_register_virtual_size (int regnum)
#endif
#endif
#ifndef TARGET_BYTE_ORDER_DEFAULT
#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_BIG /* arbitrary */
#endif
/* ``target_byte_order'' is only used when non- multi-arch.
Multi-arch targets obtain the current byte order using
@ -444,10 +444,10 @@ show_endian (char *args, int from_tty)
{
if (TARGET_BYTE_ORDER_AUTO)
printf_unfiltered ("The target endianness is set automatically (currently %s endian)\n",
(TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
(TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"));
else
printf_unfiltered ("The target is assumed to be %s endian\n",
(TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
(TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"));
}
static void
@ -486,7 +486,7 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
{
struct gdbarch_info info;
gdbarch_info_init (&info);
info.byte_order = BIG_ENDIAN;
info.byte_order = BFD_ENDIAN_BIG;
if (! gdbarch_update_p (info))
{
printf_unfiltered ("Big endian target not supported by GDB\n");
@ -494,7 +494,7 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
}
else
{
target_byte_order = BIG_ENDIAN;
target_byte_order = BFD_ENDIAN_BIG;
}
}
else
@ -516,24 +516,24 @@ set_endian_from_file (bfd *abfd)
int want;
if (bfd_big_endian (abfd))
want = BIG_ENDIAN;
want = BFD_ENDIAN_BIG;
else
want = BFD_ENDIAN_LITTLE;
if (TARGET_BYTE_ORDER_AUTO)
target_byte_order = want;
else if (TARGET_BYTE_ORDER != want)
warning ("%s endian file does not match %s endian target.",
want == BIG_ENDIAN ? "big" : "little",
TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
want == BFD_ENDIAN_BIG ? "big" : "little",
TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little");
}
else
{
if (bfd_big_endian (abfd)
? TARGET_BYTE_ORDER != BIG_ENDIAN
: TARGET_BYTE_ORDER == BIG_ENDIAN)
? TARGET_BYTE_ORDER != BFD_ENDIAN_BIG
: TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
warning ("%s endian file does not match %s endian target.",
bfd_big_endian (abfd) ? "big" : "little",
TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little");
}
}
@ -769,7 +769,7 @@ initialize_current_architecture (void)
switch (default_bfd_vec->byteorder)
{
case BFD_ENDIAN_BIG:
info.byte_order = BIG_ENDIAN;
info.byte_order = BFD_ENDIAN_BIG;
break;
case BFD_ENDIAN_LITTLE:
info.byte_order = BFD_ENDIAN_LITTLE;
@ -791,7 +791,7 @@ initialize_current_architecture (void)
if (info.byte_order == BFD_ENDIAN_UNKNOWN)
{
/* Wire it to big-endian!!! */
info.byte_order = BIG_ENDIAN;
info.byte_order = BFD_ENDIAN_BIG;
}
if (GDB_MULTI_ARCH)

View File

@ -1475,7 +1475,7 @@ arm_register_type (int regnum)
{
if (regnum >= F0_REGNUM && regnum < F0_REGNUM + NUM_FREGS)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return builtin_type_arm_ext_big;
else
return builtin_type_arm_ext_littlebyte_bigword;
@ -1493,7 +1493,7 @@ static void
convert_from_extended (void *ptr, void *dbl)
{
DOUBLEST d;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d);
else
floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword,
@ -1506,7 +1506,7 @@ convert_to_extended (void *dbl, void *ptr)
{
DOUBLEST d;
floatformat_to_doublest (TARGET_DOUBLE_FORMAT, ptr, &d);
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl);
else
floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword,
@ -1951,7 +1951,7 @@ gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
else
info->symbols = NULL;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return print_insn_big_arm (memaddr, info);
else
return print_insn_little_arm (memaddr, info);
@ -1970,7 +1970,7 @@ arm_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
if (arm_pc_is_thumb (*pcptr) || arm_pc_is_thumb_dummy (*pcptr))
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
static char thumb_breakpoint[] = THUMB_BE_BREAKPOINT;
*pcptr = UNMAKE_THUMB_ADDR (*pcptr);
@ -1987,7 +1987,7 @@ arm_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
}
else
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
static char arm_breakpoint[] = ARM_BE_BREAKPOINT;
*lenptr = sizeof (arm_breakpoint);

View File

@ -1303,7 +1303,7 @@ gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value,
the sign/zero extension will wipe them out.
- If we're in the interior of the word, then there is no garbage
on either end, because the ref operators zero-extend. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
gen_left_shift (ax, end - (offset + op_size));
else
gen_left_shift (ax, offset - start);

View File

@ -1883,15 +1883,15 @@ match_bitstring_literal (void)
else
{
/* Extract bits from digit, packing them into the bitstring byte. */
int k = TARGET_BYTE_ORDER == BIG_ENDIAN ? bits_per_char - 1 : 0;
for (; TARGET_BYTE_ORDER == BIG_ENDIAN ? k >= 0 : k < bits_per_char;
TARGET_BYTE_ORDER == BIG_ENDIAN ? k-- : k++)
int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
{
bitcount++;
if (digit & (1 << k))
{
tempbuf[tempbufindex] |=
(TARGET_BYTE_ORDER == BIG_ENDIAN)
(TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
: (1 << bitoffset);
}

View File

@ -1592,7 +1592,7 @@ process_coff_symbol (register struct coff_symbol *cs,
SYMBOL_CLASS (sym) = LOC_ARG;
add_symbol_to_list (sym, &local_symbols);
#if !defined (BELIEVE_PCC_PROMOTION)
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
/* If PCC says a parameter is a short or a char,
aligned on an int boundary, realign it to the

View File

@ -31,7 +31,7 @@
la tm-m68k.h). */
/* Byte order is configurable, but this machine runs big-endian. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* Floating point uses IEEE representations. */
#define IEEE_FLOAT (1)
@ -74,7 +74,7 @@ CORE_ADDR a29k_skip_prologue ();
We let the command line (or previously included files) override this
setting. */
#ifndef BREAKPOINT
#if TARGET_BYTE_ORDER == BIG_ENDIAN
#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
#define BREAKPOINT {0x72, 0x50, 0x01, 0x01}
#else /* Target is little-endian. */
#define BREAKPOINT {0x01, 0x01, 0x50, 0x72}
@ -647,7 +647,7 @@ extern void pop_frame ();
word in target byte order; bits 0-7 and 16-23 of *WORDP are replaced with
bits 0-7 and 8-15 of DATA (which is in host byte order). */
#if TARGET_BYTE_ORDER == BIG_ENDIAN
#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
#define STUFF_I16(WORDP, DATA) \
{ \
*((char *)(WORDP) + 3) = ((DATA) & 0xff);\

View File

@ -95,7 +95,7 @@
from the msp in the memory stack. If msp is set higher than the dummy code,
an ESF may clobber this code. */
#if TARGET_BYTE_ORDER == BIG_ENDIAN
#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
#define NOP_INSTR 0x70400101
#else /* Target is little endian */
#define NOP_INSTR 0x01014070

View File

@ -36,7 +36,7 @@ struct value;
/* IEEE format floating point. */
#define IEEE_FLOAT (1)
#define TARGET_DOUBLE_FORMAT (target_byte_order == BIG_ENDIAN \
#define TARGET_DOUBLE_FORMAT (target_byte_order == BFD_ENDIAN_BIG \
? &floatformat_ieee_double_big \
: &floatformat_ieee_double_littlebyte_bigword)

View File

@ -25,7 +25,7 @@
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* Offset from address of function to start of its code.
Zero on most machines. */

View File

@ -52,7 +52,7 @@
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
#define R0_REGNUM 0
#define R1_REGNUM 1

View File

@ -60,7 +60,7 @@ extern void h8300_init_extra_frame_info ();
#define IEEE_FLOAT (1)
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
#undef TARGET_INT_BIT
#define TARGET_INT_BIT 16
#undef TARGET_LONG_BIT

View File

@ -29,7 +29,7 @@
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* Define the sizes of integers and pointers. */

View File

@ -23,8 +23,8 @@
/* Used by mswin. */
#define TARGET_M32R 1
/* mvs_check TARGET_BYTE_ORDER BIG_ENDIAN */
#define TARGET_BYTE_ORDER BIG_ENDIAN
/* mvs_check TARGET_BYTE_ORDER BFD_ENDIAN_BIG */
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* mvs_check REGISTER_NAMES */
#define REGISTER_NAMES \

View File

@ -26,7 +26,7 @@
#define IEEE_FLOAT (1)
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext

View File

@ -26,7 +26,7 @@
/* g++ support is not yet included. */
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* We cache information about saved registers in the frame structure,
to save us from having to re-scan function prologues every time

View File

@ -225,7 +225,7 @@ void mips_register_convert_to_raw (struct type *virtual_type, int reg_nr,
between memory and register formats. */
#define REGISTER_CONVERT_TO_TYPE(n, type, buffer) \
do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \
do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG \
&& REGISTER_RAW_SIZE (n) == 4 \
&& (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \
&& TYPE_CODE(type) == TYPE_CODE_FLT \
@ -236,7 +236,7 @@ void mips_register_convert_to_raw (struct type *virtual_type, int reg_nr,
memcpy (((char *)(buffer)), __temp, 4); }} while (0)
#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer) \
do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \
do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG \
&& REGISTER_RAW_SIZE (n) == 4 \
&& (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \
&& TYPE_CODE(type) == TYPE_CODE_FLT \

View File

@ -34,7 +34,7 @@ struct inferior_status;
/* Target system byte order. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* By default assume we don't have to worry about software floating point. */
#ifndef SOFT_FLOAT

View File

@ -159,7 +159,7 @@ extern int sparc_intreg_size (void);
"y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr" \
}
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* Offset from address of function to start of its code.
Zero on most machines. */

View File

@ -32,7 +32,7 @@
#define TARGET_PTR_BIT (BIG ? 32: 16)
/* Define the bit, byte, and word ordering of the machine. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG
/* Offset from address of function to start of its code.
Zero on most machines. */

View File

@ -4117,7 +4117,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Ok. */
break;
case BIG_ENDIAN:
case BFD_ENDIAN_BIG:
internal_error (__FILE__, __LINE__, "cris_gdbarch_init: big endian byte order in info");
break;

View File

@ -1268,7 +1268,7 @@ print_insn (CORE_ADDR memaddr, struct ui_file *stream)
internal_error (__FILE__, __LINE__,
"print_insn: no disassembler");
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
tm_print_insn_info.endian = BFD_ENDIAN_BIG;
else
tm_print_insn_info.endian = BFD_ENDIAN_LITTLE;
@ -1523,7 +1523,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
switch (info.byte_order)
{
case BIG_ENDIAN:
case BFD_ENDIAN_BIG:
set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_big);
set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_big);
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);

View File

@ -1152,7 +1152,7 @@ print_insn (CORE_ADDR memaddr, struct ui_file *stream)
internal_error (__FILE__, __LINE__,
"print_insn: no disassembler");
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
tm_print_insn_info.endian = BFD_ENDIAN_BIG;
else
tm_print_insn_info.endian = BFD_ENDIAN_LITTLE;

View File

@ -1225,17 +1225,13 @@ extern void *alloca ();
#endif /* Not GNU C */
#endif /* alloca not defined */
/* Get a definition of BIG_ENDIAN and BFD_ENDIAN_LITTLE. */
/* Get a definition of BFD_ENDIAN_BIG and BFD_ENDIAN_LITTLE. */
/* FIXME: cagney/2001-10-31: GDB should just use BFD's definitions. */
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
#if !defined (BIG_ENDIAN)
#define BIG_ENDIAN 4321
#endif
/* Dynamic target-system-dependent parameters for GDB. */
#include "gdbarch.h"
#if (GDB_MULTI_ARCH == 0)
@ -1269,7 +1265,7 @@ extern void *alloca ();
from byte/word byte order. */
#if !defined (BITS_BIG_ENDIAN)
#define BITS_BIG_ENDIAN (TARGET_BYTE_ORDER == BIG_ENDIAN)
#define BITS_BIG_ENDIAN (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
#endif
/* In findvar.c. */

View File

@ -1,3 +1,8 @@
2002-01-04 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace
BIG_ENDIAN with BFD_ENDIAN_BIG.
2002-01-03 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace

View File

@ -3486,7 +3486,7 @@ current sources.)
@item TARGET_BYTE_ORDER_DEFAULT
@findex TARGET_BYTE_ORDER_DEFAULT
The ordering of bytes in the target. This must be either
@code{BIG_ENDIAN} or @code{BFD_ENDIAN_LITTLE}. This macro replaces
@code{BFD_ENDIAN_BIG} or @code{BFD_ENDIAN_LITTLE}. This macro replaces
@code{TARGET_BYTE_ORDER} which is deprecated.
@item TARGET_BYTE_ORDER_SELECTABLE_P

View File

@ -66,7 +66,7 @@ That operation is not available on integers of more than %d bytes.",
/* Start at the most significant end of the integer, and work towards
the least significant. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
p = startaddr;
/* Do the sign extension once at the start. */
@ -101,7 +101,7 @@ That operation is not available on integers of more than %d bytes.",
/* Start at the most significant end of the integer, and work towards
the least significant. */
retval = 0;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = startaddr; p < endaddr; ++p)
retval = (retval << 8) | *p;
@ -126,7 +126,7 @@ extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval)
int len;
len = orig_len;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = (char *) addr;
len > (int) sizeof (LONGEST) && p < (char *) addr + orig_len;
@ -210,7 +210,7 @@ store_signed_integer (void *addr, int len, LONGEST val)
/* Start at the least significant end of the integer, and work towards
the most significant. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = endaddr - 1; p >= startaddr; --p)
{
@ -237,7 +237,7 @@ store_unsigned_integer (void *addr, int len, ULONGEST val)
/* Start at the least significant end of the integer, and work towards
the most significant. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = endaddr - 1; p >= startaddr; --p)
{
@ -824,7 +824,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
/* Raw and virtual formats are the same for this register. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN && len < REGISTER_RAW_SIZE (regnum))
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len < REGISTER_RAW_SIZE (regnum))
{
/* Big-endian, and we want less than full size. */
VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len;

View File

@ -270,7 +270,7 @@ struct gdbarch startup_gdbarch =
{
/* basic architecture information */
&bfd_default_arch_struct,
BIG_ENDIAN,
BFD_ENDIAN_BIG,
/* target specific vector and its dump routine */
NULL, NULL,
/*per-architecture data-pointers and swap regions */
@ -4755,7 +4755,7 @@ gdbarch_update_p (struct gdbarch_info info)
/* From the INFO struct. */
if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& info.abfd != NULL)
info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
: bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
: BFD_ENDIAN_UNKNOWN);
/* From the current target. */
@ -4775,7 +4775,7 @@ gdbarch_update_p (struct gdbarch_info info)
fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: info.byte_order %d (%s)\n",
info.byte_order,
(info.byte_order == BIG_ENDIAN ? "big"
(info.byte_order == BFD_ENDIAN_BIG ? "big"
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,

View File

@ -365,7 +365,7 @@ function_list ()
cat <<EOF
i:2:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name:TARGET_ARCHITECTURE != NULL
#
i:2:TARGET_BYTE_ORDER:int:byte_order::::BIG_ENDIAN
i:2:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
# Number of bits in a char or unsigned char for the target machine.
# Just like CHAR_BIT in <limits.h> but describes the target machine.
# v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
@ -2063,7 +2063,7 @@ gdbarch_update_p (struct gdbarch_info info)
/* From the INFO struct. */
if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& info.abfd != NULL)
info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
: bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
: BFD_ENDIAN_UNKNOWN);
/* From the current target. */
@ -2083,7 +2083,7 @@ gdbarch_update_p (struct gdbarch_info info)
fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: info.byte_order %d (%s)\n",
info.byte_order,
(info.byte_order == BIG_ENDIAN ? "big"
(info.byte_order == BFD_ENDIAN_BIG ? "big"
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,

View File

@ -1651,7 +1651,7 @@ do_registers_info (int regnum, int fpregs)
printf_filtered ("\t(raw 0x");
for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
{
register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
: REGISTER_RAW_SIZE (i) - 1 - j;
printf_filtered ("%02x", (unsigned char) raw_buffer[idx]);
}

View File

@ -47,7 +47,7 @@ memory_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
breakpoint. On some machines, breakpoints are handled by the
target environment and we don't have to worry about them here. */
#ifdef BIG_BREAKPOINT
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
static unsigned char big_break_insn[] = BIG_BREAKPOINT;
*lenptr = sizeof (big_break_insn);
@ -55,7 +55,7 @@ memory_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
}
#endif
#ifdef LITTLE_BREAKPOINT
if (TARGET_BYTE_ORDER != BIG_ENDIAN)
if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG)
{
static unsigned char little_break_insn[] = LITTLE_BREAKPOINT;
*lenptr = sizeof (little_break_insn);

View File

@ -242,7 +242,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
}
di.mach = TARGET_PRINT_INSN_INFO->mach;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
di.endian = BFD_ENDIAN_BIG;
else
di.endian = BFD_ENDIAN_LITTLE;

View File

@ -525,7 +525,7 @@ get_register (int regnum, int format)
ptr = buf + 2;
for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
{
register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
: REGISTER_RAW_SIZE (regnum) - 1 - j;
sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]);
ptr += 2;

View File

@ -446,7 +446,7 @@ void
mips_register_convert_to_virtual (int n, struct type *virtual_type,
char *raw_buf, char *virt_buf)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
memcpy (virt_buf,
raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
TYPE_LENGTH (virtual_type));
@ -461,7 +461,7 @@ mips_register_convert_to_raw (struct type *virtual_type, int n,
char *virt_buf, char *raw_buf)
{
memset (raw_buf, 0, REGISTER_RAW_SIZE (n));
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
memcpy (raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
virt_buf,
TYPE_LENGTH (virtual_type));
@ -2284,7 +2284,7 @@ mips_push_arguments (int nargs,
{
if (!FP_REGISTER_DOUBLE && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 4 : 0;
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
/* Write the low word of the double to the even register(s). */
@ -2385,7 +2385,7 @@ mips_push_arguments (int nargs,
int longword_offset = 0;
CORE_ADDR addr;
stack_used_p = 1;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
if (MIPS_STACK_ARGSIZE == 8 &&
(typecode == TYPE_CODE_INT ||
@ -2457,7 +2457,7 @@ mips_push_arguments (int nargs,
if (!MIPS_EABI
&& MIPS_SAVED_REGSIZE < 8
&& TARGET_BYTE_ORDER == BIG_ENDIAN
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& partial_len < MIPS_SAVED_REGSIZE
&& (typecode == TYPE_CODE_STRUCT ||
typecode == TYPE_CODE_UNION))
@ -2522,7 +2522,7 @@ mips_push_register (CORE_ADDR * sp, int regno)
if (MIPS_SAVED_REGSIZE < REGISTER_RAW_SIZE (regno))
{
regsize = MIPS_SAVED_REGSIZE;
offset = (TARGET_BYTE_ORDER == BIG_ENDIAN
offset = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
? REGISTER_RAW_SIZE (regno) - MIPS_SAVED_REGSIZE
: 0);
}
@ -2719,7 +2719,7 @@ mips_print_register (int regnum, int all)
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
if (FP_REGISTER_DOUBLE)
{ /* show 8-byte floats as float AND double: */
int offset = 4 * (TARGET_BYTE_ORDER == BIG_ENDIAN);
int offset = 4 * (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG);
printf_filtered (" (float) ");
val_print (builtin_type_float, raw_buffer + offset, 0, 0,
@ -2736,7 +2736,7 @@ mips_print_register (int regnum, int all)
{
int offset;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
else
offset = 0;
@ -2756,8 +2756,8 @@ do_fp_register_row (int regnum)
char *raw_buffer[2];
char *dbl_buffer;
/* use HI and LO to control the order of combining two flt regs */
int HI = (TARGET_BYTE_ORDER == BIG_ENDIAN);
int LO = (TARGET_BYTE_ORDER != BIG_ENDIAN);
int HI = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG);
int LO = (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG);
double doub, flt1, flt2; /* doubles extracted from raw hex data */
int inv1, inv2, inv3;
@ -2806,7 +2806,7 @@ do_fp_register_row (int regnum)
}
else
{ /* eight byte registers: print each one as float AND as double. */
int offset = 4 * (TARGET_BYTE_ORDER == BIG_ENDIAN);
int offset = 4 * (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG);
memcpy (dbl_buffer, raw_buffer[HI], 2 * REGISTER_RAW_SIZE (FP0_REGNUM));
flt1 = unpack_double (builtin_type_float,
@ -2875,7 +2875,7 @@ do_gp_register_row (int regnum)
for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++)
printf_filtered (" ");
/* Now print the register value in hex, endian order. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
byte < REGISTER_RAW_SIZE (regnum);
byte++)
@ -3218,9 +3218,9 @@ return_value_location (struct type *valtype,
{
/* We need to break a 64bit float in two 32 bit halves and
spread them across a floating-point register pair. */
lo->buf_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 4 : 0;
hi->buf_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 0 : 4;
lo->reg_offset = ((TARGET_BYTE_ORDER == BIG_ENDIAN
lo->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
hi->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 0 : 4;
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& REGISTER_RAW_SIZE (FP0_REGNUM) == 8)
? 4 : 0);
hi->reg_offset = lo->reg_offset;
@ -3233,7 +3233,7 @@ return_value_location (struct type *valtype,
{
/* The floating point value fits in a single floating-point
register. */
lo->reg_offset = ((TARGET_BYTE_ORDER == BIG_ENDIAN
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& REGISTER_RAW_SIZE (FP0_REGNUM) == 8
&& len == 4)
? 4 : 0);
@ -3252,7 +3252,7 @@ return_value_location (struct type *valtype,
int regnum = 2;
lo->reg = regnum + 0;
hi->reg = regnum + 1;
if (TARGET_BYTE_ORDER == BIG_ENDIAN
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& len < MIPS_SAVED_REGSIZE)
{
/* "un-left-justify" the value in the low register */
@ -3261,7 +3261,7 @@ return_value_location (struct type *valtype,
hi->reg_offset = 0;
hi->len = 0;
}
else if (TARGET_BYTE_ORDER == BIG_ENDIAN
else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& len > MIPS_SAVED_REGSIZE /* odd-size structs */
&& len < MIPS_SAVED_REGSIZE * 2
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT ||
@ -3289,7 +3289,7 @@ return_value_location (struct type *valtype,
hi->len = 0;
}
}
if (TARGET_BYTE_ORDER == BIG_ENDIAN
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& REGISTER_RAW_SIZE (regnum) == 8
&& MIPS_SAVED_REGSIZE == 4)
{
@ -3563,7 +3563,7 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3);
/* Call the appropriate disassembler based on the target endian-ness. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return print_insn_big_mips (memaddr, info);
else
return print_insn_little_mips (memaddr, info);
@ -3592,7 +3592,7 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
unsigned char *
mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
if (pc_is_mips16 (*pcptr))
{

View File

@ -1018,7 +1018,7 @@ mn10300_print_register (const char *name, int regnum, int reg_width)
else
{
int byte;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
byte < REGISTER_RAW_SIZE (regnum);

View File

@ -2431,7 +2431,7 @@ disassemble_command (char *arg, int from_tty)
static int
print_insn (CORE_ADDR memaddr, struct ui_file *stream)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG;
else
TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_LITTLE;

View File

@ -258,7 +258,7 @@ get_hex_regs (int n, int regno)
for (j = 0; j < 4; j++)
{
get_hex_byte (&b);
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
val = (val << 8) + b;
else
val = val + (b << (j * 8));
@ -558,7 +558,7 @@ rombug_fetch_registers (void)
for (j = 0; j < 2; j++)
{
get_hex_byte (&b);
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
val = (val << 8) + b;
else
val = val + (b << (j * 8));
@ -622,7 +622,7 @@ rombug_fetch_register (int regno)
for (j = 0; j < 2; j++)
{
get_hex_byte (&b);
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
val = (val << 8) + b;
else
val = val + (b << (j * 8));

View File

@ -243,7 +243,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
if (rslt != adp_ok)
error ("Could not open device \"%s\"", name);
gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BIG_ENDIAN ? 1 : 0);
gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 1 : 0);
gdb_config.fpe = 1;
gdb_config.rditype = 2;
gdb_config.heartbeat_on = 1;

View File

@ -353,7 +353,7 @@ rdp_init (int cold, int tty)
sync = 1;
break;
case RDP_RES_VALUE_BIG_ENDIAN:
target_byte_order = BIG_ENDIAN;
target_byte_order = BFD_ENDIAN_BIG;
sync = 1;
break;
default:

View File

@ -477,7 +477,7 @@ gdbsim_open (char *args, int from_tty)
{
switch (TARGET_BYTE_ORDER)
{
case BIG_ENDIAN:
case BFD_ENDIAN_BIG:
strcat (arg_buf, " -E big");
break;
case BFD_ENDIAN_LITTLE:

View File

@ -4681,7 +4681,7 @@ remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
if (val == 0)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
val = target_write_memory (addr, (char *) big_break_insn,
sizeof big_break_insn);
else

View File

@ -283,7 +283,7 @@ rs6000_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
static unsigned char big_breakpoint[] = BIG_BREAKPOINT;
static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT;
*bp_size = 4;
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return big_breakpoint;
else
return little_breakpoint;
@ -300,7 +300,7 @@ rs6000_software_single_step (enum target_signal signal,
static char le_breakp[] = LITTLE_BREAKPOINT;
static char be_breakp[] = BIG_BREAKPOINT;
char *breakp = TARGET_BYTE_ORDER == BIG_ENDIAN ? be_breakp : le_breakp;
char *breakp = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? be_breakp : le_breakp;
int ii, insn;
CORE_ADDR loc;
CORE_ADDR breaks[2];
@ -964,7 +964,7 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
else
{ /* Argument can fit in one register. No problem. */
int adj = TARGET_BYTE_ORDER == BIG_ENDIAN ? reg_size - len : 0;
int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
memcpy ((char *)&registers[REGISTER_BYTE (ii + 3)] + adj,
VALUE_CONTENTS (arg), len);
@ -1111,7 +1111,7 @@ rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
else
{
/* return value is copied starting from r3. */
if (TARGET_BYTE_ORDER == BIG_ENDIAN
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& TYPE_LENGTH (valtype) < REGISTER_RAW_SIZE (3))
offset = REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype);
@ -2470,7 +2470,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Select instruction printer. */
tm_print_insn = arch == power ? print_insn_rs6000 :
info.byte_order == BIG_ENDIAN ? print_insn_big_powerpc :
info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc :
print_insn_little_powerpc;
/* Choose variant. */

View File

@ -428,7 +428,7 @@ sh_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
static int
gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
return print_insn_sh (memaddr, info);
else
return print_insn_shl (memaddr, info);
@ -1001,7 +1001,7 @@ sh_extract_return_value (struct type *type, char *regbuf, char *valbuf)
if (len <= 4)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_BYTE (return_register) + 4 - len;
else
offset = REGISTER_BYTE (return_register);
@ -1009,7 +1009,7 @@ sh_extract_return_value (struct type *type, char *regbuf, char *valbuf)
}
else if (len <= 8)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_BYTE (return_register) + 8 - len;
else
offset = REGISTER_BYTE (return_register);
@ -1046,7 +1046,7 @@ sh3e_sh4_extract_return_value (struct type *type, char *regbuf, char *valbuf)
}
else if (len <= 4)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_BYTE (return_register) + 4 - len;
else
offset = REGISTER_BYTE (return_register);
@ -1054,7 +1054,7 @@ sh3e_sh4_extract_return_value (struct type *type, char *regbuf, char *valbuf)
}
else if (len <= 8)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_BYTE (return_register) + 8 - len;
else
offset = REGISTER_BYTE (return_register);
@ -1705,7 +1705,7 @@ sh_do_fp_register (int regnum)
printf_filtered ("\t(raw 0x");
for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
{
register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
: REGISTER_RAW_SIZE (regnum) - 1 - j;
printf_filtered ("%02x", (unsigned char) raw_buffer[idx]);
}

View File

@ -622,7 +622,7 @@ download (char *target_name, char *args, int from_tty,
sizeof (marker));
if (strncmp (marker.signature, "DaTa", 4) == 0)
{
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
section_address = bfd_getb32 (marker.sdata);
else
section_address = bfd_getl32 (marker.sdata);

View File

@ -1701,7 +1701,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
add_symbol_to_list (sym, &local_symbols);
if (TARGET_BYTE_ORDER != BIG_ENDIAN)
if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG)
{
/* On little-endian machines, this crud is never necessary,
and, if the extra bytes contain garbage, is harmful. */

View File

@ -1056,7 +1056,7 @@ value_push (register CORE_ADDR sp, struct value *arg)
& ~(PARM_BOUNDARY / TARGET_CHAR_BIT - 1));
/* Are we going to put it at the high or low end of the container? */
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = container_len - len;
else
offset = 0;

View File

@ -618,7 +618,7 @@ print_binary_chars (struct ui_file *stream, unsigned char *valaddr,
/* FIXME: We should be not printing leading zeroes in most cases. */
fprintf_filtered (stream, local_binary_format_prefix ());
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
p < valaddr + len;
@ -705,7 +705,7 @@ print_octal_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
carry = 0;
fprintf_filtered (stream, local_octal_format_prefix ());
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
p < valaddr + len;
@ -819,11 +819,11 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
#define CARRY_LEFT( x ) ((x) % TEN)
#define SHIFT( x ) ((x) << 4)
#define START_P \
((TARGET_BYTE_ORDER == BIG_ENDIAN) ? valaddr : valaddr + len - 1)
((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? valaddr : valaddr + len - 1)
#define NOT_END_P \
((TARGET_BYTE_ORDER == BIG_ENDIAN) ? (p < valaddr + len) : (p >= valaddr))
((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? (p < valaddr + len) : (p >= valaddr))
#define NEXT_P \
((TARGET_BYTE_ORDER == BIG_ENDIAN) ? p++ : p-- )
((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? p++ : p-- )
#define LOW_NIBBLE( x ) ( (x) & 0x00F)
#define HIGH_NIBBLE( x ) (((x) & 0x0F0) >> 4)
@ -956,7 +956,7 @@ print_hex_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
/* FIXME: We should be not printing leading zeroes in most cases. */
fprintf_filtered (stream, local_hex_format_prefix ());
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
p < valaddr + len;