This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH: add pa2.0 system instructions
- To: "Jerry Quinn" <jquinn@nortelnetworks.com>
- Subject: Re: PATCH: add pa2.0 system instructions
- From: Jeffrey A Law <law@cygnus.com>
- Date: Fri, 25 Jun 1999 04:20:25 -0600
- cc: binutils@sourceware.cygnus.com
- Reply-To: law@cygnus.com
In message <199906211343.JAA27277@wmtl249c.us.nortel.com>you write:
> Changelog:
>
> Mon Jun 21 09:42:05 EDT 1999 Jerry Quinn <jquinn@nortelnetworks.com>
>
> * include/opcode/hppa.h (pa_opcodes): Add entries for mfia
> and mtsarcm instructions.
>
> *** pa-prev/include/opcode/hppa.h Sun Jun 20 23:51:34 1999
> --- gas-src/include/opcode/hppa.h Mon Jun 21 09:41:16 1999
> ***************
> *** 349,354 ****
> --- 349,356 ----
> { "ldsid", 0x000010a0, 0xfc1f3fe0, "(b),t", pa10},
> { "mtsp", 0x00001820, 0xffe01fff, "x,S", pa10},
> { "mtctl", 0x00001840, 0xfc00ffff, "x,^", pa10},
> + { "mtsarcm", 0x02c018c0, 0xffe0ffff, "x", pa20},
I believe this opcode is wrong.
I believe the right opcode is 0x16018c0
Page 7-98 of the PA2.0 manual:
0x00 -- 6 bits
0x0b -- 5 bits
reg -- 5 bits
res -- 3 bits (must be zeros)
0xc6 -- 8 bits
0x00 -- 5 bits
Which looks like:
000000 01011 xxxxx 000 11000110 00000
Turn that into 4 bit nibbles for the opcode we get.
0000 0001 011x xxxx 0001 1000 1100 0000
0 1 6 0 1 8 c 0
I believe the mask, operands, etc are correct
> + { "mfia", 0x00001540, 0xffffffe0, "t", pa20},
Similarly I think your opcode is wrong with this one too.
Page 7-90 of the PA2.0 manual
0x00 6 bits
res 5 bits (must be zeros)
0x00 5 bits
res 3 bits
0xa5 8 bits
reg 5 bits
Which gives us:
000000 00000 00000 000 10100101 00000
Into 4 bit nibbles:
0000 0000 0000 0000 0001 0100 1010 0000
0 0 0 0 1 4 a 0
I'm pretty sure your mask, operands, etc are correct
Running those instructions through the HP assembler confirms my encodings
of those instructions:
4 00000000 (016018C0) mtsarcm %r0
5 00000004 (000014A0) mfia %r0
I've got a 95% functional PA2.0 assembler (and testsuite) that Cygnus will
be contributing to binutils after it's delivered to HP (June 30) & cleaned up
a little in July. I don't know if that changes your plans for contributing
this kind of stuff.
I'm going to fix the opcodes in your patch and install it.
jeff