Professional Web Applications Themes

PPC Assembly Instruction, li - Mac Programming

I need to know the 32 bit format of the li instruction. This instruction seems to not be in my copy of the 'Programming Environment Manual for 32-Bit Implementations of the PowerPC Architecture' from Motorola. I got it in about a month ago so it is fairly new. Is it a macro of some other instructions or is it not fully supported? The Mac OS X assembly supports it as an instruction. Thanks in advance....

  1. #1

    Default PPC Assembly Instruction, li

    I need to know the 32 bit format of the li instruction. This
    instruction seems to not be in my copy of the 'Programming Environment
    Manual for 32-Bit Implementations of the PowerPC Architecture' from
    Motorola. I got it in about a month ago so it is fairly new. Is it a
    macro of some other instructions or is it not fully supported? The
    Mac OS X assembly supports it as an instruction. Thanks in advance.
    psyba Guest

  2. #2

    Default Re: PPC Assembly Instruction, li

    In article <google.com>,
    edu (psyba) wrote:
     

    "li" is not a PowerPC instruction. "li rx,si" is only a simplified
    mnemonic for "addi rx,0,si".

    Patrick
    --
    Patrick Stadelmann <ch>
    Patrick Guest

  3. #3

    Default Re: PPC Assembly Instruction, li

    In article <google.com>,
    edu (psyba) wrote:
     

    It's identical in every way to an "addi" instruction. See below for more
    details.
     

    That's because "li" isn't *REALLY* a PPC instruction.

    It's a convenience notation. A properly equipped assembler/compiler will
    generate the exact same bit-pattern for both "li Register,
    ImmediateValue" and "addi Register, 0, ImmediateValue". Likewise, a
    properly equipped disassembler will often decode the bit-sequence for
    "addi Register, 0, ImmediateValue" as "li Register, ImmediateValue".

    Advice: Get Motorola to send you the other books in the PPC group.
    You'll be glad you did in the long run, and since they're freebies,
    you're out nothing.

    My absolute minimal "nal" for PPC programming, in order of
    importance:
    (1) Motorola Doent number MPCFPE32B/AD, AKA "The Green Book",
    Officailly titled "PowerPC Microprocessor Family: The Programming
    Environments for 32-bit Microprocessors" - This one covers "the grand
    scheme of things" as far as 32-bit PPC chips are concerned. Most of the
    information in it is applicable to all current PPC chips, from the 601,
    all the way out to the G5. All of them adhere to AT LEAST (some, like
    the G4/G5 conform to this standard, then add chip-specific stuff on top
    of that) the standards in this one, so it's definitely "must" reading
    for anybody wanting to do anything on any PPC chip.

    (2) Chip-specific books, as needed - There's a separate "user's manual"
    volume for each of the 601, 603, 603e, 604, and 750/G3 processors that I
    know about for certain, and I'd bet anything you want to name that the
    G4 and G5 each have similar books, although I've never personally seen
    (or had a use for) them. The 750/G3 book, sometimes called "The Purple
    Book", wears the official title "MPC750 RISC Microprocessor Users's
    Manual", and carries Motorola doent number MPC750UM/AD. For the
    others, you're on your own to hunt 'em up.

    (3) "PowerPC Microprocessor Family: The Programmer's Reference Guide"
    Motorola number MPCPRG/D. This is a handy-dandy 60-ish page "quick
    reference" booklet that covers the register layout, programming model,
    and instruction set used by the various PPC chips. This one doents
    most (not all, but definitely the most commonly appearing) of the
    "alternate" instructions, such as "li". It falls flat on its face for
    the G4's Altivec section, but that's covered elsewhere, to the tune of
    sevearl hundred pages.

    (4) Optional, unless you're coding for Altivec on a G4/G5, in which
    case, it's mandatory: Motorola number ALTIVECPEM/D - "Altivec Technology
    Programming Environments Manual" - Covers, as you might expect, the
    Altivec section of G4/G5 chips. It's the Altivec-specific equivalent of
    the Green Book plus the programmer's reference guide.

    If you're missing any one of the first three (or the fourth, if you're
    coding for Altivec), you need to "fill the hole" before you try going
    any further - The incomplete information that any one of them will
    provide you is guaranteed to drive you batty as you slam into obstacles
    created by the slight differences between the various PPC chips. The
    "total picture" that all of them together provide is unmatched by
    ANYTHING as a reference for anyone working with PPC processors. Which is
    hardly surprising, since they were written by the folks who created the
    chips in the first place...

    --
    Don Bruder - net <--- Preferred Email - SpamAssassinated.
    Hate SPAM? See <http://www.spamassassin.org> for some seriously great info.
    I will choose a path that's clear: I will choose Free Will! - N. Peart
    Fly trap info pages: <http://www.sonic.net/~dakidd/Horses/FlyTrap/index.html>
    Don Guest

Similar Threads

  1. Replies: 0
    Last Post: May 4th, 02:35 PM
  2. complete instruction in trigger?
    By Rogério A Bassete in forum PostgreSQL / PGSQL
    Replies: 0
    Last Post: January 27th, 11:21 AM
  3. Replies: 2
    Last Post: May 16th, 08:35 PM
  4. troubles with a 'case' instruction
    By Dave in forum Oracle Server
    Replies: 2
    Last Post: October 18th, 01:33 PM
  5. Dreamweaver MX - instruction book
    By StevePlym in forum Macromedia Dreamweaver
    Replies: 4
    Last Post: July 28th, 02:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139