提交 53ba5e09 编写于 作者: A Andreas Krebbel 提交者: Martin Schwidefsky

[S390] get_clock inline assembly.

Add missing volatile to the get_clock / get_cycles inline assemblies
to avoid that consecutive calls get optimized away.
Signed-off-by: NAndreas Krebbel <krebbel1@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 13ffa927
...@@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void) ...@@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void)
{ {
cycles_t cycles; cycles_t cycles;
__asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc");
return cycles >> 2; return cycles >> 2;
} }
...@@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void) ...@@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void)
{ {
unsigned long long clk; unsigned long long clk;
__asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc");
return clk; return clk;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册