This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix power4.s gas failure
Hi!
I get following failure on ppc64-linux native gas (while it
works in i386->ppc64 cross).
The problem is 64-bit unclean code.
0xe0820000L & (0x3f << 26) is 0xe0000000L, while
(56 << 26) is -0x20000000L.
Ok to commit?
> > On native ppc64-linux binutils (hjl's 2.14.90.0.5) I'm getting:
> > ../as-new -mpower4 -o dump.o
> > /usr/src/redhat/BUILD/binutils-2.14.90.0.5/gas/testsuite/gas/ppc/power4.s
> > /usr/src/redhat/BUILD/binutils-2.14.90.0.5/build-ppc64-redhat-linux/gas/testsuite/../../binutils/objdump
> > -drx -Mpower4 dump.o > dump.out
> > regexp_diff match failure
> > regexp "^ +1c: e0 82 00 00 lq r4,0\(r2\)$"
> > line " 1c: e0 82 00 08 lq r4,0(r2)"
2003-07-28 Jakub Jelinek <jakub@redhat.com>
* config/tc-ppc.c (md_apply_fix3): Fix check for lq insns.
--- gas/config/tc-ppc.c.jj 2003-07-10 07:30:15.000000000 -0400
+++ gas/config/tc-ppc.c 2003-07-28 14:07:29.000000000 -0400
@@ -5742,7 +5742,7 @@ md_apply_fix3 (fixP, valP, seg)
mask = 0xfffc;
/* lq insns reserve the four lsbs. */
if ((ppc_cpu & PPC_OPCODE_POWER4) != 0
- && (val & (0x3f << 26)) == (56 << 26))
+ && ((val >> 26) & 0x3f) == 56)
mask = 0xfff0;
val |= value & mask;
if (target_big_endian)
Jakub