What does SPARC_WORK define mean?

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Sep 11 19:48:30 UTC 2017


SPARC_WORKS is defined by Sun/Oracle Studio native compilers. Changes 
were added with this:

http://hg.openjdk.java.net/jdk10/hs/hotspot/rev/485d403e94e1

Vladimir

On 9/11/17 11:58 AM, Dmitry Samersoff wrote:
> Everybody,
> 
> Actually %subj%:
> 
> What does SPARC_WORKS define mean and why we have it in os_linux_x86.cpp ?
> 
> Could we narrow function below[1] to just
> 
>    intptr_t **ebp;
>    __asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):);
> 
> that works for both gcc and clang?
> 
> 
> 1.
> static intptr_t* _get_previous_fp() {
> #ifdef SPARC_WORKS
>    register intptr_t **ebp;
>    __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
> #elif defined(__clang__)
>    intptr_t **ebp;
>    __asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):);
> #else
>    register intptr_t **ebp __asm__ (SPELL_REG_FP);
> #endif
> 
>    return *ebp;
> }
> 
> -Dmitry
> 
> 


More information about the hotspot-runtime-dev mailing list