News for hackers. Stuff that matters.
Re:Unexpected Ways Memory Subsystem Interacts with Branch Pr... by flohofwoe on Friday December 29, 2023 @04:21PM (#38810342)
Setting the CPU flag after a comparison doesn't do anything useful yet, you also need to perform an addition with 1 or do nothing depending on the flag, and selecting between these two options is usually done with a conditional branch, unless the CPU can execute ALU instructions conditionally (ARM can do this, x86 only has conditional mov AFAIK).
Re:Unexpected Ways Memory Subsystem Interacts with Branch Pr... by gpderetta on Friday December 29, 2023 @05:05PM (#38810810)
You can copy a flag in the al register then add that. That's usually what the compiler generates.
Re:Unexpected Ways Memory Subsystem Interacts with Branch Pr... by flohofwoe on Saturday December 30, 2023 @07:57AM (#38814946)
Also, apparently ARM64 did drop the conditional instructions (somehow I missed the memo):

https://offlinemark.com/2023/07/29/til-arm64-doesnt-include-...