News for hackers. Stuff that matters.
Re:Why do RET instructions have a REPZ prepended on x86? by bookface on Monday August 26, 2013 @06:32PM (#6280339)
This was really interesting, but one thing it didn't fully explain was why the fact that ret imm16 was fastpathed would make it a worse choice for this optimization than repz ret. Excuse my noobiness, but can anybody explain that to me?
Re:Why do RET instructions have a REPZ prepended on x86? by Someone on Monday August 26, 2013 @06:40PM (#6280377)
"in the K10 family, the ret imm16 instruction is now fastpathed"

I understand that as follows: on the K8 both repz ret and ret imm16 were microcoded; hence, the shorter repz ret was preferred.

On the K10, ret imm16 got fastpathed. That made it the preferred code, even though it is a byte longer.

Re:Why do RET instructions have a REPZ prepended on x86? by bookface on Monday August 26, 2013 @10:02PM (#6281029)
Ah, thanks. I missed that that whole part was talking about the K10.