gfx/skia/trunk/src/opts/SkCachePreload_arm.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /*
michael@0 2 * Copyright 2012 The Android Open Source Project
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7 #ifndef SkCachePreload_arm_DEFINED
michael@0 8 #define SkCachePreload_arm_DEFINED
michael@0 9
michael@0 10 // This file defines macros for preload instructions for ARM. These macros
michael@0 11 // are designed to be embedded inside GNU inline assembly.
michael@0 12 // For the use of these macros, __ARM_USE_PLD needs to be enabled. The cache
michael@0 13 // line size also needs to be known (and needs to be contained inside
michael@0 14 // __ARM_CACHE_LINE_SIZE).
michael@0 15 #if defined(__ARM_USE_PLD)
michael@0 16
michael@0 17 #define PLD(x, n) "pld [%["#x"], #("#n")]\n\t"
michael@0 18
michael@0 19 #if __ARM_CACHE_LINE_SIZE == 32
michael@0 20 #define PLD64(x, n) PLD(x, n) PLD(x, (n) + 32)
michael@0 21 #elif __ARM_CACHE_LINE_SIZE == 64
michael@0 22 #define PLD64(x, n) PLD(x, n)
michael@0 23 #else
michael@0 24 #error "unknown __ARM_CACHE_LINE_SIZE."
michael@0 25 #endif
michael@0 26 #else
michael@0 27 // PLD is disabled, all macros become empty.
michael@0 28 #define PLD(x, n)
michael@0 29 #define PLD64(x, n)
michael@0 30 #endif
michael@0 31
michael@0 32 #define PLD128(x, n) PLD64(x, n) PLD64(x, (n) + 64)
michael@0 33
michael@0 34 #endif // SkCachePreload_arm_DEFINED

mercurial