fpsetsticky.c revision 1.2
11.2Sscole/*	$NetBSD: fpsetsticky.c,v 1.2 2016/11/22 22:50:32 scole Exp $	*/
21.1Sscole
31.1Sscole/*-
41.1Sscole * Copyright (c) 2016 The NetBSD Foundation, Inc.
51.1Sscole * All rights reserved.
61.1Sscole *
71.1Sscole * Redistribution and use in source and binary forms, with or without
81.1Sscole * modification, are permitted provided that the following conditions
91.1Sscole * are met:
101.1Sscole * 1. Redistributions of source code must retain the above copyright
111.1Sscole *    notice, this list of conditions and the following disclaimer.
121.1Sscole * 2. Redistributions in binary form must reproduce the above copyright
131.1Sscole *    notice, this list of conditions and the following disclaimer in the
141.1Sscole *    documentation and/or other materials provided with the distribution.
151.1Sscole *
161.1Sscole * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
171.1Sscole * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
181.1Sscole * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
191.1Sscole * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
201.1Sscole * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211.1Sscole * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
221.1Sscole * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
231.1Sscole * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
241.1Sscole * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
251.1Sscole * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
261.1Sscole * POSSIBILITY OF SUCH DAMAGE.
271.1Sscole */
281.1Sscole
291.1Sscole#include <sys/cdefs.h>
301.1Sscole
311.1Sscole#include <sys/types.h>
321.1Sscole#include <ieeefp.h>
331.1Sscole
341.1Sscolefp_except_t
351.1Sscolefpsetsticky(fp_except_t sticky)
361.1Sscole{
371.1Sscole  /* XXX implement, pause in ski */
381.2Sscole  __asm __volatile("break.i 1");
391.1Sscole
401.1Sscole  return (fp_except_t)0;
411.1Sscole}
42