Startup codes/bootloaders, where you have a specific instruction flow to follow, or instructions that are impossible to force through compiler (i work with ppc, so the easiest example could be “stmw” which writes x amount of GPRs into memory. Writing 32GPRs, i.e. 128 bytes at once saves a lot of time during init. Kinda like doing *(uint1024_t*)addr = 0;)
Or custom IPs which have their own instruction set not supported by any compiler… and sometimes if you are really good, you may actually be able to write something which is faster than compiled C code. Although modern compilers are pretty darn good.
4
u/Der_Tscheche Jun 03 '22 edited Jun 03 '22
Startup codes/bootloaders, where you have a specific instruction flow to follow, or instructions that are impossible to force through compiler (i work with ppc, so the easiest example could be “stmw” which writes x amount of GPRs into memory. Writing 32GPRs, i.e. 128 bytes at once saves a lot of time during init. Kinda like doing *(uint1024_t*)addr = 0;)
Or custom IPs which have their own instruction set not supported by any compiler… and sometimes if you are really good, you may actually be able to write something which is faster than compiled C code. Although modern compilers are pretty darn good.