This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] Fix default endianness for gas mep.
- From: Doug Evans <dje at sebabeach dot org>
- To: binutils at sourceware dot org
- Date: Thu, 17 Dec 2009 21:32:46 -0800 (PST)
- Subject: [RFA] Fix default endianness for gas mep.
Hi.
While regression testing some cgen changes I found some problems in
the mep gas configury (and/or testsuite).
Configuring mep-elf produced a little-endian-is-default gas,
but the testsuite assumes big-endian-is-default.
Assuming the testsuite is correct in this regard,
I'm looking for approval to check in the appended patch.
[I'm setting aside the issue of the problem of recording the
default in two different places. It's been ages, and I don't
know what the current thinking is on this. There are many ports
that set the default endianness in both configure.tgt and tc-<arch>.h.]
The only failure this doesn't fix is mep/branch1:
regexp_diff match failure
regexp "^ .*: e4 51 00 04 * beq \$4,\$5,.* <foo>$"
line " 2: e4 51 00 00 beq $4,$5,2 <foo-0x8>"
regexp_diff match failure
regexp "^ .*: 00 00 * nop$"
line " 2: R_MEP_PCREL17A2 foo"
regexp_diff match failure
regexp "^.* <foo>:$"
line " 8: 00 00 nop"
regexp_diff match failure
regexp "^ .*: 00 00 * nop$"
line "0000000a <foo>:"
extra lines in dump.out starting with "^ a: 00 00 nop$"
EOF from /misc/dje/gnu/cgen-test3/src/gas/testsuite/gas/mep/branch1.d
FAIL: gas/mep/branch1
Has anyone run the mep testsuite recently?
2009-12-17 Doug Evans <dje@sebabeach.org>
* configure.tgt (mep): Fix cpu pattern.
* config/tc-mep.h (TARGET_BYTES_BIG_ENDIAN): Conditionally define.
Fix default.
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gas/configure.tgt,v
retrieving revision 1.55
diff -u -p -r1.55 configure.tgt
--- configure.tgt 4 Nov 2009 09:52:00 -0000 1.55
+++ configure.tgt 18 Dec 2009 05:22:33 -0000
@@ -54,7 +54,7 @@ case ${cpu} in
m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
m683??) cpu_type=m68k ;;
maxq) cpu_type=maxq ;;
- mep-*-elf) cpu_type=mep endian=big ;;
+ mep) cpu_type=mep endian=big ;;
microblaze*) cpu_type=microblaze ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
Index: config/tc-mep.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mep.h,v
retrieving revision 1.8
diff -u -p -r1.8 tc-mep.h
--- config/tc-mep.h 1 Sep 2009 00:24:01 -0000 1.8
+++ config/tc-mep.h 18 Dec 2009 05:22:33 -0000
@@ -34,7 +34,9 @@
#define TARGET_FORMAT (target_big_endian ? "elf32-mep" : "elf32-mep-little")
/* This is the default. */
-#define TARGET_BYTES_BIG_ENDIAN 0
+#ifndef TARGET_BYTES_BIG_ENDIAN
+#define TARGET_BYTES_BIG_ENDIAN 1
+#endif
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1