Understanding ARM Assembly, Part 1
blogs.msdn.com
blogs.msdn.com
https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/
is a better intro to arm asm.
SUBS R1,R2,R3
ADDEQ R4,R4,#1
whereas in other instruction sets you'd have to branch over the 'ADD' instruction if the previous comparison was non-zero.(Not sure if this applies to ARM thumb style instructions or not; my ARM experience is very out of date!)
IT EQ
The 'IT' is for 'if then'.
There could also be more 'then's and 'else's for the conditional execution of muliple instructions: ITTE LT
(If then then else)
The following instructions could for example be: ADDEQ ...
STREQ ...
BNE ... (Branch - not equal because of the else)
Source:
http://community.arm.com/groups/processors/blog/2010/09/30/c... ittee eq
addeq ...
addeq ...
addne ...
addne ...
I believe ARM v8 dropped all this.http://www.cs.umd.edu/class/fall2001/cmsc411/projects/IA64-2...
http://www.drdobbs.com/embedded-systems/predication-speculat...
Predication allows all of the code to be executed, and a subset of the results of the code — those from the failing test — discarded.
He has just finished a 10-part series on IA-64, and probably posted that to provide some contrast.
In any case, if you want another overview article on ARM Assembly, try this: http://www.coranac.com/tonc/text/asm.htm
If you want a tutorial: http://thinkingeek.com/2013/01/09/arm-assembler-raspberry-pi...
And finally, this is a pretty good book if you've never looked at Assembly before and you've got a RPi or RPi emulator: http://www.amazon.com/Raspberry-Assembly-Language-RASPBIAN-B...
A few years later when I was writing R3000 assembly on the PS1 I remember thinking how poor it felt compared to writing ARM assembly (the R3000 was the only other RISC assembly language I'd used other than ARM at that point).
It was the only assembly language I genuinely enjoyed writing code in rather than what usually felt like a fight with most other assemblers. I give Sophie Wilson the credit for that, and probably the credit for my entire career, because of BBC BASIC on the BBC Micro before that!
There are instructions to run/debug it on an x86_64 machine via qemu.
Is this how SIMD is usually implemented in hardware? Have a set of circuitry that pushes one command to multiple registers?
[0] https://en.wikipedia.org/wiki/SIMD
[1] https://en.wikipedia.org/wiki/MMX_(instruction_set)#Technica...
[2] https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions#Regi...
A command is not "pushed" to a register; CPU registers are mostly passive, often on a very small and very fast block of memory called the "register file". Instead, values are read from the register file, processed, and written back to the register file (simplifying a bit).
How it's implemented is up to the hardware designer. For instance, adding a pair of 64-bit values from q0 to a pair of 64-bit values in q1 could be implemented as reading first d0 and d2 and adding them, followed by reading d1 and d3 and adding them (with pipelining, the second add can start while the first add is still executing). Or it could be implemented as reading d0 and d1 in parallel, reading d2 and d3 in parallel, and adding both pairs in parallel (using a pair of adders). Or it could be something even more complex.