gopher-atz / 4klang

Official 4klang repository
MIT License
295 stars 15 forks source link

Unnecessary code: short jump to next line #9

Open vsariola opened 4 years ago

vsariola commented 4 years ago

https://github.com/hzdgopher/4klang/blob/e28554120325fcaaebbe8189eef16b57fd83f0a8/4klang_source/4klang.asm#L1497

My understanding is that this short jump to next line is unnecessary.

mikkorantalainen commented 2 years ago

That seems unnecessary indeed. The only plus side this could have in theory is some kind of optimal alignment, but compiler should take care of such details automatically anyway. I think this generates binary assembly 0xEB 0x00 which in this context is logically same as NOP but it depends on CPU branch prediction to execute with high performance.