From b96282be2d4b941c8b5e3d9822a68b23facc53c0 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 4 Aug 2010 04:21:06 +0000 Subject: [PATCH] * configure.tgt (m32c): Set endian=little. * config/tc-m32c.h (TARGET_BYTES_BIG_ENDIAN): Define as 0. * config/tc-m32c.c (md_number_to_chars): Revert last change. --- gas/ChangeLog | 6 ++++++ gas/config/tc-m32c.c | 2 +- gas/config/tc-m32c.h | 2 +- gas/configure.tgt | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 6b5e811d840..648e61b3df9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-08-04 Alan Modra + + * configure.tgt (m32c): Set endian=little. + * config/tc-m32c.h (TARGET_BYTES_BIG_ENDIAN): Define as 0. + * config/tc-m32c.c (md_number_to_chars): Revert last change. + 2010-08-03 Tristan Gingold * makefile.vms (OBJS): Add Add compress-debug.c. diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index 4344fb4c467..9c523e27811 100644 --- a/gas/config/tc-m32c.c +++ b/gas/config/tc-m32c.c @@ -1146,7 +1146,7 @@ m32c_force_relocation (fixS * fixp) void md_number_to_chars (char * buf, valueT val, int n) { - number_to_chars_bigendian (buf, val, n); + number_to_chars_littleendian (buf, val, n); } /* Turn a string in input_line_pointer into a floating point constant of type diff --git a/gas/config/tc-m32c.h b/gas/config/tc-m32c.h index 6339e1e222a..b69ab506b44 100644 --- a/gas/config/tc-m32c.h +++ b/gas/config/tc-m32c.h @@ -28,7 +28,7 @@ #define TARGET_FORMAT "elf32-m32c" -#define TARGET_BYTES_BIG_ENDIAN 1 +#define TARGET_BYTES_BIG_ENDIAN 0 #define md_end m32c_md_end extern void m32c_md_end (void); diff --git a/gas/configure.tgt b/gas/configure.tgt index 1909160e299..9269c52f940 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -45,7 +45,7 @@ case ${cpu} in ip2k) cpu_type=ip2k endian=big ;; iq2000) cpu_type=iq2000 endian=big ;; lm32) cpu_type=lm32 ;; - m32c) cpu_type=m32c endian=big ;; + m32c) cpu_type=m32c endian=little ;; m32r) cpu_type=m32r endian=big ;; m32rle) cpu_type=m32r endian=little ;; m5200) cpu_type=m68k ;; -- 2.30.2