OR32 assembler should not allow missing immediate operands #121
Closedjeremybennett opened this issue over 14 years ago
jeremybennett commented over 14 years ago
<p>
This is a debatable bug/feature. It's a trade-off between conciseness and clarity.
</p>
<p>
The current binutils assembler allows signed immediate operands to be omitted, substituting zero. Thus all the following are valid.
</p>
<pre>
l.ld r0,(r1)
l.maci r3
l.addi r1,r2
l.sfgtui r1
</pre>
<p>
Note that this only applies to signed operands. Thus the following is not valid.
</p>
<pre>
l.andi r0,r1
</pre>
<p>
My recommendation is that for clarity, signed immediate operands should always be present. Since almost all assembler is machine generated, this should not affect users significantly.
</p>
<p>
Jeremy
</p>
<p>
-- <br />
Tel: +44 (1590) 610184<br />
Cell: +44 (7970) 676050<br />
SkypeID: jeremybennett<br />
Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br />
Web: <a href="http://www.embecosm.com">www.embecosm.com</a>
</p>
jeremybennett commented over 13 years ago
<p>
Transferred to OpenRISC bugzilla (<a href="http://bugzilla.opencores.org/show_bug.cgi?id=21">Bug 21</a>).
</p>
<p>
Marking closed in this bugtracker.
</p>