Assembler Language Reference

Assembler Language Reference

AIX Version 7.1 Assembler Language Reference IBM Note Before using this information and the product it supports, read the information in “Notices” on page 635 . This edition applies to AIX Version 7.1 and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2010, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document.............................................................................................xi Highlighting..................................................................................................................................................xi Case sensitivity in AIX................................................................................................................................. xi ISO 9000......................................................................................................................................................xi Assembler language reference...............................................................................1 What's new...................................................................................................................................................1 Assembler overview.....................................................................................................................................1 Features of the AIX® assembler............................................................................................................. 1 Assembler installation............................................................................................................................8 Processing and storage................................................................................................................................8 POWER® family and PowerPC® architecture overview...........................................................................8 Branch processor................................................................................................................................. 17 Fixed-point processor.......................................................................................................................... 18 Floating-point processor......................................................................................................................22 Syntax and semantics................................................................................................................................24 Character set........................................................................................................................................ 24 Reserved words....................................................................................................................................25 Line format............................................................................................................................................25 Statements........................................................................................................................................... 26 Symbols................................................................................................................................................ 28 Relocation specifiers............................................................................................................................31 Constants..............................................................................................................................................32 Operators..............................................................................................................................................35 Expressions.......................................................................................................................................... 36 Addressing................................................................................................................................................. 42 Absolute addressing.............................................................................................................................42 Absolute immediate addressing.......................................................................................................... 42 Relative immediate addressing............................................................................................................42 Explicit-based addressing....................................................................................................................43 Implicit-based addressing................................................................................................................... 43 Location counter...................................................................................................................................44 Assembling and linking a program............................................................................................................ 44 Assembling and linking a program.......................................................................................................44 Understanding assembler passes........................................................................................................46 Interpreting an assembler listing.........................................................................................................47 Interpreting a symbol cross-reference................................................................................................51 Subroutine linkage convention............................................................................................................ 52 Understanding and programming the toc............................................................................................72 Using thread local storage................................................................................................................... 77 Running a program............................................................................................................................... 79 Extended instruction mnemonics............................................................................................................. 80 Extended mnemonics of branch instructions......................................................................................80 Extended mnemonics of condition register logical instructions.........................................................87 Extended mnemonics of fixed-point arithmetic instructions............................................................. 88 Extended mnemonics of fixed-point compare instructions................................................................88 Extended mnemonics of fixed-point load instructions....................................................................... 89 Extended mnemonics of fixed-point logical instructions....................................................................89 Extended mnemonics of fixed-point trap instructions........................................................................89 Extended mnemonic mtcr for moving to the condition register......................................................... 91 iii Extended mnemonics of moving from or to special-purpose registers..............................................91 Extended mnemonics of 32-bit fixed-point rotate and shift instructions.......................................... 96 Extended mnemonics of 64-bit fixed-point rotate and shift instructions.......................................... 99 Migrating source programs......................................................................................................................101 Functional differences for POWER® family and PowerPC® instructions........................................... 101 Differences between POWER® family and PowerPC® instructions with the same op code............. 102 Extended mnemonics changes..........................................................................................................104 POWER® family instructions deleted from PowerPC®....................................................................... 106 Added PowerPC® instructions............................................................................................................107 Instructions available only for the PowerPC® 601 RISC microprocessor.........................................108 Migration of branch conditional statements with no separator after mnemonic.............................108 Instruction set......................................................................................................................................... 109 abs (Absolute) instruction..................................................................................................................109 add (Add) or cax (Compute Address) instruction..............................................................................111 addc or a (Add Carrying) instruction..................................................................................................113 adde or ae (Add Extended) instruction..............................................................................................115 addi (Add Immediate) or cal (Compute Address Lower) instruction................................................117

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    668 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us