←back to thread

224 points mshockwave | 1 comments | | HN request time: 0.274s | source
Show context
sloemoe ◴[] No.44502573[source]
Put that in your delay slot and smoke it.

https://en.wikipedia.org/wiki/Delay_slot

I'm surprised by how many other architectures use it.

replies(4): >>44502951 #>>44503609 #>>44503931 #>>44504952 #
vesinisa ◴[] No.44503931[source]
Whoa, had no idea this existed. Wild stuff. Might be "somewhat" confusing to read assembler code like that without knowing about this particular technique..
replies(2): >>44504037 #>>44508846 #
1. bobmcnamara ◴[] No.44508846[source]
Many assemblers had an option to reorder on assembly so you could write it normally, while only taking care to avoid hazards near branches.

At least one toolchain would just pad the slots with nops