]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/mips_arch.h
Correct top for EC/DSA nonces if BN_DEBUG is on
[thirdparty/openssl.git] / crypto / mips_arch.h
CommitLineData
947716c1
AP
1/*
2 * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
0e9725bc 4 * Licensed under the Apache License 2.0 (the "License"). You may not use
947716c1
AP
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
ae4186b0
DMSP
10#ifndef OSSL_CRYPTO_MIPS_ARCH_H
11# define OSSL_CRYPTO_MIPS_ARCH_H
947716c1
AP
12
13# if (defined(__mips_smartmips) || defined(_MIPS_ARCH_MIPS32R3) || \
1b9c5f2e 14 defined(_MIPS_ARCH_MIPS32R5) || defined(_MIPS_ARCH_MIPS32R6)) \
947716c1
AP
15 && !defined(_MIPS_ARCH_MIPS32R2)
16# define _MIPS_ARCH_MIPS32R2
17# endif
609b0852 18
947716c1
AP
19# if (defined(_MIPS_ARCH_MIPS64R3) || defined(_MIPS_ARCH_MIPS64R5) || \
20 defined(_MIPS_ARCH_MIPS64R6)) \
21 && !defined(_MIPS_ARCH_MIPS64R2)
22# define _MIPS_ARCH_MIPS64R2
23# endif
24
25# if defined(_MIPS_ARCH_MIPS64R6)
26# define dmultu(rs,rt)
27# define mflo(rd,rs,rt) dmulu rd,rs,rt
28# define mfhi(rd,rs,rt) dmuhu rd,rs,rt
29# elif defined(_MIPS_ARCH_MIPS32R6)
30# define multu(rs,rt)
31# define mflo(rd,rs,rt) mulu rd,rs,rt
32# define mfhi(rd,rs,rt) muhu rd,rs,rt
33# else
34# define dmultu(rs,rt) dmultu rs,rt
35# define multu(rs,rt) multu rs,rt
36# define mflo(rd,rs,rt) mflo rd
37# define mfhi(rd,rs,rt) mfhi rd
38# endif
39
40#endif