Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
ecd6d2bb
Commit
ecd6d2bb
authored
Oct 02, 2012
by
Pedro Gonnet
Browse files
fix timer inlining.
Former-commit-id: 782b63fbcab3d9c09598fc9192bc767f081bb399
parent
75701329
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/cycle.h
View file @
ecd6d2bb
...
...
@@ -171,7 +171,14 @@ INLINE_ELAPSED(__inline__)
#if (defined(__GNUC__) || defined(__ICC)) && defined(__i386__) && !defined(HAVE_TICK_COUNTER)
typedef
unsigned
long
long
ticks
;
static
__inline__
ticks
getticks
(
void
)
#ifndef INLINE
# if __GNUC__ && !__GNUC_STDC_INLINE__
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
INLINE
ticks
getticks
(
void
)
{
ticks
ret
;
...
...
@@ -220,7 +227,14 @@ static __inline double elapsed(ticks t1, ticks t0)
#if (defined(__GNUC__) || defined(__ICC) || defined(__SUNPRO_C)) && defined(__x86_64__) && !defined(HAVE_TICK_COUNTER)
typedef
unsigned
long
long
ticks
;
static
__inline__
ticks
getticks
(
void
)
#ifndef INLINE
# if __GNUC__ && !__GNUC_STDC_INLINE__
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
INLINE
ticks
getticks
(
void
)
{
unsigned
a
,
d
;
asm
volatile
(
"rdtsc"
:
"=a"
(
a
),
"=d"
(
d
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment