michael@0: /* michael@0: * Copyright 2012 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef SkCachePreload_arm_DEFINED michael@0: #define SkCachePreload_arm_DEFINED michael@0: michael@0: // This file defines macros for preload instructions for ARM. These macros michael@0: // are designed to be embedded inside GNU inline assembly. michael@0: // For the use of these macros, __ARM_USE_PLD needs to be enabled. The cache michael@0: // line size also needs to be known (and needs to be contained inside michael@0: // __ARM_CACHE_LINE_SIZE). michael@0: #if defined(__ARM_USE_PLD) michael@0: michael@0: #define PLD(x, n) "pld [%["#x"], #("#n")]\n\t" michael@0: michael@0: #if __ARM_CACHE_LINE_SIZE == 32 michael@0: #define PLD64(x, n) PLD(x, n) PLD(x, (n) + 32) michael@0: #elif __ARM_CACHE_LINE_SIZE == 64 michael@0: #define PLD64(x, n) PLD(x, n) michael@0: #else michael@0: #error "unknown __ARM_CACHE_LINE_SIZE." michael@0: #endif michael@0: #else michael@0: // PLD is disabled, all macros become empty. michael@0: #define PLD(x, n) michael@0: #define PLD64(x, n) michael@0: #endif michael@0: michael@0: #define PLD128(x, n) PLD64(x, n) PLD64(x, (n) + 64) michael@0: michael@0: #endif // SkCachePreload_arm_DEFINED