Many processors like the ARM64 have instructions to perform fused multiply-add operations. Do they deliver reduced error and better performance?
Xcode
An overview of bit operations, including MOVK for 16-bit immediate values, bit shift operations, bitwise AND, OR, XOR, and more, plus a cheat sheet.
Basic integer arithmetic – add, subtract, negate, multiply, multiply-and-add, and divide – in their many variations. With some catches for those more used to high-level languages.
Explaining the LDR family of instructions for loading registers, MOV for moving one register to another, STR for storing to memory, and SXTx/UXTx for filling a register with smaller data types.
How conditional branching can slow modern processors down badly, comparing assembly code with that generated by Apple’s Swift compiler, and some puzzles.
How to implement conditional looping such as for and while, and how to break out of a loop. Complete with chart of four conditional idioms.
How little has changed in using assembly language over the last 30+ years. But what about Swift Playgrounds 4, which will let iPads create apps for the App Store?
Forget about structured code, branching in assembly is based on GOTO with labels. Here’s how to get started, with an idiom for the switch statement in Swift.
Using different addressing modes and offset specifications to load and store in memory. Includes a summary of ARM64 Operand Architecture.
Types of register explained, and which are available to pass arguments of different types. Call by value and call by reference distinguished.
