mn10300: don't accept `mov pc,r[0-7]'

Alexandre Oliva aoliva@redhat.com
Tue Jan 22 14:13:00 GMT 2002


Back in April last year, I added support for `mov pc,a[0-3]' to AM33
assembly.  Unfortunately, it didn't occur to me that the way I had
introduced it would cause `mov pc,non-address-register' to be accepted
too, and in such a way that would cause an incorrect instruction to be
encoded.  For example, `mov pc,r7' would silently be assembled as `mov
sp,r7'.  Oops.

Here's a patch that fixes the problem.  I've tried to introduce a
negative test for the inappropriately-supported instructions, but I
couldn't figure out how to do it.  I'd appreciate any clues/pointers
as to how to do it.  Thanks in advance.

Meanwhile, here's the patch.  Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-mn10300-pc.patch
Type: text/x-patch
Size: 818 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20020122/e9659671/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Binutils mailing list