]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
alpha: Tidy up ieee_get/set_fp_control syscalls
authorRichard Henderson <rth@twiddle.net>
Tue, 7 Aug 2012 16:48:05 +0000 (09:48 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 8 Aug 2012 14:44:19 +0000 (07:44 -0700)
ports/ChangeLog.alpha
ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S

index 282900aaf91ccb017af921a2db6f042884d8946d..719fc6a9bf87d02f4e9f6d4833787305f183ae97 100644 (file)
@@ -1,5 +1,10 @@
 2012-08-08  Richard Henderson  <rth@redhat.com>
 
+       * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use dwarf2
+       cfi markup for unwind.  Adjust stack early so that the normal
+       syscall error path can be used.
+       * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
+
        * sysdeps/unix/sysv/linux/alpha/kernel-features.h
        (__ASSUME_STAT64_SYSCALL): Remove.
        * sysdeps/unix/sysv/linux/alpha/fxstat.c: Remove test
index ec24297b0babfa417ef90ac0fe9e2c2a4028764a..74ad499f6d8dc739dc71f568e1655467e97d5bde 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
 
 
        .text
 
-LEAF(__ieee_get_fp_control, 16)
-#ifdef PROF
-       ldgp    gp, 0(pv)
-       lda     sp, -16(sp)
-       .set noat
-       lda     AT, _mcount
-       jsr     AT, (AT), _mcount
-       .set at
-       .prologue 1
-#elif defined PIC
-       lda     sp, -16(sp)
-       .prologue 0
-#else
-       ldgp    gp, 0(pv)
+ENTRY(__ieee_get_fp_control)
+       cfi_startproc
+       PSEUDO_PROLOGUE
+
        lda     sp, -16(sp)
-       .prologue 1
-#endif
+       cfi_adjust_cfa_offset(16)
 
        mov     sp, a1
        ldi     a0, GSI_IEEE_FP_CONTROL
        ldi     v0, __NR_osf_getsysinfo
        call_pal PAL_callsys
-       bne     a3, $error
 
-       ldq     v0, 0(sp)
+       ldq     t0, 0(sp)
        lda     sp, 16(sp)
-       ret
+       cfi_adjust_cfa_offset(-16)
 
-$error:
-       lda     sp, 16(sp)
-       SYSCALL_ERROR_HANDLER
+       bne     a3, SYSCALL_ERROR_LABEL
+
+       mov     t0, v0
+       ret
 
-       END(__ieee_get_fp_control)
+PSEUDO_END(__ieee_get_fp_control)
+       cfi_endproc
 
 libc_hidden_def(__ieee_get_fp_control)
 weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
index 1d425249dafd895888dedcef16afa26d24960d0f..f022b426004d65d93e9023003f7af42ba8064dd1 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
 
 #include "kernel_sysinfo.h"
 
 
-LEAF(__ieee_set_fp_control, 16)
-#ifdef PROF
-       ldgp    gp, 0(pv)
-       lda     sp, -16(sp)
-       .set noat
-       lda     AT, _mcount
-       jsr     AT, (AT), _mcount
-       .set at
-       .prologue 1
-#elif defined PIC
-       lda     sp, -16(sp)
-       .prologue 0
-#else
-       ldgp    gp, 0(pv)
+ENTRY(__ieee_set_fp_control)
+       cfi_startproc
+       PSEUDO_PROLOGUE
+
        lda     sp, -16(sp)
-       .prologue 1
-#endif
+       cfi_adjust_cfa_offset(16)
 
+       ldi     v0, __NR_osf_setsysinfo
        stq     a0, 0(sp)
        mov     sp, a1
        ldi     a0, SSI_IEEE_FP_CONTROL
-       ldi     v0, __NR_osf_setsysinfo
        call_pal PAL_callsys
 
-       bne     a3, $error
-
        lda     sp, 16(sp)
-       ret
+       cfi_adjust_cfa_offset(-16)
 
-$error:
-       lda     sp, 16(sp)
-       SYSCALL_ERROR_HANDLER
+       bne     a3, SYSCALL_ERROR_LABEL
+       ret
 
-       END(__ieee_set_fp_control)
+PSEUDO_END(__ieee_set_fp_control)
+       cfi_endproc
 
 libc_hidden_def(__ieee_set_fp_control)
 weak_alias (__ieee_set_fp_control, ieee_set_fp_control)