News for hackers. Stuff that matters.
Re:RISC-V formal spec public review by a1369209993 on Friday June 21, 2019 @04:13AM (#20240803)
> Conditional moves depend on state left over from the last instruction.

So, literally exactly the same state that conditional branch instructions depend on? Aside from implementation details (like >Intel refuses to speculate loads in them<, which, to be fair, might be its own problem), "cmovz D S" is just "jnz skip ; mov D S ; skip:" without the useless branch overhead.

Re:RISC-V formal spec public review by ncmncm on Friday June 21, 2019 @08:57AM (#20242096)
Branches are in a different category than moves and ALU ops, for instruction reordering.
Re:RISC-V formal spec public review by a1369209993 on Friday June 21, 2019 @01:10PM (#20244420)
> Aside from implementation details
Re:RISC-V formal spec public review by ncmncm on Friday June 21, 2019 @08:34PM (#20247309)
Performance is 100% implementation details, from top to bottom. And the only reason anybody uses a cmov instruction is for hoped-for better performance.

There is hope that it doesn't squat a precious branch-prediction slot, hope that it doesn't incur a branch misprediction pipeline stall if it's taken, or not taken, hope that fewer instructions translates to fewer clock cycles, hope that what looks like a copy really just does a register-renaming accounting trick, ...