mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
Fixed overflow issue. Code originally meant to truncate the 64 bit integer did not work as assembler doesn't "cast" variables like C does. get_cycles() was passing the memory address of a 32 bit unsigned int to the x86 call which required 64 bits of storage space. The extra 32 bits corrupted whatever was on the stack next to the variable.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3791 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8623302340
commit
5315c64acf
1 changed files with 2 additions and 2 deletions
|
|
@ -48,10 +48,10 @@ extern cycles_t cacheflush_time;
|
|||
|
||||
static inline cycles_t get_cycles (void)
|
||||
{
|
||||
uint32_t long ret;
|
||||
cycles_t long ret;
|
||||
|
||||
rdtscll(ret);
|
||||
return ret;
|
||||
return ret & 0xffffffff;
|
||||
}
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue