2 * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
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
10 #ifndef __MIPS_ARCH_H__
11 # define __MIPS_ARCH_H__
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
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
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)
31 # define mflo(rd,rs,rt) mulu rd,rs,rt
32 # define mfhi(rd,rs,rt) muhu rd,rs,rt
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