1 / 2

Renaming registers

Renaming registers. With the Gas style assemblers, you can rename registers to aid in readability. The . req directive can be used to create an alias for a register. Syntax: name . req register_name @ creates an alias for register_name called name Examples:

phila
Download Presentation

Renaming registers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Renaming registers With the Gas style assemblers, you can rename registers to aid in readability. The .req directive can be used to create an alias for a register. Syntax: name .reqregister_name @ creates an alias for register_name called name Examples: pixels .req r0 width .req r1 height .req r2 mul pixels, width, height

  2. Undefining a register alias Similarly, the unreq directive can be used to undefinea register alias which was previously defined using the reqdirective. Syntax: .unreq name @ creates an alias for register_name called name Note: If name is undefined, an error occurs Examples: .unreq pixels .unreq width .unreq height

More Related