Matt Thomas wrote:
> 
> On Jul 22, 2014, at 12:54 PM, Alexander Nasonov <al...@netbsd.org> wrote:
> 
> > Module Name:        src
> > Committed By:       alnsn
> > Date:               Tue Jul 22 19:54:55 UTC 2014
> > 
> > Modified Files:
> >     src/sys/arch/mips/include: sljitarch.h
> > 
> > Log Message:
> > Define SLJIT_CACHE_FLUSH() for mips.
> 
> Actually, this isn't enough.  You need to allocate a page of mapped
> memory as RWX and then when you are done use pmap_protect to change
> it to RX followed by pmap_update() and the pmap will automagically
> sync the page for you.

I allocate with the X flag and it seems to work:

/* in sljitExecAllocator.c */
        return (void *)uvm_km_alloc(module_map, size,
            PAGE_SIZE, UVM_KMF_WIRED | UVM_KMF_ZERO | UVM_KMF_EXEC);

Alex

Reply via email to