assembly programming on mips (doc pointers req) - SGI

This is a discussion on assembly programming on mips (doc pointers req) - SGI ; Proud being counter-tendency, I'd like to optimize certain algorithms to death on my octane (>= R10K). I'd like to hear from you about any good documentation pointers about assembly programming on IRIX and MIPS in general that discusses a bit ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: assembly programming on mips (doc pointers req)

  1. assembly programming on mips (doc pointers req)

    Proud being counter-tendency, I'd like to optimize certain algorithms to
    death on my octane (>= R10K). I'd like to hear from you about any good
    documentation pointers about assembly programming on IRIX and MIPS in
    general that discusses a bit more about the general development guideline
    (assembly, linking steps, how GOT works in a relocatable objects..) than
    how SGI's TPL does.

    I do accept pointers to TPL itself. SGI's TPL is amazing and _really_
    full of docs, so finding the needed one is difficult. Anyway TPL docs
    are generally specific, and I do need instead a bit more context (how to
    glue things toghether).

    I did not found any printed book about MIPS (programming, CPU design),
    neither on IRIX. Any good book about assembly programming on unix that's
    worth mentioning then?

    --
    wave++ (also known, in some places, as "Yuri D'Elia") http://www.yuv.info/
    The email address is fake (thanks swen)! You know how to contact me anyway.

  2. Re: assembly programming on mips (doc pointers req)

    mee too.
    i want to do less faster and more efficiently.

    "wave++" wrote in message
    news:slrnbo6hqo.1r7.wavexx@lambda.i.yuv.info...
    > Proud being counter-tendency, I'd like to optimize certain algorithms to
    > death on my octane (>= R10K). I'd like to hear from you about any good
    > documentation pointers about assembly programming on IRIX and MIPS in
    > general that discusses a bit more about the general development guideline
    > (assembly, linking steps, how GOT works in a relocatable objects..) than
    > how SGI's TPL does.
    >
    > I do accept pointers to TPL itself. SGI's TPL is amazing and _really_
    > full of docs, so finding the needed one is difficult. Anyway TPL docs
    > are generally specific, and I do need instead a bit more context (how to
    > glue things toghether).
    >
    > I did not found any printed book about MIPS (programming, CPU design),
    > neither on IRIX. Any good book about assembly programming on unix that's
    > worth mentioning then?
    >
    > --
    > wave++ (also known, in some places, as "Yuri D'Elia") http://www.yuv.info/
    > The email address is fake (thanks swen)! You know how to contact me

    anyway.



  3. Re: assembly programming on mips (doc pointers req)

    In article ,
    Dr d b karron wrote:
    >mee too.
    >i want to do less faster and more efficiently.
    >
    >"wave++" wrote in message
    >news:slrnbo6hqo.1r7.wavexx@lambda.i.yuv.info...
    >> Proud being counter-tendency, I'd like to optimize certain algorithms to
    >> death on my octane (>= R10K). I'd like to hear from you about any good
    >> documentation pointers about assembly programming on IRIX and MIPS in
    >> general that discusses a bit more about the general development guideline
    >> (assembly, linking steps, how GOT works in a relocatable objects..) than
    >> how SGI's TPL does.


    What does 'relocatable object' mean to you? If you mean a .o,
    then there is basically a single GOT. I don't recall any
    public doc on how it works internally.

    After the link step (ld) is done the
    output executable or shared-library (DSO) can have multiple GOTs
    (when one is not big enough for everything to fit).

    This GOT info is information you don't actually need, I suspect.
    Generally if you think you need to write in assembler,
    you need to think again. Of course sometimes it may be
    worthwhile, but please use speedshop(1) to verify the
    timing before expending any effort in writing assembler!



    >> I do accept pointers to TPL itself. SGI's TPL is amazing and _really_
    >> full of docs, so finding the needed one is difficult. Anyway TPL docs


    The Compiling and Performance Tuning Guide gives the overview.

    Look for the words Assembler for assembler info.
    See the N32 Handbook for assembler stuff too.
    And the Porting Guide.

    These books are essentially all under M for MIPSpro
    Click on the 'developer' word on the TPL page. Then go to the
    M section.

    Regards,
    David B. Anderson davea@sgi.com http://reality.sgiweb.org/davea

  4. Re: assembly programming on mips (doc pointers req)

    > Generally if you think you need to write in assembler,
    > you need to think again.


    I've been meaning on learning MIPS ASM for a while now, but time hasn't been
    nice to me lately
    I have a few books on VAX/VMS ASM - how useful would those books be to learn
    MIPS ASM?
    cheers!
    mike


  5. Re: assembly programming on mips (doc pointers req)

    In article <3F839B7A.44EDDF6C@comcast.net>, mike wrote:

    : > Generally if you think you need to write in assembler,
    : > you need to think again.
    :
    : I've been meaning on learning MIPS ASM for a while now, but time hasn't been
    : nice to me lately
    : I have a few books on VAX/VMS ASM - how useful would those books be to learn
    : MIPS ASM?
    : cheers!
    : mike
    :

    Learn any two reasonably different ASM variants and you'll be prepared to tackle
    any CPU.

    Don't expect ASM to be magically faster than compiled code, though. The days of
    getting huge performance improvements by hand-tweaking assembly are thankfully
    long gone, thanks to modern CPUs, compilers and libraries.


    Cheers - Tony 'Nicoya' Mantler

    --
    Tony 'Nicoya' Mantler -- Master of Code-fu -- nicoya@ubb.ca
    -- http://nicoya.feline.pp.se/ -- http://www.ubb.ca/ --

  6. Re: assembly programming on mips (doc pointers req)

    wave++ writes:

    > I did not found any printed book about MIPS (programming, CPU design),
    > neither on IRIX.


    "See MIPS Run" by Dominic Sweetman is excellent.

    > Any good book about assembly programming on unix that's worth
    > mentioning then?


    I'm not sure what such a book would contain exactly, tying assembly
    programming to an OS seems kind of pointless.

    Perhaps http://www.iecc.com/linkers/ would be of interest.

    *p

  7. Re: assembly programming on mips (doc pointers req)

    davea@quasar.engr.sgi.com (David Anderson) wrote in message news:...
    > The Compiling and Performance Tuning Guide gives the overview.
    >
    > Look for the words Assembler for assembler info.
    > See the N32 Handbook for assembler stuff too.
    > And the Porting Guide.
    >
    > These books are essentially all under M for MIPSpro
    > Click on the 'developer' word on the TPL page. Then go to the
    > M section.
    >
    > Regards,
    > David B. Anderson davea@sgi.com http://reality.sgiweb.org/davea


    Check out "See MIPS Run" by Dominic Sweetman. Focuses mostly on the
    R4x00 series and older designs but nevertheless give an in-depth
    overview of MIPS'capabilities:

    http://www.amazon.com/exec/obidos/tg...books&n=507846

  8. Re: assembly programming on mips (doc pointers req)

    On 2003-10-08, Tony 'Nicoya' Mantler wrote:
    >: > Generally if you think you need to write in assembler,
    >: > you need to think again.


    I don't think I need to write in assembly. I just want MORE details, in
    a more "higher level" fascion.

    TPL books about assembly requires a certain level of knowledge about the
    compilation steps, how the data is stored in an executable, etc.
    Everything is clearly documented of course: I can read all books the
    first time skipping sections I don't understand and then do a second
    pass to resolve everything , but I would appreciate a more sensible
    approach.

    > Don't expect ASM to be magically faster than compiled code, though. The days of
    > getting huge performance improvements by hand-tweaking assembly are thankfully
    > long gone, thanks to modern CPUs, compilers and libraries.


    Knowledge about the underlying details means that you can produce higher
    performance without the need to mess with assembly. But isn't
    necessarily performance what I'm really interested into: I want details
    first of all.

    As an example, I would really appreciate a book that explains assembly
    this way:

    - A small do-nothing main in assembly
    - How to compile and link the aftermentioned example
    - Details involved about the compilation steps
    - Brief explaination of how the code is organized in the object
    - Brief explaination of how the code is translated
    - Details involved about the linking step
    - Small introduction about elf objects
    - Why I do need to link against crt, etc.
    ...
    - More details
    - More details
    - Etc

    (well, you can exclude some steps - I don't need a rough start).
    Essentially "an introduction" that gives some essential knowledge about
    every little detail so that enables you to look in the references
    without swiching from TPL books every 10 minutes.

    --
    wave++ (also known, in some places, as "Yuri D'Elia") http://www.yuv.info/
    The email address is fake (thanks swen)! You know how to contact me anyway.

  9. Re: assembly programming on mips (doc pointers req)

    In article ,
    wave++ wrote:
    >On 2003-10-08, Tony 'Nicoya' Mantler wrote:
    >>: > Generally if you think you need to write in assembler,
    >>: > you need to think again.

    >
    >I don't think I need to write in assembly. I just want MORE details, in
    >a more "higher level" fascion.

    [ ]
    >As an example, I would really appreciate a book that explains assembly
    >this way:
    >
    > - A small do-nothing main in assembly


    This one is easy. Write a small main() in C,
    and use
    cc -S -n32 main.c
    to produce main.s
    Then asemble.
    as -n32 main.s -o main.o
    Then link, using cc, not directly ld.
    cc main.o

    Generally this is a simple way to get started. Let the
    compiler help.

    You lose the ability to debug this sensibly (-g
    won't get you any debug information on variables,
    for example) because of the
    way we designed the compilation system:
    if you use as(1) directly most debug info is lost.

    > - How to compile and link the aftermentioned example


    The MIPSpro Compiling ... Guide on TechPubs has this.

    > - Details involved about the compilation steps
    > - Brief explaination of how the code is organized in the object
    > - Brief explaination of how the code is translated
    > - Details involved about the linking step
    > - Small introduction about elf objects
    > - Why I do need to link against crt, etc.


    The MIPSpro aspects are discussed in the Guide, to a degree.
    The generic parts are not.

    add
    -v -show
    to cc steps to see what steps the compiler is doing.

    Remember a 'traditional unix' fact: options on the
    link step are *order dependent* and some orderings
    simply won't work.

    Have fun!
    David Anderson

  10. Re: assembly programming on mips (doc pointers req)

    On 2003-10-08, David Anderson wrote:
    > Generally this is a simple way to get started. Let the
    > compiler help.


    That's how I started in fact, but I prefer to know some more details at
    least instead of doing trial&error tests

    > Remember a 'traditional unix' fact: options on the
    > link step are *order dependent* and some orderings
    > simply won't work.


    Are you mentioning GNU ld?

    > Have fun!
    > David Anderson


    As much as I can!
    Thanks

    --
    wave++ (also known, in some places, as "Yuri D'Elia") http://www.yuv.info/
    The email address is fake (thanks swen)! You know how to contact me anyway.

+ Reply to Thread