Mercurial > hg > graal-compiler
comparison src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | b9a918201d47 2cb5d5f6d5e5 |
children | 6b0fd0964b87 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
91 address os::current_stack_pointer() { | 91 address os::current_stack_pointer() { |
92 #ifdef SPARC_WORKS | 92 #ifdef SPARC_WORKS |
93 register void *esp; | 93 register void *esp; |
94 __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp)); | 94 __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp)); |
95 return (address) ((char*)esp + sizeof(long)*2); | 95 return (address) ((char*)esp + sizeof(long)*2); |
96 #elif defined(__clang__) | |
97 intptr_t* esp; | |
98 __asm__ __volatile__ ("mov %%"SPELL_REG_SP", %0":"=r"(esp):); | |
99 return (address) esp; | |
96 #else | 100 #else |
97 register void *esp __asm__ (SPELL_REG_SP); | 101 register void *esp __asm__ (SPELL_REG_SP); |
98 return (address) esp; | 102 return (address) esp; |
99 #endif | 103 #endif |
100 } | 104 } |
173 | 177 |
174 intptr_t* _get_previous_fp() { | 178 intptr_t* _get_previous_fp() { |
175 #ifdef SPARC_WORKS | 179 #ifdef SPARC_WORKS |
176 register intptr_t **ebp; | 180 register intptr_t **ebp; |
177 __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); | 181 __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); |
182 #elif defined(__clang__) | |
183 intptr_t **ebp; | |
184 __asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):); | |
178 #else | 185 #else |
179 register intptr_t **ebp __asm__ (SPELL_REG_FP); | 186 register intptr_t **ebp __asm__ (SPELL_REG_FP); |
180 #endif | 187 #endif |
181 return (intptr_t*) *ebp; // we want what it points to. | 188 return (intptr_t*) *ebp; // we want what it points to. |
182 } | 189 } |
708 int rslt = pthread_getattr_np(pthread_self(), &attr); | 715 int rslt = pthread_getattr_np(pthread_self(), &attr); |
709 | 716 |
710 // JVM needs to know exact stack location, abort if it fails | 717 // JVM needs to know exact stack location, abort if it fails |
711 if (rslt != 0) { | 718 if (rslt != 0) { |
712 if (rslt == ENOMEM) { | 719 if (rslt == ENOMEM) { |
713 vm_exit_out_of_memory(0, "pthread_getattr_np"); | 720 vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "pthread_getattr_np"); |
714 } else { | 721 } else { |
715 fatal(err_msg("pthread_getattr_np failed with errno = %d", rslt)); | 722 fatal(err_msg("pthread_getattr_np failed with errno = %d", rslt)); |
716 } | 723 } |
717 } | 724 } |
718 | 725 |