[bug #5652] Assembler shouldn't mask index field

[email protected] Tue, 30 Sep 2003 22:41:23 -0400
Newsgroups gmane.comp.gnu.mdk.bugs
Message-ID <[email protected]>
=================== BUG #5652: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5652&group_id=118

Submitted by: joelh                   Project: GNU MIX Development Kit      
Submitted on: Wed 10/01/2003 at 02:41
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  Assembler shouldn't mask index field

Original Submission:  The assembler, in mix_ins_to_word (and mix_ins_to_word_uncheck) presently truncates the index field to three bits.



As far as I can tell, this serves no useful purpose.  It doesn't restrict the index to valid index registers, since 7 is still passed.  It doesn't restrict input, since index register values > 7 are modified to other values (which are pretty much useless), rather than generating an error.  It isn't required to make a valid word, since an entire byte is available in the I field.



There's an old tradition on machines similar to the MIX (such as the PDP-4, IBM 360, etc) of holding data in unused portions of instructions, or (if you can wrangle it) used portions of instructions.  Or, if you don't have anything useful to store, then your initials.  ANDing the index field with 7 prevents this, and is unnecessary.



No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5652&group_id=118

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/