1*c5e535c2Salnsn /* $NetBSD: sljit_rump.c,v 1.1 2014/07/22 20:25:13 alnsn Exp $ */
2*c5e535c2Salnsn
3*c5e535c2Salnsn /*-
4*c5e535c2Salnsn * Copyright (c) 2014 Alexander Nasonov.
5*c5e535c2Salnsn * All rights reserved.
6*c5e535c2Salnsn *
7*c5e535c2Salnsn * Redistribution and use in source and binary forms, with or without
8*c5e535c2Salnsn * modification, are permitted provided that the following conditions
9*c5e535c2Salnsn * are met:
10*c5e535c2Salnsn * 1. Redistributions of source code must retain the above copyright
11*c5e535c2Salnsn * notice, this list of conditions and the following disclaimer.
12*c5e535c2Salnsn * 2. Redistributions in binary form must reproduce the above copyright
13*c5e535c2Salnsn * notice, this list of conditions and the following disclaimer in the
14*c5e535c2Salnsn * documentation and/or other materials provided with the distribution.
15*c5e535c2Salnsn *
16*c5e535c2Salnsn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
17*c5e535c2Salnsn * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18*c5e535c2Salnsn * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19*c5e535c2Salnsn * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20*c5e535c2Salnsn * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*c5e535c2Salnsn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22*c5e535c2Salnsn * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*c5e535c2Salnsn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24*c5e535c2Salnsn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*c5e535c2Salnsn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*c5e535c2Salnsn * SUCH DAMAGE.
27*c5e535c2Salnsn */
28*c5e535c2Salnsn
29*c5e535c2Salnsn #include <sys/cdefs.h>
30*c5e535c2Salnsn __KERNEL_RCSID(0, "$NetBSD: sljit_rump.c,v 1.1 2014/07/22 20:25:13 alnsn Exp $");
31*c5e535c2Salnsn
32*c5e535c2Salnsn #ifndef _KERNEL
33*c5e535c2Salnsn
34*c5e535c2Salnsn #include <sys/types.h>
35*c5e535c2Salnsn #include <mips/cachectl.h>
36*c5e535c2Salnsn
37*c5e535c2Salnsn #include "sljit_rump.h"
38*c5e535c2Salnsn
39*c5e535c2Salnsn int
rumpcomp_sync_icache(void * addr,uint64_t len)40*c5e535c2Salnsn rumpcomp_sync_icache(void *addr, uint64_t len)
41*c5e535c2Salnsn {
42*c5e535c2Salnsn
43*c5e535c2Salnsn return _cacheflush(addr, (size_t)len, ICACHE);
44*c5e535c2Salnsn }
45*c5e535c2Salnsn #endif
46