18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 2009 Freescale Semiconductor, Inc. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * provides masks and opcode images for use by code generation, emulation 68c2ecf20Sopenharmony_ci * and for instructions that older assemblers might not know about 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_PPC_OPCODE_H 98c2ecf20Sopenharmony_ci#define _ASM_POWERPC_PPC_OPCODE_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <asm/asm-const.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define __REG_R0 0 148c2ecf20Sopenharmony_ci#define __REG_R1 1 158c2ecf20Sopenharmony_ci#define __REG_R2 2 168c2ecf20Sopenharmony_ci#define __REG_R3 3 178c2ecf20Sopenharmony_ci#define __REG_R4 4 188c2ecf20Sopenharmony_ci#define __REG_R5 5 198c2ecf20Sopenharmony_ci#define __REG_R6 6 208c2ecf20Sopenharmony_ci#define __REG_R7 7 218c2ecf20Sopenharmony_ci#define __REG_R8 8 228c2ecf20Sopenharmony_ci#define __REG_R9 9 238c2ecf20Sopenharmony_ci#define __REG_R10 10 248c2ecf20Sopenharmony_ci#define __REG_R11 11 258c2ecf20Sopenharmony_ci#define __REG_R12 12 268c2ecf20Sopenharmony_ci#define __REG_R13 13 278c2ecf20Sopenharmony_ci#define __REG_R14 14 288c2ecf20Sopenharmony_ci#define __REG_R15 15 298c2ecf20Sopenharmony_ci#define __REG_R16 16 308c2ecf20Sopenharmony_ci#define __REG_R17 17 318c2ecf20Sopenharmony_ci#define __REG_R18 18 328c2ecf20Sopenharmony_ci#define __REG_R19 19 338c2ecf20Sopenharmony_ci#define __REG_R20 20 348c2ecf20Sopenharmony_ci#define __REG_R21 21 358c2ecf20Sopenharmony_ci#define __REG_R22 22 368c2ecf20Sopenharmony_ci#define __REG_R23 23 378c2ecf20Sopenharmony_ci#define __REG_R24 24 388c2ecf20Sopenharmony_ci#define __REG_R25 25 398c2ecf20Sopenharmony_ci#define __REG_R26 26 408c2ecf20Sopenharmony_ci#define __REG_R27 27 418c2ecf20Sopenharmony_ci#define __REG_R28 28 428c2ecf20Sopenharmony_ci#define __REG_R29 29 438c2ecf20Sopenharmony_ci#define __REG_R30 30 448c2ecf20Sopenharmony_ci#define __REG_R31 31 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define __REGA0_0 0 478c2ecf20Sopenharmony_ci#define __REGA0_R1 1 488c2ecf20Sopenharmony_ci#define __REGA0_R2 2 498c2ecf20Sopenharmony_ci#define __REGA0_R3 3 508c2ecf20Sopenharmony_ci#define __REGA0_R4 4 518c2ecf20Sopenharmony_ci#define __REGA0_R5 5 528c2ecf20Sopenharmony_ci#define __REGA0_R6 6 538c2ecf20Sopenharmony_ci#define __REGA0_R7 7 548c2ecf20Sopenharmony_ci#define __REGA0_R8 8 558c2ecf20Sopenharmony_ci#define __REGA0_R9 9 568c2ecf20Sopenharmony_ci#define __REGA0_R10 10 578c2ecf20Sopenharmony_ci#define __REGA0_R11 11 588c2ecf20Sopenharmony_ci#define __REGA0_R12 12 598c2ecf20Sopenharmony_ci#define __REGA0_R13 13 608c2ecf20Sopenharmony_ci#define __REGA0_R14 14 618c2ecf20Sopenharmony_ci#define __REGA0_R15 15 628c2ecf20Sopenharmony_ci#define __REGA0_R16 16 638c2ecf20Sopenharmony_ci#define __REGA0_R17 17 648c2ecf20Sopenharmony_ci#define __REGA0_R18 18 658c2ecf20Sopenharmony_ci#define __REGA0_R19 19 668c2ecf20Sopenharmony_ci#define __REGA0_R20 20 678c2ecf20Sopenharmony_ci#define __REGA0_R21 21 688c2ecf20Sopenharmony_ci#define __REGA0_R22 22 698c2ecf20Sopenharmony_ci#define __REGA0_R23 23 708c2ecf20Sopenharmony_ci#define __REGA0_R24 24 718c2ecf20Sopenharmony_ci#define __REGA0_R25 25 728c2ecf20Sopenharmony_ci#define __REGA0_R26 26 738c2ecf20Sopenharmony_ci#define __REGA0_R27 27 748c2ecf20Sopenharmony_ci#define __REGA0_R28 28 758c2ecf20Sopenharmony_ci#define __REGA0_R29 29 768c2ecf20Sopenharmony_ci#define __REGA0_R30 30 778c2ecf20Sopenharmony_ci#define __REGA0_R31 31 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define IMM_L(i) ((uintptr_t)(i) & 0xffff) 808c2ecf20Sopenharmony_ci#define IMM_DS(i) ((uintptr_t)(i) & 0xfffc) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci/* 838c2ecf20Sopenharmony_ci * 16-bit immediate helper macros: HA() is for use with sign-extending instrs 848c2ecf20Sopenharmony_ci * (e.g. LD, ADDI). If the bottom 16 bits is "-ve", add another bit into the 858c2ecf20Sopenharmony_ci * top half to negate the effect (i.e. 0xffff + 1 = 0x(1)0000). 868c2ecf20Sopenharmony_ci */ 878c2ecf20Sopenharmony_ci#define IMM_H(i) ((uintptr_t)(i)>>16) 888c2ecf20Sopenharmony_ci#define IMM_HA(i) (((uintptr_t)(i)>>16) + \ 898c2ecf20Sopenharmony_ci (((uintptr_t)(i) & 0x8000) >> 15)) 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci/* opcode and xopcode for instructions */ 938c2ecf20Sopenharmony_ci#define OP_TRAP 3 948c2ecf20Sopenharmony_ci#define OP_TRAP_64 2 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define OP_31_XOP_TRAP 4 978c2ecf20Sopenharmony_ci#define OP_31_XOP_LDX 21 988c2ecf20Sopenharmony_ci#define OP_31_XOP_LWZX 23 998c2ecf20Sopenharmony_ci#define OP_31_XOP_LDUX 53 1008c2ecf20Sopenharmony_ci#define OP_31_XOP_DCBST 54 1018c2ecf20Sopenharmony_ci#define OP_31_XOP_LWZUX 55 1028c2ecf20Sopenharmony_ci#define OP_31_XOP_TRAP_64 68 1038c2ecf20Sopenharmony_ci#define OP_31_XOP_DCBF 86 1048c2ecf20Sopenharmony_ci#define OP_31_XOP_LBZX 87 1058c2ecf20Sopenharmony_ci#define OP_31_XOP_STDX 149 1068c2ecf20Sopenharmony_ci#define OP_31_XOP_STWX 151 1078c2ecf20Sopenharmony_ci#define OP_31_XOP_STDUX 181 1088c2ecf20Sopenharmony_ci#define OP_31_XOP_STWUX 183 1098c2ecf20Sopenharmony_ci#define OP_31_XOP_STBX 215 1108c2ecf20Sopenharmony_ci#define OP_31_XOP_LBZUX 119 1118c2ecf20Sopenharmony_ci#define OP_31_XOP_STBUX 247 1128c2ecf20Sopenharmony_ci#define OP_31_XOP_LHZX 279 1138c2ecf20Sopenharmony_ci#define OP_31_XOP_LHZUX 311 1148c2ecf20Sopenharmony_ci#define OP_31_XOP_MSGSNDP 142 1158c2ecf20Sopenharmony_ci#define OP_31_XOP_MSGCLRP 174 1168c2ecf20Sopenharmony_ci#define OP_31_XOP_TLBIE 306 1178c2ecf20Sopenharmony_ci#define OP_31_XOP_MFSPR 339 1188c2ecf20Sopenharmony_ci#define OP_31_XOP_LWAX 341 1198c2ecf20Sopenharmony_ci#define OP_31_XOP_LHAX 343 1208c2ecf20Sopenharmony_ci#define OP_31_XOP_LWAUX 373 1218c2ecf20Sopenharmony_ci#define OP_31_XOP_LHAUX 375 1228c2ecf20Sopenharmony_ci#define OP_31_XOP_STHX 407 1238c2ecf20Sopenharmony_ci#define OP_31_XOP_STHUX 439 1248c2ecf20Sopenharmony_ci#define OP_31_XOP_MTSPR 467 1258c2ecf20Sopenharmony_ci#define OP_31_XOP_DCBI 470 1268c2ecf20Sopenharmony_ci#define OP_31_XOP_LDBRX 532 1278c2ecf20Sopenharmony_ci#define OP_31_XOP_LWBRX 534 1288c2ecf20Sopenharmony_ci#define OP_31_XOP_TLBSYNC 566 1298c2ecf20Sopenharmony_ci#define OP_31_XOP_STDBRX 660 1308c2ecf20Sopenharmony_ci#define OP_31_XOP_STWBRX 662 1318c2ecf20Sopenharmony_ci#define OP_31_XOP_STFSX 663 1328c2ecf20Sopenharmony_ci#define OP_31_XOP_STFSUX 695 1338c2ecf20Sopenharmony_ci#define OP_31_XOP_STFDX 727 1348c2ecf20Sopenharmony_ci#define OP_31_XOP_STFDUX 759 1358c2ecf20Sopenharmony_ci#define OP_31_XOP_LHBRX 790 1368c2ecf20Sopenharmony_ci#define OP_31_XOP_LFIWAX 855 1378c2ecf20Sopenharmony_ci#define OP_31_XOP_LFIWZX 887 1388c2ecf20Sopenharmony_ci#define OP_31_XOP_STHBRX 918 1398c2ecf20Sopenharmony_ci#define OP_31_XOP_STFIWX 983 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci/* VSX Scalar Load Instructions */ 1428c2ecf20Sopenharmony_ci#define OP_31_XOP_LXSDX 588 1438c2ecf20Sopenharmony_ci#define OP_31_XOP_LXSSPX 524 1448c2ecf20Sopenharmony_ci#define OP_31_XOP_LXSIWAX 76 1458c2ecf20Sopenharmony_ci#define OP_31_XOP_LXSIWZX 12 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/* VSX Scalar Store Instructions */ 1488c2ecf20Sopenharmony_ci#define OP_31_XOP_STXSDX 716 1498c2ecf20Sopenharmony_ci#define OP_31_XOP_STXSSPX 652 1508c2ecf20Sopenharmony_ci#define OP_31_XOP_STXSIWX 140 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci/* VSX Vector Load Instructions */ 1538c2ecf20Sopenharmony_ci#define OP_31_XOP_LXVD2X 844 1548c2ecf20Sopenharmony_ci#define OP_31_XOP_LXVW4X 780 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci/* VSX Vector Load and Splat Instruction */ 1578c2ecf20Sopenharmony_ci#define OP_31_XOP_LXVDSX 332 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci/* VSX Vector Store Instructions */ 1608c2ecf20Sopenharmony_ci#define OP_31_XOP_STXVD2X 972 1618c2ecf20Sopenharmony_ci#define OP_31_XOP_STXVW4X 908 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci#define OP_31_XOP_LFSX 535 1648c2ecf20Sopenharmony_ci#define OP_31_XOP_LFSUX 567 1658c2ecf20Sopenharmony_ci#define OP_31_XOP_LFDX 599 1668c2ecf20Sopenharmony_ci#define OP_31_XOP_LFDUX 631 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci/* VMX Vector Load Instructions */ 1698c2ecf20Sopenharmony_ci#define OP_31_XOP_LVX 103 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci/* VMX Vector Store Instructions */ 1728c2ecf20Sopenharmony_ci#define OP_31_XOP_STVX 231 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci/* Prefixed Instructions */ 1758c2ecf20Sopenharmony_ci#define OP_PREFIX 1 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci#define OP_31 31 1788c2ecf20Sopenharmony_ci#define OP_LWZ 32 1798c2ecf20Sopenharmony_ci#define OP_STFS 52 1808c2ecf20Sopenharmony_ci#define OP_STFSU 53 1818c2ecf20Sopenharmony_ci#define OP_STFD 54 1828c2ecf20Sopenharmony_ci#define OP_STFDU 55 1838c2ecf20Sopenharmony_ci#define OP_LD 58 1848c2ecf20Sopenharmony_ci#define OP_LWZU 33 1858c2ecf20Sopenharmony_ci#define OP_LBZ 34 1868c2ecf20Sopenharmony_ci#define OP_LBZU 35 1878c2ecf20Sopenharmony_ci#define OP_STW 36 1888c2ecf20Sopenharmony_ci#define OP_STWU 37 1898c2ecf20Sopenharmony_ci#define OP_STD 62 1908c2ecf20Sopenharmony_ci#define OP_STB 38 1918c2ecf20Sopenharmony_ci#define OP_STBU 39 1928c2ecf20Sopenharmony_ci#define OP_LHZ 40 1938c2ecf20Sopenharmony_ci#define OP_LHZU 41 1948c2ecf20Sopenharmony_ci#define OP_LHA 42 1958c2ecf20Sopenharmony_ci#define OP_LHAU 43 1968c2ecf20Sopenharmony_ci#define OP_STH 44 1978c2ecf20Sopenharmony_ci#define OP_STHU 45 1988c2ecf20Sopenharmony_ci#define OP_LMW 46 1998c2ecf20Sopenharmony_ci#define OP_STMW 47 2008c2ecf20Sopenharmony_ci#define OP_LFS 48 2018c2ecf20Sopenharmony_ci#define OP_LFSU 49 2028c2ecf20Sopenharmony_ci#define OP_LFD 50 2038c2ecf20Sopenharmony_ci#define OP_LFDU 51 2048c2ecf20Sopenharmony_ci#define OP_STFS 52 2058c2ecf20Sopenharmony_ci#define OP_STFSU 53 2068c2ecf20Sopenharmony_ci#define OP_STFD 54 2078c2ecf20Sopenharmony_ci#define OP_STFDU 55 2088c2ecf20Sopenharmony_ci#define OP_LQ 56 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci/* sorted alphabetically */ 2118c2ecf20Sopenharmony_ci#define PPC_INST_BCCTR_FLUSH 0x4c400420 2128c2ecf20Sopenharmony_ci#define PPC_INST_COPY 0x7c20060c 2138c2ecf20Sopenharmony_ci#define PPC_INST_DCBA 0x7c0005ec 2148c2ecf20Sopenharmony_ci#define PPC_INST_DCBA_MASK 0xfc0007fe 2158c2ecf20Sopenharmony_ci#define PPC_INST_DSSALL 0x7e00066c 2168c2ecf20Sopenharmony_ci#define PPC_INST_ISEL 0x7c00001e 2178c2ecf20Sopenharmony_ci#define PPC_INST_ISEL_MASK 0xfc00003e 2188c2ecf20Sopenharmony_ci#define PPC_INST_LSWI 0x7c0004aa 2198c2ecf20Sopenharmony_ci#define PPC_INST_LSWX 0x7c00042a 2208c2ecf20Sopenharmony_ci#define PPC_INST_LWSYNC 0x7c2004ac 2218c2ecf20Sopenharmony_ci#define PPC_INST_SYNC 0x7c0004ac 2228c2ecf20Sopenharmony_ci#define PPC_INST_SYNC_MASK 0xfc0007fe 2238c2ecf20Sopenharmony_ci#define PPC_INST_ISYNC 0x4c00012c 2248c2ecf20Sopenharmony_ci#define PPC_INST_MCRXR 0x7c000400 2258c2ecf20Sopenharmony_ci#define PPC_INST_MCRXR_MASK 0xfc0007fe 2268c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_PVR 0x7c1f42a6 2278c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_PVR_MASK 0xfc1ffffe 2288c2ecf20Sopenharmony_ci#define PPC_INST_MTMSRD 0x7c000164 2298c2ecf20Sopenharmony_ci#define PPC_INST_NOP 0x60000000 2308c2ecf20Sopenharmony_ci#define PPC_INST_POPCNTB 0x7c0000f4 2318c2ecf20Sopenharmony_ci#define PPC_INST_POPCNTB_MASK 0xfc0007fe 2328c2ecf20Sopenharmony_ci#define PPC_INST_RFEBB 0x4c000124 2338c2ecf20Sopenharmony_ci#define PPC_INST_RFID 0x4c000024 2348c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR 0x7c0002a6 2358c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_DSCR 0x7c1102a6 2368c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_DSCR_MASK 0xfc1ffffe 2378c2ecf20Sopenharmony_ci#define PPC_INST_MTSPR_DSCR 0x7c1103a6 2388c2ecf20Sopenharmony_ci#define PPC_INST_MTSPR_DSCR_MASK 0xfc1ffffe 2398c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_DSCR_USER 0x7c0302a6 2408c2ecf20Sopenharmony_ci#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1ffffe 2418c2ecf20Sopenharmony_ci#define PPC_INST_MTSPR_DSCR_USER 0x7c0303a6 2428c2ecf20Sopenharmony_ci#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1ffffe 2438c2ecf20Sopenharmony_ci#define PPC_INST_SC 0x44000002 2448c2ecf20Sopenharmony_ci#define PPC_INST_STRING 0x7c00042a 2458c2ecf20Sopenharmony_ci#define PPC_INST_STRING_MASK 0xfc0007fe 2468c2ecf20Sopenharmony_ci#define PPC_INST_STRING_GEN_MASK 0xfc00067e 2478c2ecf20Sopenharmony_ci#define PPC_INST_STSWI 0x7c0005aa 2488c2ecf20Sopenharmony_ci#define PPC_INST_STSWX 0x7c00052a 2498c2ecf20Sopenharmony_ci#define PPC_INST_TRECHKPT 0x7c0007dd 2508c2ecf20Sopenharmony_ci#define PPC_INST_TRECLAIM 0x7c00075d 2518c2ecf20Sopenharmony_ci#define PPC_INST_TSR 0x7c0005dd 2528c2ecf20Sopenharmony_ci#define PPC_INST_LD 0xe8000000 2538c2ecf20Sopenharmony_ci#define PPC_INST_STD 0xf8000000 2548c2ecf20Sopenharmony_ci#define PPC_INST_MFLR 0x7c0802a6 2558c2ecf20Sopenharmony_ci#define PPC_INST_MTCTR 0x7c0903a6 2568c2ecf20Sopenharmony_ci#define PPC_INST_ADDI 0x38000000 2578c2ecf20Sopenharmony_ci#define PPC_INST_ADDIS 0x3c000000 2588c2ecf20Sopenharmony_ci#define PPC_INST_ADD 0x7c000214 2598c2ecf20Sopenharmony_ci#define PPC_INST_BLR 0x4e800020 2608c2ecf20Sopenharmony_ci#define PPC_INST_BCTR 0x4e800420 2618c2ecf20Sopenharmony_ci#define PPC_INST_BCTRL 0x4e800421 2628c2ecf20Sopenharmony_ci#define PPC_INST_DIVD 0x7c0003d2 2638c2ecf20Sopenharmony_ci#define PPC_INST_RLDICR 0x78000004 2648c2ecf20Sopenharmony_ci#define PPC_INST_ORI 0x60000000 2658c2ecf20Sopenharmony_ci#define PPC_INST_ORIS 0x64000000 2668c2ecf20Sopenharmony_ci#define PPC_INST_BRANCH 0x48000000 2678c2ecf20Sopenharmony_ci#define PPC_INST_BRANCH_COND 0x40800000 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci/* Prefixes */ 2708c2ecf20Sopenharmony_ci#define PPC_INST_LFS 0xc0000000 2718c2ecf20Sopenharmony_ci#define PPC_INST_STFS 0xd0000000 2728c2ecf20Sopenharmony_ci#define PPC_INST_LFD 0xc8000000 2738c2ecf20Sopenharmony_ci#define PPC_INST_STFD 0xd8000000 2748c2ecf20Sopenharmony_ci#define PPC_PREFIX_MLS 0x06000000 2758c2ecf20Sopenharmony_ci#define PPC_PREFIX_8LS 0x04000000 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci/* Prefixed instructions */ 2788c2ecf20Sopenharmony_ci#define PPC_INST_PLD 0xe4000000 2798c2ecf20Sopenharmony_ci#define PPC_INST_PSTD 0xf4000000 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_ci/* macros to insert fields into opcodes */ 2828c2ecf20Sopenharmony_ci#define ___PPC_RA(a) (((a) & 0x1f) << 16) 2838c2ecf20Sopenharmony_ci#define ___PPC_RB(b) (((b) & 0x1f) << 11) 2848c2ecf20Sopenharmony_ci#define ___PPC_RC(c) (((c) & 0x1f) << 6) 2858c2ecf20Sopenharmony_ci#define ___PPC_RS(s) (((s) & 0x1f) << 21) 2868c2ecf20Sopenharmony_ci#define ___PPC_RT(t) ___PPC_RS(t) 2878c2ecf20Sopenharmony_ci#define ___PPC_R(r) (((r) & 0x1) << 16) 2888c2ecf20Sopenharmony_ci#define ___PPC_PRS(prs) (((prs) & 0x1) << 17) 2898c2ecf20Sopenharmony_ci#define ___PPC_RIC(ric) (((ric) & 0x3) << 18) 2908c2ecf20Sopenharmony_ci#define __PPC_RA(a) ___PPC_RA(__REG_##a) 2918c2ecf20Sopenharmony_ci#define __PPC_RA0(a) ___PPC_RA(__REGA0_##a) 2928c2ecf20Sopenharmony_ci#define __PPC_RB(b) ___PPC_RB(__REG_##b) 2938c2ecf20Sopenharmony_ci#define __PPC_RS(s) ___PPC_RS(__REG_##s) 2948c2ecf20Sopenharmony_ci#define __PPC_RT(t) ___PPC_RT(__REG_##t) 2958c2ecf20Sopenharmony_ci#define __PPC_XA(a) ((((a) & 0x1f) << 16) | (((a) & 0x20) >> 3)) 2968c2ecf20Sopenharmony_ci#define __PPC_XB(b) ((((b) & 0x1f) << 11) | (((b) & 0x20) >> 4)) 2978c2ecf20Sopenharmony_ci#define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5)) 2988c2ecf20Sopenharmony_ci#define __PPC_XT(s) __PPC_XS(s) 2998c2ecf20Sopenharmony_ci#define __PPC_T_TLB(t) (((t) & 0x3) << 21) 3008c2ecf20Sopenharmony_ci#define __PPC_WC(w) (((w) & 0x3) << 21) 3018c2ecf20Sopenharmony_ci#define __PPC_WS(w) (((w) & 0x1f) << 11) 3028c2ecf20Sopenharmony_ci#define __PPC_SH(s) __PPC_WS(s) 3038c2ecf20Sopenharmony_ci#define __PPC_SH64(s) (__PPC_SH(s) | (((s) & 0x20) >> 4)) 3048c2ecf20Sopenharmony_ci#define __PPC_MB(s) ___PPC_RC(s) 3058c2ecf20Sopenharmony_ci#define __PPC_ME(s) (((s) & 0x1f) << 1) 3068c2ecf20Sopenharmony_ci#define __PPC_MB64(s) (__PPC_MB(s) | ((s) & 0x20)) 3078c2ecf20Sopenharmony_ci#define __PPC_ME64(s) __PPC_MB64(s) 3088c2ecf20Sopenharmony_ci#define __PPC_BI(s) (((s) & 0x1f) << 16) 3098c2ecf20Sopenharmony_ci#define __PPC_CT(t) (((t) & 0x0f) << 21) 3108c2ecf20Sopenharmony_ci#define __PPC_SPR(r) ((((r) & 0x1f) << 16) | ((((r) >> 5) & 0x1f) << 11)) 3118c2ecf20Sopenharmony_ci#define __PPC_RC21 (0x1 << 10) 3128c2ecf20Sopenharmony_ci#define __PPC_PRFX_R(r) (((r) & 0x1) << 20) 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci/* 3158c2ecf20Sopenharmony_ci * Both low and high 16 bits are added as SIGNED additions, so if low 16 bits 3168c2ecf20Sopenharmony_ci * has high bit set, high 16 bits must be adjusted. These macros do that (stolen 3178c2ecf20Sopenharmony_ci * from binutils). 3188c2ecf20Sopenharmony_ci */ 3198c2ecf20Sopenharmony_ci#define PPC_LO(v) ((v) & 0xffff) 3208c2ecf20Sopenharmony_ci#define PPC_HI(v) (((v) >> 16) & 0xffff) 3218c2ecf20Sopenharmony_ci#define PPC_HA(v) PPC_HI((v) + 0x8000) 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ci/* 3248c2ecf20Sopenharmony_ci * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a 3258c2ecf20Sopenharmony_ci * larx with EH set as an illegal instruction. 3268c2ecf20Sopenharmony_ci */ 3278c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC64 3288c2ecf20Sopenharmony_ci#define __PPC_EH(eh) (((eh) & 0x1) << 0) 3298c2ecf20Sopenharmony_ci#else 3308c2ecf20Sopenharmony_ci#define __PPC_EH(eh) 0 3318c2ecf20Sopenharmony_ci#endif 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci/* Base instruction encoding */ 3348c2ecf20Sopenharmony_ci#define PPC_RAW_CP_ABORT (0x7c00068c) 3358c2ecf20Sopenharmony_ci#define PPC_RAW_COPY(a, b) (PPC_INST_COPY | ___PPC_RA(a) | ___PPC_RB(b)) 3368c2ecf20Sopenharmony_ci#define PPC_RAW_DARN(t, l) (0x7c0005e6 | ___PPC_RT(t) | (((l) & 0x3) << 16)) 3378c2ecf20Sopenharmony_ci#define PPC_RAW_DCBAL(a, b) (0x7c2005ec | __PPC_RA(a) | __PPC_RB(b)) 3388c2ecf20Sopenharmony_ci#define PPC_RAW_DCBZL(a, b) (0x7c2007ec | __PPC_RA(a) | __PPC_RB(b)) 3398c2ecf20Sopenharmony_ci#define PPC_RAW_LQARX(t, a, b, eh) (0x7c000228 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | __PPC_EH(eh)) 3408c2ecf20Sopenharmony_ci#define PPC_RAW_LDARX(t, a, b, eh) (0x7c0000a8 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | __PPC_EH(eh)) 3418c2ecf20Sopenharmony_ci#define PPC_RAW_LWARX(t, a, b, eh) (0x7c000028 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | __PPC_EH(eh)) 3428c2ecf20Sopenharmony_ci#define PPC_RAW_PHWSYNC (0x7c8004ac) 3438c2ecf20Sopenharmony_ci#define PPC_RAW_PLWSYNC (0x7ca004ac) 3448c2ecf20Sopenharmony_ci#define PPC_RAW_STQCX(t, a, b) (0x7c00016d | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 3458c2ecf20Sopenharmony_ci#define PPC_RAW_MADDHD(t, a, b, c) (0x10000030 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | ___PPC_RC(c)) 3468c2ecf20Sopenharmony_ci#define PPC_RAW_MADDHDU(t, a, b, c) (0x10000031 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | ___PPC_RC(c)) 3478c2ecf20Sopenharmony_ci#define PPC_RAW_MADDLD(t, a, b, c) (0x10000033 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | ___PPC_RC(c)) 3488c2ecf20Sopenharmony_ci#define PPC_RAW_MSGSND(b) (0x7c00019c | ___PPC_RB(b)) 3498c2ecf20Sopenharmony_ci#define PPC_RAW_MSGSYNC (0x7c0006ec) 3508c2ecf20Sopenharmony_ci#define PPC_RAW_MSGCLR(b) (0x7c0001dc | ___PPC_RB(b)) 3518c2ecf20Sopenharmony_ci#define PPC_RAW_MSGSNDP(b) (0x7c00011c | ___PPC_RB(b)) 3528c2ecf20Sopenharmony_ci#define PPC_RAW_MSGCLRP(b) (0x7c00015c | ___PPC_RB(b)) 3538c2ecf20Sopenharmony_ci#define PPC_RAW_PASTE(a, b) (0x7c20070d | ___PPC_RA(a) | ___PPC_RB(b)) 3548c2ecf20Sopenharmony_ci#define PPC_RAW_POPCNTB(a, s) (PPC_INST_POPCNTB | __PPC_RA(a) | __PPC_RS(s)) 3558c2ecf20Sopenharmony_ci#define PPC_RAW_POPCNTD(a, s) (0x7c0003f4 | __PPC_RA(a) | __PPC_RS(s)) 3568c2ecf20Sopenharmony_ci#define PPC_RAW_POPCNTW(a, s) (0x7c0002f4 | __PPC_RA(a) | __PPC_RS(s)) 3578c2ecf20Sopenharmony_ci#define PPC_RAW_RFCI (0x4c000066) 3588c2ecf20Sopenharmony_ci#define PPC_RAW_RFDI (0x4c00004e) 3598c2ecf20Sopenharmony_ci#define PPC_RAW_RFMCI (0x4c00004c) 3608c2ecf20Sopenharmony_ci#define PPC_RAW_TLBILX(t, a, b) (0x7c000024 | __PPC_T_TLB(t) | __PPC_RA0(a) | __PPC_RB(b)) 3618c2ecf20Sopenharmony_ci#define PPC_RAW_WAIT(w) (0x7c00007c | __PPC_WC(w)) 3628c2ecf20Sopenharmony_ci#define PPC_RAW_TLBIE(lp, a) (0x7c000264 | ___PPC_RB(a) | ___PPC_RS(lp)) 3638c2ecf20Sopenharmony_ci#define PPC_RAW_TLBIE_5(rb, rs, ric, prs, r) \ 3648c2ecf20Sopenharmony_ci (0x7c000264 | ___PPC_RB(rb) | ___PPC_RS(rs) | ___PPC_RIC(ric) | ___PPC_PRS(prs) | ___PPC_R(r)) 3658c2ecf20Sopenharmony_ci#define PPC_RAW_TLBIEL(rb, rs, ric, prs, r) \ 3668c2ecf20Sopenharmony_ci (0x7c000224 | ___PPC_RB(rb) | ___PPC_RS(rs) | ___PPC_RIC(ric) | ___PPC_PRS(prs) | ___PPC_R(r)) 3678c2ecf20Sopenharmony_ci#define PPC_RAW_TLBSRX_DOT(a, b) (0x7c0006a5 | __PPC_RA0(a) | __PPC_RB(b)) 3688c2ecf20Sopenharmony_ci#define PPC_RAW_TLBIVAX(a, b) (0x7c000624 | __PPC_RA0(a) | __PPC_RB(b)) 3698c2ecf20Sopenharmony_ci#define PPC_RAW_ERATWE(s, a, w) (0x7c0001a6 | __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w)) 3708c2ecf20Sopenharmony_ci#define PPC_RAW_ERATRE(s, a, w) (0x7c000166 | __PPC_RS(s) | __PPC_RA(a) | __PPC_WS(w)) 3718c2ecf20Sopenharmony_ci#define PPC_RAW_ERATILX(t, a, b) (0x7c000066 | __PPC_T_TLB(t) | __PPC_RA0(a) | __PPC_RB(b)) 3728c2ecf20Sopenharmony_ci#define PPC_RAW_ERATIVAX(s, a, b) (0x7c000666 | __PPC_RS(s) | __PPC_RA0(a) | __PPC_RB(b)) 3738c2ecf20Sopenharmony_ci#define PPC_RAW_ERATSX(t, a, w) (0x7c000126 | __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b)) 3748c2ecf20Sopenharmony_ci#define PPC_RAW_ERATSX_DOT(t, a, w) (0x7c000127 | __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b)) 3758c2ecf20Sopenharmony_ci#define PPC_RAW_SLBFEE_DOT(t, b) (0x7c0007a7 | __PPC_RT(t) | __PPC_RB(b)) 3768c2ecf20Sopenharmony_ci#define __PPC_RAW_SLBFEE_DOT(t, b) (0x7c0007a7 | ___PPC_RT(t) | ___PPC_RB(b)) 3778c2ecf20Sopenharmony_ci#define PPC_RAW_ICBT(c, a, b) (0x7c00002c | __PPC_CT(c) | __PPC_RA0(a) | __PPC_RB(b)) 3788c2ecf20Sopenharmony_ci#define PPC_RAW_LBZCIX(t, a, b) (0x7c0006aa | __PPC_RT(t) | __PPC_RA(a) | __PPC_RB(b)) 3798c2ecf20Sopenharmony_ci#define PPC_RAW_STBCIX(s, a, b) (0x7c0007aa | __PPC_RS(s) | __PPC_RA(a) | __PPC_RB(b)) 3808c2ecf20Sopenharmony_ci#define PPC_RAW_DCBFPS(a, b) (0x7c0000ac | ___PPC_RA(a) | ___PPC_RB(b) | (4 << 21)) 3818c2ecf20Sopenharmony_ci#define PPC_RAW_DCBSTPS(a, b) (0x7c0000ac | ___PPC_RA(a) | ___PPC_RB(b) | (6 << 21)) 3828c2ecf20Sopenharmony_ci/* 3838c2ecf20Sopenharmony_ci * Define what the VSX XX1 form instructions will look like, then add 3848c2ecf20Sopenharmony_ci * the 128 bit load store instructions based on that. 3858c2ecf20Sopenharmony_ci */ 3868c2ecf20Sopenharmony_ci#define VSX_XX1(s, a, b) (__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b)) 3878c2ecf20Sopenharmony_ci#define VSX_XX3(t, a, b) (__PPC_XT(t) | __PPC_XA(a) | __PPC_XB(b)) 3888c2ecf20Sopenharmony_ci#define PPC_RAW_STXVD2X(s, a, b) (0x7c000798 | VSX_XX1((s), a, b)) 3898c2ecf20Sopenharmony_ci#define PPC_RAW_LXVD2X(s, a, b) (0x7c000698 | VSX_XX1((s), a, b)) 3908c2ecf20Sopenharmony_ci#define PPC_RAW_MFVRD(a, t) (0x7c000066 | VSX_XX1((t) + 32, a, R0)) 3918c2ecf20Sopenharmony_ci#define PPC_RAW_MTVRD(t, a) (0x7c000166 | VSX_XX1((t) + 32, a, R0)) 3928c2ecf20Sopenharmony_ci#define PPC_RAW_VPMSUMW(t, a, b) (0x10000488 | VSX_XX3((t), a, b)) 3938c2ecf20Sopenharmony_ci#define PPC_RAW_VPMSUMD(t, a, b) (0x100004c8 | VSX_XX3((t), a, b)) 3948c2ecf20Sopenharmony_ci#define PPC_RAW_XXLOR(t, a, b) (0xf0000490 | VSX_XX3((t), a, b)) 3958c2ecf20Sopenharmony_ci#define PPC_RAW_XXSWAPD(t, a) (0xf0000250 | VSX_XX3((t), a, a)) 3968c2ecf20Sopenharmony_ci#define PPC_RAW_XVCPSGNDP(t, a, b) ((0xf0000780 | VSX_XX3((t), (a), (b)))) 3978c2ecf20Sopenharmony_ci#define PPC_RAW_VPERMXOR(vrt, vra, vrb, vrc) \ 3988c2ecf20Sopenharmony_ci ((0x1000002d | ___PPC_RT(vrt) | ___PPC_RA(vra) | ___PPC_RB(vrb) | (((vrc) & 0x1f) << 6))) 3998c2ecf20Sopenharmony_ci#define PPC_RAW_NAP (0x4c000364) 4008c2ecf20Sopenharmony_ci#define PPC_RAW_SLEEP (0x4c0003a4) 4018c2ecf20Sopenharmony_ci#define PPC_RAW_WINKLE (0x4c0003e4) 4028c2ecf20Sopenharmony_ci#define PPC_RAW_STOP (0x4c0002e4) 4038c2ecf20Sopenharmony_ci#define PPC_RAW_CLRBHRB (0x7c00035c) 4048c2ecf20Sopenharmony_ci#define PPC_RAW_MFBHRBE(r, n) (0x7c00025c | __PPC_RT(r) | (((n) & 0x3ff) << 11)) 4058c2ecf20Sopenharmony_ci#define PPC_RAW_TRECHKPT (PPC_INST_TRECHKPT) 4068c2ecf20Sopenharmony_ci#define PPC_RAW_TRECLAIM(r) (PPC_INST_TRECLAIM | __PPC_RA(r)) 4078c2ecf20Sopenharmony_ci#define PPC_RAW_TABORT(r) (0x7c00071d | __PPC_RA(r)) 4088c2ecf20Sopenharmony_ci#define TMRN(x) ((((x) & 0x1f) << 16) | (((x) & 0x3e0) << 6)) 4098c2ecf20Sopenharmony_ci#define PPC_RAW_MTTMR(tmr, r) (0x7c0003dc | TMRN(tmr) | ___PPC_RS(r)) 4108c2ecf20Sopenharmony_ci#define PPC_RAW_MFTMR(tmr, r) (0x7c0002dc | TMRN(tmr) | ___PPC_RT(r)) 4118c2ecf20Sopenharmony_ci#define PPC_RAW_ICSWX(s, a, b) (0x7c00032d | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4128c2ecf20Sopenharmony_ci#define PPC_RAW_ICSWEPX(s, a, b) (0x7c00076d | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4138c2ecf20Sopenharmony_ci#define PPC_RAW_SLBIA(IH) (0x7c0003e4 | (((IH) & 0x7) << 21)) 4148c2ecf20Sopenharmony_ci#define PPC_RAW_VCMPEQUD_RC(vrt, vra, vrb) \ 4158c2ecf20Sopenharmony_ci (0x100000c7 | ___PPC_RT(vrt) | ___PPC_RA(vra) | ___PPC_RB(vrb) | __PPC_RC21) 4168c2ecf20Sopenharmony_ci#define PPC_RAW_VCMPEQUB_RC(vrt, vra, vrb) \ 4178c2ecf20Sopenharmony_ci (0x10000006 | ___PPC_RT(vrt) | ___PPC_RA(vra) | ___PPC_RB(vrb) | __PPC_RC21) 4188c2ecf20Sopenharmony_ci#define PPC_RAW_LD(r, base, i) (PPC_INST_LD | ___PPC_RT(r) | ___PPC_RA(base) | IMM_DS(i)) 4198c2ecf20Sopenharmony_ci#define PPC_RAW_LWZ(r, base, i) (0x80000000 | ___PPC_RT(r) | ___PPC_RA(base) | IMM_L(i)) 4208c2ecf20Sopenharmony_ci#define PPC_RAW_LWZX(t, a, b) (0x7c00002e | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4218c2ecf20Sopenharmony_ci#define PPC_RAW_STD(r, base, i) (PPC_INST_STD | ___PPC_RS(r) | ___PPC_RA(base) | IMM_DS(i)) 4228c2ecf20Sopenharmony_ci#define PPC_RAW_STDCX(s, a, b) (0x7c0001ad | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4238c2ecf20Sopenharmony_ci#define PPC_RAW_LFSX(t, a, b) (0x7c00042e | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4248c2ecf20Sopenharmony_ci#define PPC_RAW_STFSX(s, a, b) (0x7c00052e | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4258c2ecf20Sopenharmony_ci#define PPC_RAW_LFDX(t, a, b) (0x7c0004ae | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4268c2ecf20Sopenharmony_ci#define PPC_RAW_STFDX(s, a, b) (0x7c0005ae | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4278c2ecf20Sopenharmony_ci#define PPC_RAW_LVX(t, a, b) (0x7c0000ce | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4288c2ecf20Sopenharmony_ci#define PPC_RAW_STVX(s, a, b) (0x7c0001ce | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4298c2ecf20Sopenharmony_ci#define PPC_RAW_ADD(t, a, b) (PPC_INST_ADD | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4308c2ecf20Sopenharmony_ci#define PPC_RAW_ADD_DOT(t, a, b) (PPC_INST_ADD | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | 0x1) 4318c2ecf20Sopenharmony_ci#define PPC_RAW_ADDC(t, a, b) (0x7c000014 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4328c2ecf20Sopenharmony_ci#define PPC_RAW_ADDC_DOT(t, a, b) (0x7c000014 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | 0x1) 4338c2ecf20Sopenharmony_ci#define PPC_RAW_NOP() (PPC_INST_NOP) 4348c2ecf20Sopenharmony_ci#define PPC_RAW_BLR() (PPC_INST_BLR) 4358c2ecf20Sopenharmony_ci#define PPC_RAW_BLRL() (0x4e800021) 4368c2ecf20Sopenharmony_ci#define PPC_RAW_MTLR(r) (0x7c0803a6 | ___PPC_RT(r)) 4378c2ecf20Sopenharmony_ci#define PPC_RAW_BCTR() (PPC_INST_BCTR) 4388c2ecf20Sopenharmony_ci#define PPC_RAW_MTCTR(r) (PPC_INST_MTCTR | ___PPC_RT(r)) 4398c2ecf20Sopenharmony_ci#define PPC_RAW_ADDI(d, a, i) (PPC_INST_ADDI | ___PPC_RT(d) | ___PPC_RA(a) | IMM_L(i)) 4408c2ecf20Sopenharmony_ci#define PPC_RAW_LI(r, i) PPC_RAW_ADDI(r, 0, i) 4418c2ecf20Sopenharmony_ci#define PPC_RAW_ADDIS(d, a, i) (PPC_INST_ADDIS | ___PPC_RT(d) | ___PPC_RA(a) | IMM_L(i)) 4428c2ecf20Sopenharmony_ci#define PPC_RAW_LIS(r, i) PPC_RAW_ADDIS(r, 0, i) 4438c2ecf20Sopenharmony_ci#define PPC_RAW_STDX(r, base, b) (0x7c00012a | ___PPC_RS(r) | ___PPC_RA(base) | ___PPC_RB(b)) 4448c2ecf20Sopenharmony_ci#define PPC_RAW_STDU(r, base, i) (0xf8000001 | ___PPC_RS(r) | ___PPC_RA(base) | ((i) & 0xfffc)) 4458c2ecf20Sopenharmony_ci#define PPC_RAW_STW(r, base, i) (0x90000000 | ___PPC_RS(r) | ___PPC_RA(base) | IMM_L(i)) 4468c2ecf20Sopenharmony_ci#define PPC_RAW_STWU(r, base, i) (0x94000000 | ___PPC_RS(r) | ___PPC_RA(base) | IMM_L(i)) 4478c2ecf20Sopenharmony_ci#define PPC_RAW_STH(r, base, i) (0xb0000000 | ___PPC_RS(r) | ___PPC_RA(base) | IMM_L(i)) 4488c2ecf20Sopenharmony_ci#define PPC_RAW_STB(r, base, i) (0x98000000 | ___PPC_RS(r) | ___PPC_RA(base) | IMM_L(i)) 4498c2ecf20Sopenharmony_ci#define PPC_RAW_LBZ(r, base, i) (0x88000000 | ___PPC_RT(r) | ___PPC_RA(base) | IMM_L(i)) 4508c2ecf20Sopenharmony_ci#define PPC_RAW_LDX(r, base, b) (0x7c00002a | ___PPC_RT(r) | ___PPC_RA(base) | ___PPC_RB(b)) 4518c2ecf20Sopenharmony_ci#define PPC_RAW_LHZ(r, base, i) (0xa0000000 | ___PPC_RT(r) | ___PPC_RA(base) | IMM_L(i)) 4528c2ecf20Sopenharmony_ci#define PPC_RAW_LHBRX(r, base, b) (0x7c00062c | ___PPC_RT(r) | ___PPC_RA(base) | ___PPC_RB(b)) 4538c2ecf20Sopenharmony_ci#define PPC_RAW_LWBRX(r, base, b) (0x7c00042c | ___PPC_RT(r) | ___PPC_RA(base) | ___PPC_RB(b)) 4548c2ecf20Sopenharmony_ci#define PPC_RAW_LDBRX(r, base, b) (0x7c000428 | ___PPC_RT(r) | ___PPC_RA(base) | ___PPC_RB(b)) 4558c2ecf20Sopenharmony_ci#define PPC_RAW_STWCX(s, a, b) (0x7c00012d | ___PPC_RS(s) | ___PPC_RA(a) | ___PPC_RB(b)) 4568c2ecf20Sopenharmony_ci#define PPC_RAW_CMPWI(a, i) (0x2c000000 | ___PPC_RA(a) | IMM_L(i)) 4578c2ecf20Sopenharmony_ci#define PPC_RAW_CMPDI(a, i) (0x2c200000 | ___PPC_RA(a) | IMM_L(i)) 4588c2ecf20Sopenharmony_ci#define PPC_RAW_CMPW(a, b) (0x7c000000 | ___PPC_RA(a) | ___PPC_RB(b)) 4598c2ecf20Sopenharmony_ci#define PPC_RAW_CMPD(a, b) (0x7c200000 | ___PPC_RA(a) | ___PPC_RB(b)) 4608c2ecf20Sopenharmony_ci#define PPC_RAW_CMPLWI(a, i) (0x28000000 | ___PPC_RA(a) | IMM_L(i)) 4618c2ecf20Sopenharmony_ci#define PPC_RAW_CMPLDI(a, i) (0x28200000 | ___PPC_RA(a) | IMM_L(i)) 4628c2ecf20Sopenharmony_ci#define PPC_RAW_CMPLW(a, b) (0x7c000040 | ___PPC_RA(a) | ___PPC_RB(b)) 4638c2ecf20Sopenharmony_ci#define PPC_RAW_CMPLD(a, b) (0x7c200040 | ___PPC_RA(a) | ___PPC_RB(b)) 4648c2ecf20Sopenharmony_ci#define PPC_RAW_SUB(d, a, b) (0x7c000050 | ___PPC_RT(d) | ___PPC_RB(a) | ___PPC_RA(b)) 4658c2ecf20Sopenharmony_ci#define PPC_RAW_MULD(d, a, b) (0x7c0001d2 | ___PPC_RT(d) | ___PPC_RA(a) | ___PPC_RB(b)) 4668c2ecf20Sopenharmony_ci#define PPC_RAW_MULW(d, a, b) (0x7c0001d6 | ___PPC_RT(d) | ___PPC_RA(a) | ___PPC_RB(b)) 4678c2ecf20Sopenharmony_ci#define PPC_RAW_MULHWU(d, a, b) (0x7c000016 | ___PPC_RT(d) | ___PPC_RA(a) | ___PPC_RB(b)) 4688c2ecf20Sopenharmony_ci#define PPC_RAW_MULI(d, a, i) (0x1c000000 | ___PPC_RT(d) | ___PPC_RA(a) | IMM_L(i)) 4698c2ecf20Sopenharmony_ci#define PPC_RAW_DIVWU(d, a, b) (0x7c000396 | ___PPC_RT(d) | ___PPC_RA(a) | ___PPC_RB(b)) 4708c2ecf20Sopenharmony_ci#define PPC_RAW_DIVDU(d, a, b) (0x7c000392 | ___PPC_RT(d) | ___PPC_RA(a) | ___PPC_RB(b)) 4718c2ecf20Sopenharmony_ci#define PPC_RAW_DIVDE(t, a, b) (0x7c000352 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4728c2ecf20Sopenharmony_ci#define PPC_RAW_DIVDE_DOT(t, a, b) (0x7c000352 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | 0x1) 4738c2ecf20Sopenharmony_ci#define PPC_RAW_DIVDEU(t, a, b) (0x7c000312 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b)) 4748c2ecf20Sopenharmony_ci#define PPC_RAW_DIVDEU_DOT(t, a, b) (0x7c000312 | ___PPC_RT(t) | ___PPC_RA(a) | ___PPC_RB(b) | 0x1) 4758c2ecf20Sopenharmony_ci#define PPC_RAW_AND(d, a, b) (0x7c000038 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(b)) 4768c2ecf20Sopenharmony_ci#define PPC_RAW_ANDI(d, a, i) (0x70000000 | ___PPC_RA(d) | ___PPC_RS(a) | IMM_L(i)) 4778c2ecf20Sopenharmony_ci#define PPC_RAW_AND_DOT(d, a, b) (0x7c000039 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(b)) 4788c2ecf20Sopenharmony_ci#define PPC_RAW_OR(d, a, b) (0x7c000378 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(b)) 4798c2ecf20Sopenharmony_ci#define PPC_RAW_MR(d, a) PPC_RAW_OR(d, a, a) 4808c2ecf20Sopenharmony_ci#define PPC_RAW_ORI(d, a, i) (PPC_INST_ORI | ___PPC_RA(d) | ___PPC_RS(a) | IMM_L(i)) 4818c2ecf20Sopenharmony_ci#define PPC_RAW_ORIS(d, a, i) (PPC_INST_ORIS | ___PPC_RA(d) | ___PPC_RS(a) | IMM_L(i)) 4828c2ecf20Sopenharmony_ci#define PPC_RAW_XOR(d, a, b) (0x7c000278 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(b)) 4838c2ecf20Sopenharmony_ci#define PPC_RAW_XORI(d, a, i) (0x68000000 | ___PPC_RA(d) | ___PPC_RS(a) | IMM_L(i)) 4848c2ecf20Sopenharmony_ci#define PPC_RAW_XORIS(d, a, i) (0x6c000000 | ___PPC_RA(d) | ___PPC_RS(a) | IMM_L(i)) 4858c2ecf20Sopenharmony_ci#define PPC_RAW_EXTSW(d, a) (0x7c0007b4 | ___PPC_RA(d) | ___PPC_RS(a)) 4868c2ecf20Sopenharmony_ci#define PPC_RAW_SLW(d, a, s) (0x7c000030 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4878c2ecf20Sopenharmony_ci#define PPC_RAW_SLD(d, a, s) (0x7c000036 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4888c2ecf20Sopenharmony_ci#define PPC_RAW_SRW(d, a, s) (0x7c000430 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4898c2ecf20Sopenharmony_ci#define PPC_RAW_SRAW(d, a, s) (0x7c000630 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4908c2ecf20Sopenharmony_ci#define PPC_RAW_SRAWI(d, a, i) (0x7c000670 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH(i)) 4918c2ecf20Sopenharmony_ci#define PPC_RAW_SRD(d, a, s) (0x7c000436 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4928c2ecf20Sopenharmony_ci#define PPC_RAW_SRAD(d, a, s) (0x7c000634 | ___PPC_RA(d) | ___PPC_RS(a) | ___PPC_RB(s)) 4938c2ecf20Sopenharmony_ci#define PPC_RAW_SRADI(d, a, i) (0x7c000674 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH64(i)) 4948c2ecf20Sopenharmony_ci#define PPC_RAW_RLWINM(d, a, i, mb, me) (0x54000000 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH(i) | __PPC_MB(mb) | __PPC_ME(me)) 4958c2ecf20Sopenharmony_ci#define PPC_RAW_RLWINM_DOT(d, a, i, mb, me) \ 4968c2ecf20Sopenharmony_ci (0x54000001 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH(i) | __PPC_MB(mb) | __PPC_ME(me)) 4978c2ecf20Sopenharmony_ci#define PPC_RAW_RLWIMI(d, a, i, mb, me) (0x50000000 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH(i) | __PPC_MB(mb) | __PPC_ME(me)) 4988c2ecf20Sopenharmony_ci#define PPC_RAW_RLDICL(d, a, i, mb) (0x78000000 | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH64(i) | __PPC_MB64(mb)) 4998c2ecf20Sopenharmony_ci#define PPC_RAW_RLDICR(d, a, i, me) (PPC_INST_RLDICR | ___PPC_RA(d) | ___PPC_RS(a) | __PPC_SH64(i) | __PPC_ME64(me)) 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_ci/* slwi = rlwinm Rx, Ry, n, 0, 31-n */ 5028c2ecf20Sopenharmony_ci#define PPC_RAW_SLWI(d, a, i) PPC_RAW_RLWINM(d, a, i, 0, 31-(i)) 5038c2ecf20Sopenharmony_ci/* srwi = rlwinm Rx, Ry, 32-n, n, 31 */ 5048c2ecf20Sopenharmony_ci#define PPC_RAW_SRWI(d, a, i) PPC_RAW_RLWINM(d, a, 32-(i), i, 31) 5058c2ecf20Sopenharmony_ci/* sldi = rldicr Rx, Ry, n, 63-n */ 5068c2ecf20Sopenharmony_ci#define PPC_RAW_SLDI(d, a, i) PPC_RAW_RLDICR(d, a, i, 63-(i)) 5078c2ecf20Sopenharmony_ci/* sldi = rldicl Rx, Ry, 64-n, n */ 5088c2ecf20Sopenharmony_ci#define PPC_RAW_SRDI(d, a, i) PPC_RAW_RLDICL(d, a, 64-(i), i) 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_ci#define PPC_RAW_NEG(d, a) (0x7c0000d0 | ___PPC_RT(d) | ___PPC_RA(a)) 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci/* Deal with instructions that older assemblers aren't aware of */ 5138c2ecf20Sopenharmony_ci#define PPC_BCCTR_FLUSH stringify_in_c(.long PPC_INST_BCCTR_FLUSH) 5148c2ecf20Sopenharmony_ci#define PPC_CP_ABORT stringify_in_c(.long PPC_RAW_CP_ABORT) 5158c2ecf20Sopenharmony_ci#define PPC_COPY(a, b) stringify_in_c(.long PPC_RAW_COPY(a, b)) 5168c2ecf20Sopenharmony_ci#define PPC_DARN(t, l) stringify_in_c(.long PPC_RAW_DARN(t, l)) 5178c2ecf20Sopenharmony_ci#define PPC_DCBAL(a, b) stringify_in_c(.long PPC_RAW_DCBAL(a, b)) 5188c2ecf20Sopenharmony_ci#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_RAW_DCBZL(a, b)) 5198c2ecf20Sopenharmony_ci#define PPC_DIVDE(t, a, b) stringify_in_c(.long PPC_RAW_DIVDE(t, a, b)) 5208c2ecf20Sopenharmony_ci#define PPC_DIVDEU(t, a, b) stringify_in_c(.long PPC_RAW_DIVDEU(t, a, b)) 5218c2ecf20Sopenharmony_ci#define PPC_DSSALL stringify_in_c(.long PPC_INST_DSSALL) 5228c2ecf20Sopenharmony_ci#define PPC_LQARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LQARX(t, a, b, eh)) 5238c2ecf20Sopenharmony_ci#define PPC_LDARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LDARX(t, a, b, eh)) 5248c2ecf20Sopenharmony_ci#define PPC_LWARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LWARX(t, a, b, eh)) 5258c2ecf20Sopenharmony_ci#define PPC_STQCX(t, a, b) stringify_in_c(.long PPC_RAW_STQCX(t, a, b)) 5268c2ecf20Sopenharmony_ci#define PPC_MADDHD(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDHD(t, a, b, c)) 5278c2ecf20Sopenharmony_ci#define PPC_MADDHDU(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDHDU(t, a, b, c)) 5288c2ecf20Sopenharmony_ci#define PPC_MADDLD(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDLD(t, a, b, c)) 5298c2ecf20Sopenharmony_ci#define PPC_MSGSND(b) stringify_in_c(.long PPC_RAW_MSGSND(b)) 5308c2ecf20Sopenharmony_ci#define PPC_MSGSYNC stringify_in_c(.long PPC_RAW_MSGSYNC) 5318c2ecf20Sopenharmony_ci#define PPC_MSGCLR(b) stringify_in_c(.long PPC_RAW_MSGCLR(b)) 5328c2ecf20Sopenharmony_ci#define PPC_MSGSNDP(b) stringify_in_c(.long PPC_RAW_MSGSNDP(b)) 5338c2ecf20Sopenharmony_ci#define PPC_MSGCLRP(b) stringify_in_c(.long PPC_RAW_MSGCLRP(b)) 5348c2ecf20Sopenharmony_ci#define PPC_PASTE(a, b) stringify_in_c(.long PPC_RAW_PASTE(a, b)) 5358c2ecf20Sopenharmony_ci#define PPC_POPCNTB(a, s) stringify_in_c(.long PPC_RAW_POPCNTB(a, s)) 5368c2ecf20Sopenharmony_ci#define PPC_POPCNTD(a, s) stringify_in_c(.long PPC_RAW_POPCNTD(a, s)) 5378c2ecf20Sopenharmony_ci#define PPC_POPCNTW(a, s) stringify_in_c(.long PPC_RAW_POPCNTW(a, s)) 5388c2ecf20Sopenharmony_ci#define PPC_RFCI stringify_in_c(.long PPC_RAW_RFCI) 5398c2ecf20Sopenharmony_ci#define PPC_RFDI stringify_in_c(.long PPC_RAW_RFDI) 5408c2ecf20Sopenharmony_ci#define PPC_RFMCI stringify_in_c(.long PPC_RAW_RFMCI) 5418c2ecf20Sopenharmony_ci#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_RAW_TLBILX(t, a, b)) 5428c2ecf20Sopenharmony_ci#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b) 5438c2ecf20Sopenharmony_ci#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b) 5448c2ecf20Sopenharmony_ci#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b) 5458c2ecf20Sopenharmony_ci#define PPC_WAIT(w) stringify_in_c(.long PPC_RAW_WAIT(w)) 5468c2ecf20Sopenharmony_ci#define PPC_TLBIE(lp, a) stringify_in_c(.long PPC_RAW_TLBIE(lp, a)) 5478c2ecf20Sopenharmony_ci#define PPC_TLBIE_5(rb, rs, ric, prs, r) \ 5488c2ecf20Sopenharmony_ci stringify_in_c(.long PPC_RAW_TLBIE_5(rb, rs, ric, prs, r)) 5498c2ecf20Sopenharmony_ci#define PPC_TLBIEL(rb,rs,ric,prs,r) \ 5508c2ecf20Sopenharmony_ci stringify_in_c(.long PPC_RAW_TLBIEL(rb, rs, ric, prs, r)) 5518c2ecf20Sopenharmony_ci#define PPC_TLBSRX_DOT(a, b) stringify_in_c(.long PPC_RAW_TLBSRX_DOT(a, b)) 5528c2ecf20Sopenharmony_ci#define PPC_TLBIVAX(a, b) stringify_in_c(.long PPC_RAW_TLBIVAX(a, b)) 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci#define PPC_ERATWE(s, a, w) stringify_in_c(.long PPC_RAW_ERATWE(s, a, w)) 5558c2ecf20Sopenharmony_ci#define PPC_ERATRE(s, a, w) stringify_in_c(.long PPC_RAW_ERATRE(a, a, w)) 5568c2ecf20Sopenharmony_ci#define PPC_ERATILX(t, a, b) stringify_in_c(.long PPC_RAW_ERATILX(t, a, b)) 5578c2ecf20Sopenharmony_ci#define PPC_ERATIVAX(s, a, b) stringify_in_c(.long PPC_RAW_ERATIVAX(s, a, b)) 5588c2ecf20Sopenharmony_ci#define PPC_ERATSX(t, a, w) stringify_in_c(.long PPC_RAW_ERATSX(t, a, w)) 5598c2ecf20Sopenharmony_ci#define PPC_ERATSX_DOT(t, a, w) stringify_in_c(.long PPC_RAW_ERATSX_DOT(t, a, w)) 5608c2ecf20Sopenharmony_ci#define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_RAW_SLBFEE_DOT(t, b)) 5618c2ecf20Sopenharmony_ci#define __PPC_SLBFEE_DOT(t, b) stringify_in_c(.long __PPC_RAW_SLBFEE_DOT(t, b)) 5628c2ecf20Sopenharmony_ci#define PPC_ICBT(c, a, b) stringify_in_c(.long PPC_RAW_ICBT(c, a, b)) 5638c2ecf20Sopenharmony_ci/* PASemi instructions */ 5648c2ecf20Sopenharmony_ci#define LBZCIX(t, a, b) stringify_in_c(.long PPC_RAW_LBZCIX(t, a, b)) 5658c2ecf20Sopenharmony_ci#define STBCIX(s, a, b) stringify_in_c(.long PPC_RAW_STBCIX(s, a, b)) 5668c2ecf20Sopenharmony_ci#define PPC_DCBFPS(a, b) stringify_in_c(.long PPC_RAW_DCBFPS(a, b)) 5678c2ecf20Sopenharmony_ci#define PPC_DCBSTPS(a, b) stringify_in_c(.long PPC_RAW_DCBSTPS(a, b)) 5688c2ecf20Sopenharmony_ci#define PPC_PHWSYNC stringify_in_c(.long PPC_RAW_PHWSYNC) 5698c2ecf20Sopenharmony_ci#define PPC_PLWSYNC stringify_in_c(.long PPC_RAW_PLWSYNC) 5708c2ecf20Sopenharmony_ci#define STXVD2X(s, a, b) stringify_in_c(.long PPC_RAW_STXVD2X(s, a, b)) 5718c2ecf20Sopenharmony_ci#define LXVD2X(s, a, b) stringify_in_c(.long PPC_RAW_LXVD2X(s, a, b)) 5728c2ecf20Sopenharmony_ci#define MFVRD(a, t) stringify_in_c(.long PPC_RAW_MFVRD(a, t)) 5738c2ecf20Sopenharmony_ci#define MTVRD(t, a) stringify_in_c(.long PPC_RAW_MTVRD(t, a)) 5748c2ecf20Sopenharmony_ci#define VPMSUMW(t, a, b) stringify_in_c(.long PPC_RAW_VPMSUMW(t, a, b)) 5758c2ecf20Sopenharmony_ci#define VPMSUMD(t, a, b) stringify_in_c(.long PPC_RAW_VPMSUMD(t, a, b)) 5768c2ecf20Sopenharmony_ci#define XXLOR(t, a, b) stringify_in_c(.long PPC_RAW_XXLOR(t, a, b)) 5778c2ecf20Sopenharmony_ci#define XXSWAPD(t, a) stringify_in_c(.long PPC_RAW_XXSWAPD(t, a)) 5788c2ecf20Sopenharmony_ci#define XVCPSGNDP(t, a, b) stringify_in_c(.long (PPC_RAW_XVCPSGNDP(t, a, b))) 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci#define VPERMXOR(vrt, vra, vrb, vrc) \ 5818c2ecf20Sopenharmony_ci stringify_in_c(.long (PPC_RAW_VPERMXOR(vrt, vra, vrb, vrc))) 5828c2ecf20Sopenharmony_ci 5838c2ecf20Sopenharmony_ci#define PPC_NAP stringify_in_c(.long PPC_RAW_NAP) 5848c2ecf20Sopenharmony_ci#define PPC_SLEEP stringify_in_c(.long PPC_RAW_SLEEP) 5858c2ecf20Sopenharmony_ci#define PPC_WINKLE stringify_in_c(.long PPC_RAW_WINKLE) 5868c2ecf20Sopenharmony_ci 5878c2ecf20Sopenharmony_ci#define PPC_STOP stringify_in_c(.long PPC_RAW_STOP) 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_ci/* BHRB instructions */ 5908c2ecf20Sopenharmony_ci#define PPC_CLRBHRB stringify_in_c(.long PPC_RAW_CLRBHRB) 5918c2ecf20Sopenharmony_ci#define PPC_MFBHRBE(r, n) stringify_in_c(.long PPC_RAW_MFBHRBE(r, n)) 5928c2ecf20Sopenharmony_ci 5938c2ecf20Sopenharmony_ci/* Transactional memory instructions */ 5948c2ecf20Sopenharmony_ci#define TRECHKPT stringify_in_c(.long PPC_RAW_TRECHKPT) 5958c2ecf20Sopenharmony_ci#define TRECLAIM(r) stringify_in_c(.long PPC_RAW_TRECLAIM(r)) 5968c2ecf20Sopenharmony_ci#define TABORT(r) stringify_in_c(.long PPC_RAW_TABORT(r)) 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci/* book3e thread control instructions */ 5998c2ecf20Sopenharmony_ci#define MTTMR(tmr, r) stringify_in_c(.long PPC_RAW_MTTMR(tmr, r)) 6008c2ecf20Sopenharmony_ci#define MFTMR(tmr, r) stringify_in_c(.long PPC_RAW_MFTMR(tmr, r)) 6018c2ecf20Sopenharmony_ci 6028c2ecf20Sopenharmony_ci/* Coprocessor instructions */ 6038c2ecf20Sopenharmony_ci#define PPC_ICSWX(s, a, b) stringify_in_c(.long PPC_RAW_ICSWX(s, a, b)) 6048c2ecf20Sopenharmony_ci#define PPC_ICSWEPX(s, a, b) stringify_in_c(.long PPC_RAW_ICSWEPX(s, a, b)) 6058c2ecf20Sopenharmony_ci 6068c2ecf20Sopenharmony_ci#define PPC_SLBIA(IH) stringify_in_c(.long PPC_RAW_SLBIA(IH)) 6078c2ecf20Sopenharmony_ci 6088c2ecf20Sopenharmony_ci/* 6098c2ecf20Sopenharmony_ci * These may only be used on ISA v3.0 or later (aka. CPU_FTR_ARCH_300, radix 6108c2ecf20Sopenharmony_ci * implies CPU_FTR_ARCH_300). USER/GUEST invalidates may only be used by radix 6118c2ecf20Sopenharmony_ci * mode (on HPT these would also invalidate various SLBEs which may not be 6128c2ecf20Sopenharmony_ci * desired). 6138c2ecf20Sopenharmony_ci */ 6148c2ecf20Sopenharmony_ci#define PPC_ISA_3_0_INVALIDATE_ERAT PPC_SLBIA(7) 6158c2ecf20Sopenharmony_ci#define PPC_RADIX_INVALIDATE_ERAT_USER PPC_SLBIA(3) 6168c2ecf20Sopenharmony_ci#define PPC_RADIX_INVALIDATE_ERAT_GUEST PPC_SLBIA(6) 6178c2ecf20Sopenharmony_ci 6188c2ecf20Sopenharmony_ci#define VCMPEQUD_RC(vrt, vra, vrb) stringify_in_c(.long PPC_RAW_VCMPEQUD_RC(vrt, vra, vrb)) 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ci#define VCMPEQUB_RC(vrt, vra, vrb) stringify_in_c(.long PPC_RAW_VCMPEQUB_RC(vrt, vra, vrb)) 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_PPC_OPCODE_H */ 623