Skip to contentSkip to conversation

binutils breaks hppa kernel build,

parisc-linux John David Anglin 2 participants 3 messages Sep 25, 2005 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 5 lines

binutils-2.15 has this in include/opcodes/hppa.h:

{ "fdc",        0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
{ "fdc",        0x04001280, 0xfc003fdf, "cZx(b)", pa10, 0},
{ "fic",        0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},
{ "fic",        0x04000280, 0xfc001fdf, "cZx(b)", pa10, 0},

The last "fic" opcode entry is wrong. It's using the wrong instruction format, the mask is wrong, pa10 is wrong, etc.

Quoted 4 lines

And the binutils_2.16.1cvs20050902 version has only:

{ "fdc",        0x04001280, 0xfc00ffdf, "cZx(b)", pa10, 0},
{ "fdc",        0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
{ "fic",        0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},

Yes, I deleted the entry because there isn't implicit space register selection for 'S' instructions.

Quoted 2 lines

The order of the with 's' vs without 's' was switched and in the process dropped one "fic" line.

Changing the order of with 's' vs without 's' was intentional. It generates better disassembly. Give the new objdump a try and you will see the difference.

Quoted 2 lines

Can binutils maintainer/folks please just add it back in the new location?

We need a new pa20 format 24 entry.

Quoted 1 line

Is the fix obvious enough or is a patch necessary?

A patch is needed.

Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · John David Anglin

The last "fic" opcode entry is wrong. It's using the wrong instruction format, the mask is wrong, pa10 is wrong, etc.

I don't think we realised this until now. I suspect we've been silently emitting bad code up until this point, and given that it's in flush_kernel_icache_page, maybe it explains some of our occasional crashes.

The code was previously:

        fic,m           %r23(%r26)

We're trying to flush kernel space at this point, so we can use any of
sr4-sr7. I suspect before we were putting sr0 in, which could have
been flushing any random space instead of the one we wanted. I'll commit this change to the kernel source now.
_______________________________________________
parisc-linux mailing list [email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#4 lore raw
In reply to a message not in the archive
Quoted 8 lines
Quoted 5 lines

binutils-2.15 has this in include/opcodes/hppa.h:

{ "fdc",        0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
{ "fdc",        0x04001280, 0xfc003fdf, "cZx(b)", pa10, 0},
{ "fic",        0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},
{ "fic",        0x04000280, 0xfc001fdf, "cZx(b)", pa10, 0},

The last "fic" opcode entry is wrong. It's using the wrong instruction format, the mask is wrong, pa10 is wrong, etc.

The enclosed patch against binutils head adds the missing "fic" entry. I also noticed that we were missing a pa20 im5 variant for "fdc". This builds and checks with no regressions. However, the new entries aren't really tested.

Dave

Signature · 24 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Index: hppa.h
===================================================================
RCS file: /cvs/src/src/include/opcode/hppa.h,v
retrieving revision 1.59
diff -u -3 -p -r1.59 hppa.h
--- hppa.h	3 Aug 2005 15:08:52 -0000	1.59
+++ hppa.h	25 Sep 2005 01:58:35 -0000
@@ -755,6 +755,9 @@ static const struct pa_opcode pa_opcodes
 { "pdc",	0x04001380, 0xfc003fdf, "cZx(s,b)", pa10, 0},
 { "fdc",	0x04001280, 0xfc00ffdf, "cZx(b)", pa10, 0},
 { "fdc",	0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
+{ "fdc",	0x04003280, 0xfc00ffff, "5(b)", pa20, FLAG_STRICT},
+{ "fdc",	0x04003280, 0xfc003fff, "5(s,b)", pa20, FLAG_STRICT},
+{ "fic",	0x040013c0, 0xfc00dfdf, "cZx(b)", pa20, FLAG_STRICT},
 { "fic",	0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},
 { "fdce",	0x040012c0, 0xfc00ffdf, "cZx(b)", pa10, 0},
 { "fdce",	0x040012c0, 0xfc003fdf, "cZx(s,b)", pa10, 0},
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux