]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/util/ppc-opcode.h
bump version to 15.2.11-pve1
[ceph.git] / ceph / src / rocksdb / util / ppc-opcode.h
1 // Copyright (c) 2017 International Business Machines Corp.
2 // All rights reserved.
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree. An additional grant
5 // of patent rights can be found in the PATENTS file in the same directory.
6 // This source code is also licensed under the GPLv2 license found in the
7 // COPYING file in the root directory of this source tree.
8
9 #pragma once
10
11 #define __PPC_RA(a) (((a)&0x1f) << 16)
12 #define __PPC_RB(b) (((b)&0x1f) << 11)
13 #define __PPC_XA(a) ((((a)&0x1f) << 16) | (((a)&0x20) >> 3))
14 #define __PPC_XB(b) ((((b)&0x1f) << 11) | (((b)&0x20) >> 4))
15 #define __PPC_XS(s) ((((s)&0x1f) << 21) | (((s)&0x20) >> 5))
16 #define __PPC_XT(s) __PPC_XS(s)
17 #define VSX_XX3(t, a, b) (__PPC_XT(t) | __PPC_XA(a) | __PPC_XB(b))
18 #define VSX_XX1(s, a, b) (__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b))
19
20 #define PPC_INST_VPMSUMW 0x10000488
21 #define PPC_INST_VPMSUMD 0x100004c8
22 #define PPC_INST_MFVSRD 0x7c000066
23 #define PPC_INST_MTVSRD 0x7c000166
24
25 #define VPMSUMW(t, a, b) .long PPC_INST_VPMSUMW | VSX_XX3((t), a, b)
26 #define VPMSUMD(t, a, b) .long PPC_INST_VPMSUMD | VSX_XX3((t), a, b)
27 #define MFVRD(a, t) .long PPC_INST_MFVSRD | VSX_XX1((t) + 32, a, 0)
28 #define MTVRD(t, a) .long PPC_INST_MTVSRD | VSX_XX1((t) + 32, a, 0)