ref: 1b51d5683a5d8adcde03bbd277e6331f23c2f723
parent: ad5c6c0dfabd5feb39a85eec7c95a703c91feabe
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Mar 31 15:55:02 EDT 2024
pc64: use chain of IDIVQ for delayloop() (former aamloop()) On modern machines, doing a empty loop is too fast, resulting in us using the maximum loopconst of 1000000 and getting wrong delay() timings. To fix the timings, use a chain of IDIVQ instructions instead. The loop timings is going to be measured using the TSC, so the exact timing doesnt need to be known. Rename aamloop() to delayloop() as it does different things depending on 386 or amd64.