diff src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @ 4006:436b4a3231bf

7098194: integrate macosx-port changes Summary: Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29. Reviewed-by: kvn, dholmes, never, phh Contributed-by: Christos Zoulas <christos@zoulas.com>, Greg Lewis <glewis@eyesbeyond.com>, Kurt Miller <kurt@intricatesoftware.com>, Alexander Strange <astrange@apple.com>, Mike Swingler <swingler@apple.com>, Roger Hoover <rhoover@apple.com>, Victor Hernandez <vhernandez@apple.com>, Pratik Solanki <psolanki@apple.com>
author dcubed
date Thu, 13 Oct 2011 09:35:42 -0700
parents f08d439fab8c
children 5e9fba4e8718
line wrap: on
line diff
--- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Mon Oct 10 21:01:36 2011 -0400
+++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Thu Oct 13 09:35:42 2011 -0700
@@ -275,7 +275,11 @@
 #endif
 
 address os::current_stack_pointer() {
-#ifdef SPARC_WORKS
+#if defined(__clang__) || defined(__llvm__)
+  register void *esp;
+  __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
+  return (address) esp;
+#elif defined(SPARC_WORKS)
   register void *esp;
   __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
   return (address) ((char*)esp + sizeof(long)*2);
@@ -358,7 +362,7 @@
 }
 
 intptr_t* _get_previous_fp() {
-#ifdef SPARC_WORKS
+#if defined(SPARC_WORKS) || defined(__clang__)
   register intptr_t **ebp;
   __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
 #else