1285352Sandrew/*- 2285352Sandrew * Copyright (c) 2015 The FreeBSD Foundation 3285352Sandrew * All rights reserved. 4285352Sandrew * 5285352Sandrew * This software was developed by Andrew Turner under 6285352Sandrew * sponsorship from the FreeBSD Foundation. 7285352Sandrew * 8285352Sandrew * Redistribution and use in source and binary forms, with or without 9285352Sandrew * modification, are permitted provided that the following conditions 10285352Sandrew * are met: 11285352Sandrew * 1. Redistributions of source code must retain the above copyright 12285352Sandrew * notice, this list of conditions and the following disclaimer. 13285352Sandrew * 2. Redistributions in binary form must reproduce the above copyright 14285352Sandrew * notice, this list of conditions and the following disclaimer in the 15285352Sandrew * documentation and/or other materials provided with the distribution. 16285352Sandrew * 17285352Sandrew * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18285352Sandrew * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19285352Sandrew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20285352Sandrew * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21285352Sandrew * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22285352Sandrew * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23285352Sandrew * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24285352Sandrew * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25285352Sandrew * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26285352Sandrew * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27285352Sandrew * SUCH DAMAGE. 28285352Sandrew */ 29285352Sandrew 30285352Sandrew#include <machine/asm.h> 31285352Sandrew__FBSDID("$FreeBSD: releng/11.0/lib/libc/aarch64/gen/_ctx_start.S 285352 2015-07-10 08:36:22Z andrew $"); 32285352Sandrew 33285352SandrewENTRY(_ctx_start) 34285352Sandrew blr x19 /* Call func from makecontext */ 35285352Sandrew mov x0, x20 /* Load ucp saved in makecontext */ 36285352Sandrew bl _C_LABEL(ctx_done) 37285352Sandrew bl _C_LABEL(abort) 38285352SandrewEND(_ctx_start) 39