[GHC] #8561: Clang/iOS: __builtin___clear_cache doesn't exist in clang, use __clear_cache instead

GHC ghc-devs at haskell.org
Sat Nov 23 22:19:22 UTC 2013


#8561: Clang/iOS: __builtin___clear_cache doesn't exist in clang, use
__clear_cache instead
-------------------------------------+-------------------------------------
        Reporter:  lukexi            |            Owner:
            Type:  bug               |           Status:  new
        Priority:  high              |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Other             |     Architecture:  Unknown/Multiple
 Type of failure:  Building GHC      |       Difficulty:  Easy (less than 1
  failed                             |  hour)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by thoughtpolice):

 A few years ago I helped Mike Pall (of LuaJIT) dig into using the JIT
 component on iOS, which involved finding a way to clear the icache.

 I dug up the code. On Darwin, the trick seems to be
 `sys_icache_invalidate`:

 http://repo.or.cz/w/luajit-2.0.git/blob/HEAD:/src/lj_mcode.c#l31

 I imagine this still works, but I can't test it (I no longer have a
 jailbroken iOS device where the JIT would work.)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8561#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list