uber / nanoscope-art

Apache License 2.0
49 stars 13 forks source link

Ensure that tbclk is read every time we call `generic_time_count()` #6

Closed AttwellBrian closed 6 years ago

AttwellBrian commented 6 years ago

I noticed that there are circumstances where calling generic_timer_count() will result in the tbclk register not being reread. This is because of compiler optimizations. Using the volatile asm statement prevents this.