tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

armcpu.h (2830B)


      1 /* Copyright (c) 2010 Xiph.Org Foundation
      2 * Copyright (c) 2013 Parrot */
      3 /*
      4   Redistribution and use in source and binary forms, with or without
      5   modification, are permitted provided that the following conditions
      6   are met:
      7 
      8   - Redistributions of source code must retain the above copyright
      9   notice, this list of conditions and the following disclaimer.
     10 
     11   - Redistributions in binary form must reproduce the above copyright
     12   notice, this list of conditions and the following disclaimer in the
     13   documentation and/or other materials provided with the distribution.
     14 
     15   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     16   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     17   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     18   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
     19   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     20   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     21   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     22   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     23   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     24   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     25   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26 */
     27 
     28 #if !defined(ARMCPU_H)
     29 # define ARMCPU_H
     30 
     31 # if defined(OPUS_ARM_MAY_HAVE_EDSP)
     32 #  define MAY_HAVE_EDSP(name) name ## _edsp
     33 # else
     34 #  define MAY_HAVE_EDSP(name) name ## _c
     35 # endif
     36 
     37 # if defined(OPUS_ARM_MAY_HAVE_MEDIA)
     38 #  define MAY_HAVE_MEDIA(name) name ## _media
     39 # else
     40 #  define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name)
     41 # endif
     42 
     43 # if defined(OPUS_ARM_MAY_HAVE_NEON)
     44 #  define MAY_HAVE_NEON(name) name ## _neon
     45 # else
     46 #  define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name)
     47 # endif
     48 
     49 # if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
     50 #  define MAY_HAVE_DOTPROD(name) name ## _dotprod
     51 # else
     52 #  define MAY_HAVE_DOTPROD(name) MAY_HAVE_NEON(name)
     53 # endif
     54 
     55 # if defined(OPUS_ARM_PRESUME_EDSP)
     56 #  define PRESUME_EDSP(name) name ## _edsp
     57 # else
     58 #  define PRESUME_EDSP(name) name ## _c
     59 # endif
     60 
     61 # if defined(OPUS_ARM_PRESUME_MEDIA)
     62 #  define PRESUME_MEDIA(name) name ## _media
     63 # else
     64 #  define PRESUME_MEDIA(name) PRESUME_EDSP(name)
     65 # endif
     66 
     67 # if defined(OPUS_ARM_PRESUME_NEON)
     68 #  define PRESUME_NEON(name) name ## _neon
     69 # else
     70 #  define PRESUME_NEON(name) PRESUME_MEDIA(name)
     71 # endif
     72 
     73 # if defined(OPUS_ARM_PRESUME_DOTPROD)
     74 #  define PRESUME_DOTPROD(name) name ## _dotprod
     75 # else
     76 #  define PRESUME_DOTPROD(name) PRESUME_NEON(name)
     77 # endif
     78 
     79 # if defined(OPUS_HAVE_RTCD)
     80 int opus_select_arch(void);
     81 
     82 #define OPUS_ARCH_ARM_V4    (0)
     83 #define OPUS_ARCH_ARM_EDSP  (1)
     84 #define OPUS_ARCH_ARM_MEDIA (2)
     85 #define OPUS_ARCH_ARM_NEON  (3)
     86 #define OPUS_ARCH_ARM_DOTPROD  (4)
     87 
     88 # endif
     89 
     90 #endif