<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi list,<br>
<br>
I've jumped into what seems to be a bug in the gnu binutils
assembler. I've already submited a report:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=14480">http://sourceware.org/bugzilla/show_bug.cgi?id=14480</a><br>
<br>
To cut the story short, the assembler does not trigger deferred
indirect mode unless the index is specifically written in the
instruction. So this instruction:<br>
<br>
JSR PC,@(R0)<br>
<br>
Assembles exactly equal that this one:<br>
<br>
JSR PC,(R0).<br>
<br>
If the source code is:<br>
<br>
JSR PC,@0(R0)<br>
<br>
then the assembled code is correct.<br>
<br>
The problem with this bug (if it is really a bug) is the gcc
compiler generates the incorrectly handled instruction if you try to
use a function pointer table and enable size optimization (-Os
option).<br>
<br>
The other possibility is I'm not understanding at all the PDP-11
addressing modes and the assembler is working as it should do...
Could anyone enlighten me about this?<br>
<br>
<br>
</body>
</html>