Which inline assembly code is correct for rdtscp?

后端 未结 2 782
时光说笑
时光说笑 2020-12-01 14:40

Disclaimer: Words cannot describe how much I detest AT&T style syntax

I have a problem that I hope is caused by register clobbering. If not, I have a much bigger

2条回答
  •  心在旅途
    2020-12-01 15:23

    According to this, this operation clobbers EDX and ECX. You need to mark those registers as clobbered which is what the second one does. BTW, is this the link where you got the above code or did you find it elsewhere? It also shows a few other variaitions for timings as well which is pretty neat.

提交回复
热议问题