This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] fix dcbt operand order for "server" category
On Thu, 2009-02-05 at 17:14 -0600, Peter Bergner wrote:
> On Fri, 2009-02-06 at 08:30 +1030, Alan Modra wrote:
> > On Thu, Feb 05, 2009 at 02:29:54PM -0600, Peter Bergner wrote:
> > > The dcbt instruction that supports the TH operand used to be optional but
> > > now is part of the base ISA. However, Embdedded and Server categories use
> > > different operand ordering, with Embedded having TH being the first operand
> > > and Server having TH being the last/3rd operand. Ditto for dcbtst.
> >
> > Horrible. This patch will break the linux kernel, won't it?
>
> Or were you worried that I was changing the binary bit pattern with
> this change? All I'm trying to do is change the asm syntax accepted,
> not the bit pattern we produce... Hmmm, looking at the hex bits in
> the objdumps, something looks wrong (ie, they're not matching).
> Let me check into that and report back.
Actually, it was just a luser error on my part, using the wrong asm
syntax with the wrong assembler options. I've confirmed that I get
the same exact bit patterns either way.
Peter
bergner@etna:~/> cat dcbt-old.s
.section ".text"
old:
dcbt 1,2
dcbt 0,1,2
dcbt 8,1,2
bergner@etna:~/> cat dcbt-p7.s
.section ".text"
power7:
dcbt 1,2
dcbt 1,2,0
dcbt 1,2,8
bergner@etna:~/> /home/bergner/binutils/build/binutils-dcbt/gas/as-new -mppc dcbt-old.s -o dcbt-old.o
bergner@etna:~/> /home/bergner/binutils/build/binutils-dcbt/gas/as-new -mpower7 dcbt-p7.s -o dcbt-p7.o
bergner@etna:~/> /home/bergner/binutils/build/binutils-dcbt/binutils/objdump -d -Mppc dcbt-old.o
dcbt-old.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <old>:
0: 7c 01 12 2c dcbt r1,r2
4: 7c 01 12 2c dcbt r1,r2
8: 7d 01 12 2c dcbt 8,r1,r2
bergner@etna:~/> /home/bergner/binutils/build/binutils-dcbt/binutils/objdump -d -Mpower7 dcbt-p7.o
dcbt-p7.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <power7>:
0: 7c 01 12 2c dcbt r1,r2
4: 7c 01 12 2c dcbt r1,r2
8: 7d 01 12 2c dcbt r1,r2,8