summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/brk.S20
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/llseek.S2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/pipe.S2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sigsuspend.S2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/speed.c103
7 files changed, 12 insertions, 121 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 4582539bc1..1c4a4f9217 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -23,17 +23,7 @@ break value (instead of the new, requested one). */
#include <sysdep.h>
#include <errnos.h>
-#ifndef HAVE_GNU_LD
-#define _end end
-#endif
-
- .extern _end,8
-
- .data
-
- .globl __curbrk
-__curbrk:
- .quad _end
+.comm __curbrk, 8
.text
LEAF(__brk, 0)
@@ -42,11 +32,15 @@ LEAF(__brk, 0)
ldi v0, __NR_brk
call_pal PAL_callsys
+
+ /* Correctly handle the brk(0) query case. */
+ cmoveq a0, v0, a0
+
subq a0, v0, t0
bne t0, error
/* Update __curbrk and return cleanly. */
- stl a0, __curbrk
+ stq a0, __curbrk
mov zero, v0
ret
@@ -54,6 +48,6 @@ LEAF(__brk, 0)
error: ldi v0, ENOMEM
jmp zero, syscall_error
- .end __brk
+ END(__brk)
weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index c3486acc1a..52c945aec2 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -41,6 +41,6 @@ error: lda sp, 8(sp)
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __ieee_get_fp_control
+ END(__ieee_get_fp_control)
weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 507b5d5cab..d72585daf1 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -39,6 +39,6 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __ieee_set_fp_control
+ END(__ieee_set_fp_control)
weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index 7f2a49172a..bd8c6595c9 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -46,4 +46,4 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end llseek
+ END(llseek)
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index 40958466a4..b23803cecd 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -37,6 +37,6 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __pipe
+ END(__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 00c02de72b..26a1869783 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -36,4 +36,4 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end sigsuspend
+ END(sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c
deleted file mode 100644
index 40bf6c50bb..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/speed.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* `struct termios' speed frobnication functions. Linux version.
-Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <stddef.h>
-#include <errno.h>
-#include <termios.h>
-
-static const speed_t speeds[] =
- {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- 57600,
- 115200,
- 230400,
- 460800,
- };
-
-
-/* Return the output baud rate stored in *TERMIOS_P. */
-speed_t
-cfgetospeed (termios_p)
- const struct termios *termios_p;
-{
- speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX);
-
- if (retval & CBAUDEX)
- {
- retval &= ~CBAUDEX;
- retval |= CBAUD + 1;
- }
-
- return retval;
-}
-
-/* Return the input baud rate stored in *TERMIOS_P.
- For Linux there is no difference between input and output speed. */
-strong_alias (cfgetospeed, cfgetispeed);
-
-/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
-int
-cfsetospeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
-{
- register unsigned int i;
-
- if (termios_p == NULL)
- {
- errno = EINVAL;
- return -1;
- }
-
- /* This allows either B1200 or 1200 to work. XXX
- Do we really want to try to support this, given that
- fetching the speed must return one or the other? */
-
- for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
- if (i == speed || speeds[i] == speed)
- {
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= (i & CBAUD);
- if (i & ~CBAUD)
- termios_p->c_cflag |= CBAUDEX;
- return 0;
- }
-
- errno = EINVAL;
- return -1;
-}
-
-/* Set the input baud rate stored in *TERMIOS_P to SPEED.
- For Linux there is no difference between input and output speed. */
-strong_alias (cfsetospeed, cfsetispeed);