comparison src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @ 4893:5e9fba4e8718

7142167: MAC: _get_previous_fp broken on bsd with llvm-gcc Summary: LLVM-GCC (__llvm__) should use the same _get_previous_fp implementation as __clang__ (as is the case for os::current_stack_pointer). Reviewed-by: twisti, never, dcubed
author kvn
date Tue, 07 Feb 2012 11:33:15 -0800
parents 436b4a3231bf
children da4be62fb889
comparison
equal deleted inserted replaced
4888:3c4621be5149 4893:5e9fba4e8718
1 /* 1 /*
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
360 frame os::get_sender_for_C_frame(frame* fr) { 360 frame os::get_sender_for_C_frame(frame* fr) {
361 return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); 361 return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
362 } 362 }
363 363
364 intptr_t* _get_previous_fp() { 364 intptr_t* _get_previous_fp() {
365 #if defined(SPARC_WORKS) || defined(__clang__) 365 #if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__)
366 register intptr_t **ebp; 366 register intptr_t **ebp;
367 __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); 367 __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
368 #else 368 #else
369 register intptr_t **ebp __asm__ (SPELL_REG_FP); 369 register intptr_t **ebp __asm__ (SPELL_REG_FP);
370 #endif 370 #endif