Re: [PATCH] ppc32 use simplified mmenonics

From: Albert Cahalan (albert_at_users.sf.net)
Date: 08/22/04

  • Next message: Tonnerre: "Re: complete freeze of 2.6.8.1 with ntp"
    To: Vincent Hanquez <tab@snarc.org>
    Date:	22 Aug 2004 06:41:32 -0400
    
    

    On Sun, 2004-08-22 at 05:43, Vincent Hanquez wrote:
    > On Sat, Aug 21, 2004 at 08:45:26PM -0400, Albert Cahalan wrote:
    > > I'd rather you went the other way, replacing these
    > > barely-documented instructions with ones that are
    > > easy to look up. Motorola has about a zillion of
    > > these "simplified" instructions. I guess Motorola
    > > and IBM were jealous of Intel's CISC instructions.
    > >
    > > The big problem is this:
    > > THESE ARE NOT IN THE INDEX!!!!!!
    > >
    > > So, if I forget what one of these many instructions
    > > does, I'll have quite the time paging through the
    > > manual trying to find it.
    > >
    > > If it's not in the index, please avoid it.
    >
    > Well,
    >
    > let's analyse 'mr R1,R2'. Which is simplified instruction for moving register,
    > which represent the following instruction 'or R2,0,R1'

    The "or" is much easier, because it follows the
    standard 3-register pattern. With "mr", which way
    does it go? That's one more thing to remember.
    In fact I don't know, but the "or" is obvious.

    The 0 is your hint that the "or" isn't a plain "or".

    > bne target = bc 4,2,target
    >
    > When I see first form, I know exactly what the program do, whereas on
    > the second form : What the hell is 4,2 ?

    This is a slightly better example, but still, it's
    lots easier to look up "bc" to see the selection of
    options that are available.

    Plus, yeah, "what the hell is 4,2", but those numbers
    replace a _lot_ of other things you'd need to remember.
    There are 456 of these "simplified" branch instructions.
    If you use those, you'll tend to restrict your code to
    those few common ones you remember. There's bdnzltrl,
    bdnzfla, bunla... That's madness.

    That's 114 opcodes to 1.

    > So I'ld rather go with simplified instruction, even if that index
    > doesn't contain them (which I agree with you, is very bad).
    > There are still in Appendix F of my pdf and you can search with the find
    > utility include in your reader (xpdf does)

    I have the physical book. Other than being unsearchable,
    it's much nicer than the pdf. It's easy on the eyes,
    doesn't occupy screen space, and I can read it on the can.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Tonnerre: "Re: complete freeze of 2.6.8.1 with ntp"

    Relevant Pages

    • kernel bug in 2.6.0-test4-mm4 when removing USB flash disc
      ... at the moment) This was when I pulled the flash disc out of the USB ... This architecture has variable length instructions, ... This decode from eip onwards should be reliable ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [OOPS][RESEND] 2.6.0-test4-mm4
      ... This architecture has variable length instructions, ... This decode from eip onwards should be reliable ... This message was sent using M-Web Airmail - JUST LIKE THAT ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] ppc32 use simplified mmenonics
      ... > than bclr with cryptics numbers which I would had to lookup too. ... If you don't use the full bit manipulation notation ... you'll end up using 2 instructions where one would do. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] document optimizing macro for translating PROT_ to VM_ bits
      ... > resolved during compile (since we're dealing with compile time constants) ... > into a single shift and results in an execution of bitop 'and' followed by ... instructions for both expressions, except that the two instructions are ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Bug report for Reiserfs on 2.6.4-rc2
      ... I'm using reiserfs un a logical volume, ... EFLAGS: 00010282 ... This architecture has variable length instructions, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)