log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: ARM Assembler Optimization
 
  ARM Assembler Optimization
  finkel (11:08 26/11/2010)
  nunfetishist (15:06 26/11/2010)
    monkeyson2 (22:38 26/11/2010)
      hubersn (22:50 26/11/2010)
      trevj (22:50 26/11/2010)
        Phlamethrower (22:57 26/11/2010)
          monkeyson2 (01:03 27/11/2010)
            VincceH (12:16 27/11/2010)
          trevj (10:32 28/11/2010)
  qUE (02:09 30/11/2010)
 
John Smith Message #115923, posted by finkel at 11:08, 26/11/2010
Member
Posts: 1
Hi everyone,

I need some documentation on how to optimize assembler code for pipeline execution on ARM11 processor.

I remember some general rules for some generic RISC CPU from my university days, like branch prediction, instruction interleaving, computational dependencies, etc, but I have only some vague ideas what I should be doing with ARM11.

I downloaded some technical references from the net, so at least I know that ARM11 has 8 pipeline stages, early-stage branch prediction, and so on, but some specific answers are hard to find.

For example, if I write something like this...

tst r0,#1
<other instructions>
beq l1

... how many other (non-dependent) instructions should I put between tst and beq so that pipeline doesn't stall, and flushes minimal number of instructions in case of branch misprediction?

Similar question for something like this:

add r0,#1
<other instructions>
add r1,r0 ;@ write-read dependence of r1 on r0

Has anyone seen any online documentation dealing with this kind of stuff?
  ^[ Log in to reply ]
 
Rob Kendrick Message #115924, posted by nunfetishist at 15:06, 26/11/2010, in reply to message #115923
nunfetishist
Today's phish is trout a la creme.

Posts: 524
Has anyone seen any online documentation dealing with this kind of stuff?
Yes. The ARM ARM. (ARM Architectural Reference Manual.) It contains most, if not all, of the information you are after.
  ^[ Log in to reply ]
 
Phil Mellor Message #115927, posted by monkeyson2 at 22:38, 26/11/2010, in reply to message #115924
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
Has anyone seen any online documentation dealing with this kind of stuff?
Yes. The ARM ARM. (ARM Architectural Reference Manual.) It contains most, if not all, of the information you are after.
The Advanced Reduced Instruction Set Computer Machine Reference Manual?!
  ^[ Log in to reply ]
 
Steffen Huber Message #115928, posted by hubersn at 22:50, 26/11/2010, in reply to message #115927
Member
Posts: 91
Has anyone seen any online documentation dealing with this kind of stuff?
Yes. The ARM ARM. (ARM Architectural Reference Manual.) It contains most, if not all, of the information you are after.
The Advanced Reduced Instruction Set Computer Machine Reference Manual?!
My personal favourite of the category "abbreviation cluster" is ITOC.

ITOC = IMS TCP/IP OTMA Connection
  ^[ Log in to reply ]
 
Trevor Johnson Message #115929, posted by trevj at 22:50, 26/11/2010, in reply to message #115927
Member
Posts: 660
The Advanced Reduced Instruction Set Computer Machine Reference Manual?!
<pedant>
Advanced Reduced Instruction Set Computer Machines Architectural Reference Manual
</pedant>


[Edited by trevj at 22:51, 26/11/2010]
  ^[ Log in to reply ]
 
Jeffrey Lee Message #115930, posted by Phlamethrower at 22:57, 26/11/2010, in reply to message #115929
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Except it's the Architecture reference manual wink
  ^[ Log in to reply ]
 
Phil Mellor Message #115931, posted by monkeyson2 at 01:03, 27/11/2010, in reply to message #115930
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
After all this I can see why they abbreviated it to ARM ARM. tongue
  ^[ Log in to reply ]
 
VinceH Message #115932, posted by VincceH at 12:16, 27/11/2010, in reply to message #115931
VincceH
Lowering the tone since the dawn of time

Posts: 1600
After all this I can see why they abbreviated it to ARM ARM. tongue
Yes, because "Computer Machines" sounds so "I don't have much truck with those computer machines, they're almost as bad as that book learning."
  ^[ Log in to reply ]
 
Trevor Johnson Message #115933, posted by trevj at 10:32, 28/11/2010, in reply to message #115930
Member
Posts: 660
Except it's the Architecture reference manual wink
That's actually what I put before I did the edit!
  ^[ Log in to reply ]
 
qUE Message #115958, posted by qUE at 02:09, 30/11/2010, in reply to message #115923
qUE

Posts: 187
ARM website has pretty much all the info you need, you'll just have to hunt for it.

The newer ARM chips are very different from the older ones like I'm used to. I'm not sure optimisations like using conditioned instructions rather than branches have quite the same impact they had on ye olde chips. Simple optimisations like bitshift to multiply/divide will still work though. And obviously using the registers as much as possible to avoid accessing memory will have a massive impact on performance. RAM access is slow on any machine...well...until the RAM speed matches the CPU speed, which isn't far off being the norm.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: ARM Assembler Optimization