1! 2! CDDL HEADER START 3! 4! The contents of this file are subject to the terms of the 5! Common Development and Distribution License, Version 1.0 only 6! (the "License"). You may not use this file except in compliance 7! with the License. 8! 9! You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10! or http://www.opensolaris.org/os/licensing. 11! See the License for the specific language governing permissions 12! and limitations under the License. 13! 14! When distributing Covered Code, include this CDDL HEADER in each 15! file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16! If applicable, add the following below this CDDL HEADER, with the 17! fields enclosed by brackets "[]" replaced with your own identifying 18! information: Portions Copyright [yyyy] [name of copyright owner] 19! 20! CDDL HEADER END 21! 22! "%Z%%M% %I% %E% SMI" 23! Copyright (c) 1986 by Sun Microsystems, Inc. 24! 25! Note this routine used to be called cerror, the 26! file name will not change for now. We might go 27! back to the old name. 28 29! .seg "text" 30 31#include "SYS.h" 32 33! .seg "text" 34 .global .cerror 35 .global errno 36 37 ENTRY(.cerror) 38#ifdef PIC 39 PIC_SETUP(o5) 40 ld [%o5 + errno], %g1 41 st %o0, [%g1] 42#else 43 sethi %hi(errno), %g1 44 st %o0, [%g1 + %lo(errno)] 45#endif 46 save %sp, -SA(MINFRAME), %sp 47 call maperror,0 48 nop 49 ret 50 restore %g0, -1, %o0 51 52 SET_SIZE(.cerror) 53