18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/****************************************************************************** 38c2ecf20Sopenharmony_ci * arch/ia64/include/asm/native/inst.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> 68c2ecf20Sopenharmony_ci * VA Linux Systems Japan K.K. 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define MOV_FROM_IFA(reg) \ 128c2ecf20Sopenharmony_ci mov reg = cr.ifa 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define MOV_FROM_ITIR(reg) \ 158c2ecf20Sopenharmony_ci mov reg = cr.itir 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define MOV_FROM_ISR(reg) \ 188c2ecf20Sopenharmony_ci mov reg = cr.isr 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define MOV_FROM_IHA(reg) \ 218c2ecf20Sopenharmony_ci mov reg = cr.iha 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define MOV_FROM_IPSR(pred, reg) \ 248c2ecf20Sopenharmony_ci(pred) mov reg = cr.ipsr 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define MOV_FROM_IIM(reg) \ 278c2ecf20Sopenharmony_ci mov reg = cr.iim 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define MOV_FROM_IIP(reg) \ 308c2ecf20Sopenharmony_ci mov reg = cr.iip 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define MOV_FROM_IVR(reg, clob) \ 338c2ecf20Sopenharmony_ci mov reg = cr.ivr 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define MOV_FROM_PSR(pred, reg, clob) \ 368c2ecf20Sopenharmony_ci(pred) mov reg = psr 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define MOV_FROM_ITC(pred, pred_clob, reg, clob) \ 398c2ecf20Sopenharmony_ci(pred) mov reg = ar.itc 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#define MOV_TO_IFA(reg, clob) \ 428c2ecf20Sopenharmony_ci mov cr.ifa = reg 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#define MOV_TO_ITIR(pred, reg, clob) \ 458c2ecf20Sopenharmony_ci(pred) mov cr.itir = reg 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define MOV_TO_IHA(pred, reg, clob) \ 488c2ecf20Sopenharmony_ci(pred) mov cr.iha = reg 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define MOV_TO_IPSR(pred, reg, clob) \ 518c2ecf20Sopenharmony_ci(pred) mov cr.ipsr = reg 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define MOV_TO_IFS(pred, reg, clob) \ 548c2ecf20Sopenharmony_ci(pred) mov cr.ifs = reg 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define MOV_TO_IIP(reg, clob) \ 578c2ecf20Sopenharmony_ci mov cr.iip = reg 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define MOV_TO_KR(kr, reg, clob0, clob1) \ 608c2ecf20Sopenharmony_ci mov IA64_KR(kr) = reg 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#define ITC_I(pred, reg, clob) \ 638c2ecf20Sopenharmony_ci(pred) itc.i reg 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define ITC_D(pred, reg, clob) \ 668c2ecf20Sopenharmony_ci(pred) itc.d reg 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define ITC_I_AND_D(pred_i, pred_d, reg, clob) \ 698c2ecf20Sopenharmony_ci(pred_i) itc.i reg; \ 708c2ecf20Sopenharmony_ci(pred_d) itc.d reg 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci#define THASH(pred, reg0, reg1, clob) \ 738c2ecf20Sopenharmony_ci(pred) thash reg0 = reg1 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(clob0, clob1) \ 768c2ecf20Sopenharmony_ci ssm psr.ic | PSR_DEFAULT_BITS \ 778c2ecf20Sopenharmony_ci ;; \ 788c2ecf20Sopenharmony_ci srlz.i /* guarantee that interruption collectin is on */ \ 798c2ecf20Sopenharmony_ci ;; 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define SSM_PSR_IC_AND_SRLZ_D(clob0, clob1) \ 828c2ecf20Sopenharmony_ci ssm psr.ic \ 838c2ecf20Sopenharmony_ci ;; \ 848c2ecf20Sopenharmony_ci srlz.d 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci#define RSM_PSR_IC(clob) \ 878c2ecf20Sopenharmony_ci rsm psr.ic 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define SSM_PSR_I(pred, pred_clob, clob) \ 908c2ecf20Sopenharmony_ci(pred) ssm psr.i 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define RSM_PSR_I(pred, clob0, clob1) \ 938c2ecf20Sopenharmony_ci(pred) rsm psr.i 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define RSM_PSR_I_IC(clob0, clob1, clob2) \ 968c2ecf20Sopenharmony_ci rsm psr.i | psr.ic 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#define RSM_PSR_DT \ 998c2ecf20Sopenharmony_ci rsm psr.dt 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define RSM_PSR_BE_I(clob0, clob1) \ 1028c2ecf20Sopenharmony_ci rsm psr.be | psr.i 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci#define SSM_PSR_DT_AND_SRLZ_I \ 1058c2ecf20Sopenharmony_ci ssm psr.dt \ 1068c2ecf20Sopenharmony_ci ;; \ 1078c2ecf20Sopenharmony_ci srlz.i 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci#define BSW_0(clob0, clob1, clob2) \ 1108c2ecf20Sopenharmony_ci bsw.0 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci#define BSW_1(clob0, clob1) \ 1138c2ecf20Sopenharmony_ci bsw.1 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#define COVER \ 1168c2ecf20Sopenharmony_ci cover 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define RFI \ 1198c2ecf20Sopenharmony_ci rfi 120