1 | /*
|
---|
2 | * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved.
|
---|
3 | *
|
---|
4 | * Licensed under the OpenSSL license (the "License"). You may not use
|
---|
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 |
|
---|
10 | #ifndef OSSL_CRYPTO_MIPS_ARCH_H
|
---|
11 | # define OSSL_CRYPTO_MIPS_ARCH_H
|
---|
12 |
|
---|
13 | # if (defined(__mips_smartmips) || defined(_MIPS_ARCH_MIPS32R3) || \
|
---|
14 | defined(_MIPS_ARCH_MIPS32R5) || defined(_MIPS_ARCH_MIPS32R6)) \
|
---|
15 | && !defined(_MIPS_ARCH_MIPS32R2)
|
---|
16 | # define _MIPS_ARCH_MIPS32R2
|
---|
17 | # endif
|
---|
18 |
|
---|
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
|
---|