This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patch: add pa2.0 media instructions
- To: "Jerry Quinn" <jquinn@nortelnetworks.com>
- Subject: Re: Patch: add pa2.0 media instructions
- From: Jeffrey A Law <law@cygnus.com>
- Date: Sat, 28 Aug 1999 03:20:21 -0600
- cc: binutils@sourceware.cygnus.com
- Reply-To: law@cygnus.com
In message <199908052124.OAA28480@cygnus.com>you write:
> Here's some more pa2.0 instructions and test cases. This covers the
> halfword multimedia instructions.
A followup to the potential mask problem with hshl and hshr.
hshl was fine. hshr was wrong.
opcode mask
opcode 6 bits 0x3e 11 1110 11 1111
r 5 bits 00000 00000
0 5 bits 0x0 00000 11111
1 1 bit 0x1 1 1
2 2 bits 0x2 10 11
0 1 bit 0x0 0 1
*se 2 bits 10 10
sa 4 bits 0000 0000
0 1 bit 0 1
t 5 bits 00000 00000
opcode = 1111 1000 0000 0000 1100 1000 0000 0000
= 0xf800c800
mask = 1111 1100 0001 1111 1111 1000 0010 0000
= 0xfc1ff820
Your mask was 0xfc10f820. Looks like you missed a nibble :-)
* You took a shortcut by noting that "se" is really encoded via the low bit of
the se field (the high bit is always 1). I'm not sure how wise this really is
since in the architecture manual they show it as a 2 bit field and that's
what anyone reading the code is likely to expect. But I'll let it go for now.
Anyway, I'll check in a fix for this minor problem.
jeff