diff options
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/ia64')
73 files changed, 239 insertions, 154 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/Makefile b/ports/sysdeps/unix/sysv/linux/ia64/Makefile index d9a35a7c67..bbfd6a2392 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/Makefile +++ b/ports/sysdeps/unix/sysv/linux/ia64/Makefile @@ -10,6 +10,7 @@ endif ifeq ($(subdir),misc) sysdep_headers += sys/io.h sysdep_routines += ioperm clone2 +gen-as-const-headers += sigaltstack-offsets.sym endif ifeq ($(subdir),elf) diff --git a/ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S index f4ce5d3a3c..6025bf609c 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2013 Free Software Foundation, Inc. +/* Copyright (C) 2009-2014 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 @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <sigaltstack-offsets.h> + .section .rodata.str1.8,"aMS",@progbits,1 .align 8 .LC0: @@ -29,13 +31,58 @@ longjmp_msg: #define __longjmp ____longjmp_chk -#define CHECK_RSP(reg) \ - cmp.ltu p0, p8 = reg, r12; \ -(p8) br.cond.dpnt .Lok;; \ - addl r28 = @ltoffx(longjmp_msg#), r1;; \ - ld8.mov r28 = [r28], longjmp_msg#;; \ - ld8 out0 = [r28]; \ +/* We use 32 bytes (rather than sizeof(stack_t)) so that we keep the stack + properly aligned. But we still want a sanity check to make sure 32 is + actually enough. */ +#define STACK_SPACE ((sizeSS + 31) & -32) + +/* Check the stack pointer held in the jumpbuf. Make sure it's in either the + current stack (r12) or in the signal stack. */ +#define CHECK_RSP \ + ld8 loc0 = [in0]; \ + ;; \ + /* First see if target stack is within current one. */ \ + cmp.ltu p0, p8 = loc0, r12; \ +(p8) br.cond.dptk.many .Lok; \ + \ + /* Check if it's an alternative signal stack. */ \ + mov out0 = r0; \ + add out1 = -STACK_SPACE, r12; \ + ;; \ + mov r12 = out1; \ + DO_CALL_VIA_BREAK (SYS_ify (sigaltstack)); \ + ;; \ + /* If the syscall failed, then assume it's OK. */ \ + cmp.eq p8, p0 = -1, r10; \ +(p8) br.cond.spnt .Lok; \ + /* Move stack_t into regs. */ \ + add r14 = oSS_FLAGS, r12; /* ss_flags */ \ + add r15 = oSS_SIZE, r12; /* ss_size */ \ + ld8 r16 = [r12]; /* ss_sp */ \ + ;; \ + ld4 r17 = [r14]; /* ss_flags */ \ + ld8 r18 = [r15]; /* ss_size */ \ + ;; \ + sub r19 = r16, r18; /* sp - size */ \ + /* See if we're currently on the altstack. */ \ + tbit.nz p0, p8 = r17, 0; /* SS_ONSTACK */ \ +(p8) br.cond.spnt .Lfail; \ + /* Verify target is within alternative stack. */ \ + cmp.gtu p7, p0 = loc0, r16; \ +(p7) br.cond.spnt .Lfail; \ + ;; \ + cmp.ltu p0, p8 = loc0, r19; \ +(p8) br.cond.sptk.many .Lok; \ + ;; \ + \ + /* Still here? Abort! */ \ +.Lfail: \ + add r12 = STACK_SPACE, r12; \ + addl loc0 = @ltoffx(longjmp_msg#), r1;; \ + ld8.mov loc0 = [loc0], longjmp_msg#;; \ + ld8 out0 = [loc0]; \ br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \ -.Lok: +.Lok: \ + add r12 = STACK_SPACE, r12; #include "__longjmp.S" diff --git a/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S index 8a70ae2c2a..f4d67e79d5 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. The GNU C Library is free software; you can redistribute it and/or @@ -42,9 +42,10 @@ LEAF(__longjmp) #ifdef CHECK_RSP - alloc r8=ar.pfs,2,1,1,0 + alloc r8=ar.pfs,2,1,3,0 + CHECK_RSP #else - alloc r8=ar.pfs,2,1,0,0 + alloc r8=ar.pfs,2,0,0,0 #endif mov r27=ar.rsc add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr @@ -79,15 +80,12 @@ LEAF(__longjmp) mov r26=ar.rnat mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12) ;; -#ifdef CHECK_RSP - CHECK_RSP (r28) -#endif - ld8.fill.nta gp=[r3],16 // r1 (gp) + ld8.fill.nta gp=[r3],32 // r1 (gp) dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) mov sp=r28 // r12 (sp) ;; ld8.nta r16=[r2],16 // caller's unat - ld8.nta r17=[r3],16 // fpsr +// ld8.nta r17=[r3],16 // fpsr ;; ld8.fill.nta r4=[r2],16 // r4 ld8.fill.nta r5=[r3],16 // r5 (gp) @@ -97,7 +95,7 @@ LEAF(__longjmp) ld8.fill.nta r7=[r3],16 // r7 ;; mov ar.unat=r16 // restore caller's unat - mov ar.fpsr=r17 // restore fpsr +// mov ar.fpsr=r17 // restore fpsr ;; ld8.nta r16=[r2],16 // b0 ld8.nta r17=[r3],16 // b1 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/__start_context.S b/ports/sysdeps/unix/sysv/linux/ia64/__start_context.S index b946a957fc..8914f5dd93 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/__start_context.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/__start_context.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index b4fbbd9f5a..70e809c811 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/IA64. - Copyright (C) 1999-2013 Free Software Foundation, Inc. + Copyright (C) 1999-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h index fb78b5bcf0..e60189315a 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h index c3b1caf9d2..653d8e9fca 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ia64 version. - Copyright (C) 1997-2013 Free Software Foundation, Inc. + Copyright (C) 1997-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h index f3f9f75a5a..004d2ac770 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contribute by David Mosberger-Tang <davidm@hpl.hp.com> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h index 998ba85ef7..45950f162d 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/sem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h index eeafc200a1..76e771f9a4 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version. - Copyright (C) 1999-2013 Free Software Foundation, Inc. + Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h index a6c0910f74..3923925a6d 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h index 63fdec9118..39478711cc 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h @@ -1,5 +1,5 @@ /* Definitions for Linux/ia64 sigaction. - Copyright (C) 1996-2013 Free Software Foundation, Inc. + Copyright (C) 1996-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h index 3b8e4a7d82..d11c1f17f6 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2013 Free Software Foundation, Inc. +/* Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jes Sorensen <jes@linuxcare.com>, July 2000 @@ -27,7 +27,7 @@ #include <stddef.h> #include <bits/sigstack.h> -struct ia64_fpreg +struct __ia64_fpreg { union { @@ -55,7 +55,7 @@ struct sigcontext unsigned long int sc_pr; /* predicate registers */ unsigned long int sc_br[8]; /* branch registers */ unsigned long int sc_gr[32]; /* general registers (static partition) */ - struct ia64_fpreg sc_fr[128]; /* floating-point registers */ + struct __ia64_fpreg sc_fr[128]; /* floating-point registers */ unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */ unsigned long int sc_loadrs; /* see description above */ unsigned long int sc_ar25; /* cmp8xchg16 uses this */ diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h index 5fa97b5d59..bf62112270 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux/ia64 version. - Copyright (C) 2000-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h index b427ea7696..a540da5bcf 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - Copyright (C) 1998-2013 Free Software Foundation, Inc. + Copyright (C) 1998-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h index d984dc4477..818e7bd79e 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/brk.S b/ports/sysdeps/unix/sysv/linux/ia64/brk.S index db6f962a0a..1a5525b109 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/brk.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/brk.S @@ -1,5 +1,5 @@ /* brk system call for Linux/ia64 - Copyright (C) 1999-2013 Free Software Foundation, Inc. + Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Stephane Eranian <eranian@hpl.hp.com> and Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/clone2.S b/ports/sysdeps/unix/sysv/linux/ia64/clone2.S index 39df6163c1..f857a746d4 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/clone2.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h index cd831d521a..5c271a28cb 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/dl-cache.h @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 2000-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/dl-static.c b/ports/sysdeps/unix/sysv/linux/ia64/dl-static.c index 9853253dcf..51fa79633f 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/dl-static.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/dl-static.c @@ -1,5 +1,5 @@ /* Variable initialization. IA-64 version. - Copyright (C) 2001-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/fork.S b/ports/sysdeps/unix/sysv/linux/ia64/fork.S index cd8b6d8df3..496d0b7eff 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/fork.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/fork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c index 0a8c9c8f6a..d69a2e8a4e 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c @@ -1,5 +1,5 @@ /* Get frequency of the system processor. IA-64/Linux version. - Copyright (C) 2001-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/getcontext.S b/ports/sysdeps/unix/sysv/linux/ia64/getcontext.S index f3410ab60e..a9d23382e6 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/getcontext.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/getcontext.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c index 8c2a60bc73..282b2c5c8c 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c index 7fb3b928cb..d9e1d353b3 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/ioperm.c b/ports/sysdeps/unix/sysv/linux/ia64/ioperm.c index 83fc557f44..f2e5418d54 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/ioperm.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/ioperm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. @@ -59,11 +59,7 @@ io_offset (unsigned long int port) int _ioperm (unsigned long int from, unsigned long int num, int turn_on) { -#if 0 - unsigned long int addr, len, base; -#endif unsigned long int base; - int prot; /* this test isn't as silly as it may look like; consider overflows! */ if (from >= MAX_PORT || from + num > MAX_PORT) @@ -91,14 +87,9 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) return -1; len = io_offset (MAX_PORT); -#if 1 /* see comment below */ base = (unsigned long int) __mmap (0, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, phys_io_base); -#else - base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, - fd, phys_io_base); -#endif __close (fd); if ((long) base == -1) @@ -106,25 +97,19 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on) io.base = base; } - prot = PROT_READ | PROT_WRITE; } else { if (!io.base) return 0; /* never was turned on... */ - - prot = PROT_NONE; } -#if 0 + /* We can't do mprotect because that would cause us to lose the uncached flag that the /dev/mem driver turned on. A MAP_UNCACHED - flag seems so much cleaner... */ - addr = (io.base + io_offset (from)) & io.page_mask; - len = io.base + io_offset (from + num) - addr; - return mprotect ((void *) addr, len, prot); -#else + flag seems so much cleaner... + + See the history of this file for a version that tried mprotect. */ return 0; -#endif } int diff --git a/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h index 62024dfe85..340f679320 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2010-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h b/ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h index 603bfcb44a..a34bea5881 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/kernel_stat.h @@ -1,5 +1,5 @@ /* Definition of `struct stat' used in the kernel. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h b/ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h index 2c260e8d19..94dcee6e1f 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/ldconfig.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h index 1c35c9af24..5fdca2d579 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. IA64. - Copyright (C) 2001-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c b/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c index c3bb5de197..67ba3e0d6c 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S index 41cc303c29..274f7588d5 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__ia64_longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. The GNU C Library is free software; you can redistribute it and/or @@ -75,11 +75,11 @@ LEAF(__ia64_longjmp) mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12) ;; ld8.fill.nta sp=[r2],16 // r12 (sp) - ld8.fill.nta gp=[r3],16 // r1 (gp) + ld8.fill.nta gp=[r3],32 // r1 (gp) dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp) ;; ld8.nta r16=[r2],16 // caller's unat - ld8.nta r17=[r3],16 // fpsr +// ld8.nta r17=[r3],16 // fpsr ;; ld8.fill.nta r4=[r2],16 // r4 ld8.fill.nta r5=[r3],16 // r5 (gp) @@ -88,7 +88,7 @@ LEAF(__ia64_longjmp) ld8.fill.nta r7=[r3],16 // r7 ;; mov ar.unat=r16 // restore caller's unat - mov ar.fpsr=r17 // restore fpsr +// mov ar.fpsr=r17 // restore fpsr ;; ld8.nta r16=[r2],16 // b0 ld8.nta r17=[r3],16 // b1 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c index 9d263f2852..8c6a85b3a9 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/__sigstack_longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2013 Free Software Foundation, Inc. +/* Copyright (C) 2004-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h index c1af6db0de..4278c09bb0 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/IA-64 version. - Copyright (C) 1993-2013 Free Software Foundation, Inc. + Copyright (C) 1993-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h index adc8b30da5..b77b80ab22 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h index e306c7b88e..a29b20ef13 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c index 1798cda2c1..a2d5dec040 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/createthread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h index 886a4f0e50..64c6ecd4bc 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c index 9f4865f419..a6d319a439 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h index cd36f958cf..0105972b40 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -38,6 +38,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -89,6 +91,17 @@ _r10 == -1 ? -_retval : _retval; \ }) +#define lll_futex_timed_wait_bitset(ftx, val, timespec, clockbit, private) \ +({ \ + int __op = FUTEX_WAIT_BITSET | (clockbit); \ + \ + DO_INLINE_SYSCALL(futex, 4, (long) (ftx), \ + __lll_private_flag (__op, private), \ + (int) (val), (long) (timespec), NULL /* Unused. */, \ + FUTEX_BITSET_MATCH_ANY); \ + _r10 == -1 ? -_retval : _retval; \ +}) + #define lll_futex_wake(ftx, nr, private) \ ({ \ DO_INLINE_SYSCALL(futex, 3, (long) (ftx), \ @@ -127,6 +140,29 @@ while (0) _r10 == -1; \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ +({ \ + int __op = FUTEX_WAIT_REQUEUE_PI | (clockbit); \ + \ + DO_INLINE_SYSCALL(futex, 5, (long) (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + _r10 == -1; \ +}) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ +({ \ + DO_INLINE_SYSCALL(futex, 6, (long) (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv), \ + (nr_wake), (nr_move), (mutex), (val)); \ + _r10 == -1 ? -_retval : _retval; \ +}) + #define __lll_trylock(futex) \ (atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0) diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S index 1a012dbe5f..59b5b7a704 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pt-vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c index 5879f44fed..a231e55879 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h index c133baf54e..5b08748949 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/sysdep-cancel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c index 8562afda6f..dd5229458b 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c index 371569e94b..0b55598e85 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/unwind_longjmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2013 Free Software Foundation, Inc. +/* Copyright (C) 1991-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S index 215632ac98..f1ca305554 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/pipe.S b/ports/sysdeps/unix/sysv/linux/ia64/pipe.S index 0678f5fc83..1ee559bced 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/pipe.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/pipe.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger <davidm@hpl.hp.com> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h index be95f788ef..1bd5c218ca 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/profil-counter.h @@ -1,5 +1,5 @@ /* Machine-dependent SIGPROF signal handler. IA-64 version. - Copyright (C) 1996-2013 Free Software Foundation, Inc. + Copyright (C) 1996-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/readelflib.c b/ports/sysdeps/unix/sysv/linux/ia64/readelflib.c index 025a8de209..067cb24bd2 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/readelflib.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/register-dump.h b/ports/sysdeps/unix/sysv/linux/ia64/register-dump.h index 4a900dbdb1..564175caee 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/register-dump.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2004-2013 Free Software Foundation, Inc. + Copyright (C) 2004-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2004. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/setcontext.S b/ports/sysdeps/unix/sysv/linux/ia64/setcontext.S index 4351267ba3..7c45e0fdca 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/setcontext.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/setcontext.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S b/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S index a8d06cc779..c93fba5d57 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. The GNU C Library is free software; you can redistribute it and/or @@ -20,48 +20,48 @@ jmp_buf! - offset: description: + offset: description: ------- ------------ - 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS) - 0x008 r1 (gp) + 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS) + 0x008 r1 (gp) 0x010 caller's unat - 0x018 fpsr - 0x020 r4 - 0x028 r5 - 0x030 r6 - 0x038 r7 - 0x040 rp (b0) - 0x048 b1 - 0x050 b2 - 0x058 b3 - 0x060 b4 - 0x068 b5 - 0x070 ar.pfs - 0x078 ar.lc - 0x080 pr - 0x088 ar.bsp ; unchangeable (see __longjmp.S) - 0x090 ar.unat + 0x018 fpsr ; disabled per the C standard; BZ 16379 + 0x020 r4 + 0x028 r5 + 0x030 r6 + 0x038 r7 + 0x040 rp (b0) + 0x048 b1 + 0x050 b2 + 0x058 b3 + 0x060 b4 + 0x068 b5 + 0x070 ar.pfs + 0x078 ar.lc + 0x080 pr + 0x088 ar.bsp ; unchangeable (see __longjmp.S) + 0x090 ar.unat 0x098 &__jmp_buf ; address of the jmpbuf (needed to locate NaT bits in unat) 0x0a0 f2 0x0b0 f3 0x0c0 f4 0x0d0 f5 0x0e0 f16 - 0x0f0 f17 - 0x100 f18 - 0x110 f19 - 0x120 f20 - 0x130 f21 - 0x130 f22 - 0x140 f23 - 0x150 f24 - 0x160 f25 - 0x170 f26 - 0x180 f27 - 0x190 f28 - 0x1a0 f29 - 0x1b0 f30 - 0x1c0 f31 */ + 0x0f0 f17 + 0x100 f18 + 0x110 f19 + 0x120 f20 + 0x130 f21 + 0x130 f22 + 0x140 f23 + 0x150 f24 + 0x160 f25 + 0x170 f26 + 0x180 f27 + 0x190 f28 + 0x1a0 f29 + 0x1b0 f30 + 0x1c0 f31 */ #include <sysdep.h> #include <features.h> @@ -71,13 +71,13 @@ LEAF(setjmp) alloc r8=ar.pfs,2,0,0,0 mov in1=1 - br.cond.sptk.many _GI___sigsetjmp + br.cond.sptk.many HIDDEN_JUMPTARGET(__sigsetjmp) END(setjmp) LEAF(_setjmp) alloc r8=ar.pfs,2,0,0,0 mov in1=0 - br.cond.sptk.many _GI___sigsetjmp + br.cond.sptk.many HIDDEN_JUMPTARGET(__sigsetjmp) END(_setjmp) libc_hidden_def (_setjmp) @@ -89,15 +89,15 @@ ENTRY(__sigsetjmp) .save ar.unat, loc2 mov loc2=ar.unat ;; - mov r17=ar.fpsr +// mov r17=ar.fpsr mov r2=in0 add r3=8,in0 ;; .mem.offset 8,0; st8.spill.nta [r2]=sp,16 // r12 (sp) -.mem.offset 0,0; st8.spill.nta [r3]=gp,16 // r1 (gp) +.mem.offset 0,0; st8.spill.nta [r3]=gp,32 // r1 (gp) ;; st8.nta [r2]=loc2,16 // save caller's unat - st8.nta [r3]=r17,16 // save fpsr +// st8.nta [r3]=r17,16 // save fpsr add r8=0xa0,in0 ;; .mem.offset 8,0; st8.spill.nta [r2]=r4,16 // r4 @@ -191,7 +191,8 @@ ENTRY(__sigsetjmp) mov r8=0 ret END(__sigsetjmp) -strong_alias(__sigsetjmp, _GI___sigsetjmp) +libc_hidden_def (__sigsetjmp) +rtld_hidden_def (__sigsetjmp) weak_extern(_setjmp) weak_extern(setjmp) diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c b/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c index 664d0e12b9..97f7f499be 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2013 Free Software Foundation, Inc. +/* Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Linux/IA64 specific sigaction Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigaltstack-offsets.sym b/ports/sysdeps/unix/sysv/linux/ia64/sigaltstack-offsets.sym new file mode 100644 index 0000000000..f73446941a --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigaltstack-offsets.sym @@ -0,0 +1,13 @@ +#include <stddef.h> +#include <signal.h> + +-- + +#define sigaltstack(member) offsetof (stack_t, member) + +sizeSS sizeof (stack_t) +oSS_SP sigaltstack (ss_sp) +oSS_FLAGS sigaltstack (ss_flags) +oSS_SIZE sigaltstack (ss_size) + +SS_ONSTACK diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h index d1e468e17d..e0342a1a5b 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c b/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c index 42fce5022a..0529666293 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigpending.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2013 Free Software Foundation, Inc. +/* Copyright (C) 1997-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c b/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c index 53b85800b2..f21002d3cb 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigprocmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2013 Free Software Foundation, Inc. +/* Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Linux/IA64 specific sigprocmask Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c b/ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c index 718d1502e4..0227e6cd52 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/swapcontext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/io.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/io.h index 36d36560e9..dd69c0f4b9 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/io.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/io.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h index 29d1c42a61..0c431fbfcf 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 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 @@ -46,7 +46,7 @@ struct elf_siginfo typedef unsigned long elf_greg_t; typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -typedef struct ia64_fpreg elf_fpreg_t; +typedef struct __ia64_fpreg elf_fpreg_t; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; typedef elf_greg_t greg_t; diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h index d6f390841f..f67798a99b 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ia64 version. - Copyright (C) 2001-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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 @@ -144,7 +144,7 @@ enum __ptrace_flags }; /* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */ -struct pt_all_user_regs +struct __pt_all_user_regs { unsigned long nat; unsigned long cr_iip; @@ -155,7 +155,7 @@ struct pt_all_user_regs unsigned long gr[32]; unsigned long br[8]; unsigned long ar[128]; - struct ia64_fpreg fr[128]; + struct __ia64_fpreg fr[128]; }; /* Options set using PTRACE_SETOPTIONS. */ @@ -185,7 +185,7 @@ enum __ptrace_eventcodes }; /* Arguments for PTRACE_PEEKSIGINFO. */ -struct ptrace_peeksiginfo_args +struct __ptrace_peeksiginfo_args { __uint64_t off; /* From which siginfo to start. */ __uint32_t flags; /* Flags for peeksiginfo. */ diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h index abcd14686c..e6f85f91a2 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/rse.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h index 8ec28d5fd4..0dc562e713 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2013 Free Software Foundation, Inc. +/* Copyright (C) 1998-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h index 535079abad..afc939a5ae 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/syscall.S b/ports/sysdeps/unix/sysv/linux/ia64/syscall.S index 8bb77d255c..826f14cbd2 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/syscall.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jes Sorensen <Jes.Sorensen@cern.ch>. @@ -19,6 +19,10 @@ #include <sysdep.h> ENTRY(syscall) + /* We are called like so: + {out0,out1,...,out6} registers -> {NR, arg1, ..., arg6} + Shift the register window so that {out1...out6} are available + in {out0...out5} like the kernel syscall handler expects. */ alloc r2=ar.pfs,1,0,8,0 mov r15=r32 /* syscall number */ break __BREAK_SYSCALL diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sysconf.c b/ports/sysdeps/unix/sysv/linux/ia64/sysconf.c index c19fa7d0ad..d6be7ba1d3 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sysconf.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/sysconf.c @@ -1,5 +1,5 @@ /* Get file-specific information about a file. Linux/ia64 version. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.S b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.S index 3bef5a0283..004ade1627 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h index 96f6a4e8a5..4b732632d6 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2013 Free Software Foundation, Inc. +/* Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. Based on code originally written by David Mosberger-Tang diff --git a/ports/sysdeps/unix/sysv/linux/ia64/system.c b/ports/sysdeps/unix/sysv/linux/ia64/system.c index 5be2385f02..7ac8afcb8d 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/system.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/system.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h index f6dff999a0..72b462e643 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/ucontext_i.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/umount.c b/ports/sysdeps/unix/sysv/linux/ia64/umount.c index a3df7863fa..31a8090155 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/umount.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/umount.c @@ -1,5 +1,5 @@ /* umount system call for Linux/ia64. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/vfork.S b/ports/sysdeps/unix/sysv/linux/ia64/vfork.S index e59a7802d4..0422104b45 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/ia64/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/ports/sysdeps/unix/sysv/linux/ia64/wordexp.c b/ports/sysdeps/unix/sysv/linux/ia64/wordexp.c index 1c486db0b0..c55658446a 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/wordexp.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/wordexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 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 |