2000-06-26 10:25:36 +04:00
|
|
|
/* $NetBSD: brk.S,v 1.7 2000/06/26 06:25:43 kleink Exp $ */
|
1997-05-08 17:38:29 +04:00
|
|
|
|
1993-10-07 03:17:24 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1992 Helsinki University of Technology
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify and distribute this software and its
|
|
|
|
* documentation is hereby granted, provided that both the copyright
|
|
|
|
* notice and this permission notice appear in all copies of the
|
|
|
|
* software, derivative works or modified versions, and any portions
|
|
|
|
* thereof, and that both notices appear in supporting documentation.
|
|
|
|
*
|
|
|
|
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
|
|
|
|
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
|
|
|
|
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
|
|
|
|
* USE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* HISTORY
|
|
|
|
* 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology
|
|
|
|
* Created.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "SYS.h"
|
|
|
|
|
1997-05-08 17:38:29 +04:00
|
|
|
#if defined(LIBC_SCCS)
|
2000-06-26 10:25:36 +04:00
|
|
|
RCSID("$NetBSD: brk.S,v 1.7 2000/06/26 06:25:43 kleink Exp $")
|
1997-05-08 17:38:29 +04:00
|
|
|
#endif
|
1993-10-07 03:17:24 +03:00
|
|
|
|
1999-01-15 01:48:18 +03:00
|
|
|
DATA_D(__minbrk, _C_LABEL(end))
|
1993-10-07 03:17:24 +03:00
|
|
|
|
2000-06-26 10:25:36 +04:00
|
|
|
ENTRY(_brk)
|
1994-05-04 00:39:52 +04:00
|
|
|
PIC_PROLOGUE
|
1999-01-15 01:48:18 +03:00
|
|
|
cmpd PIC_S_ARG0,PIC_GOT(_C_LABEL(__minbrk))
|
1997-05-08 17:38:29 +04:00
|
|
|
bge 0f
|
1999-01-15 01:48:18 +03:00
|
|
|
movd PIC_GOT(_C_LABEL(__minbrk)),PIC_S_ARG0
|
1997-05-08 17:38:29 +04:00
|
|
|
0: PIC_EPILOGUE
|
|
|
|
SYSTRAP(break)
|
|
|
|
bcs _ASM_LABEL(cerror)
|
1994-05-04 00:39:52 +04:00
|
|
|
PIC_PROLOGUE
|
1999-01-15 01:48:18 +03:00
|
|
|
movd PIC_S_ARG0,PIC_GOT(_ASM_LABEL(curbrk))
|
1997-05-08 17:38:29 +04:00
|
|
|
movqd 0,r0
|
1994-05-04 00:39:52 +04:00
|
|
|
PIC_EPILOGUE
|
1993-10-07 03:17:24 +03:00
|
|
|
ret 0
|