1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #if defined(__arm__) // nacl_irt_icache is supported only on ARM.
8 #include <sys/syscall.h>
11 #include "components/nacl/loader/nonsfi/irt_interfaces.h"
18 // TODO(mazda): Revisit the implementation to consider inlining the syscall
19 // with assembly when Non-SFI mode's IRT implementations get moved to the
21 int IrtClearCache(void* addr
, size_t size
) {
22 // The third argument of cacheflush is just ignored for now and should
24 int result
= syscall(__ARM_NR_cacheflush
,
25 addr
, reinterpret_cast<intptr_t>(addr
) + size
, 0);
33 const nacl_irt_icache kIrtIcache
= {