MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / MSR_imm

Function MSR_imm

arch/arm64/disassembler/decode2.c:18064–18181  ·  view source on GitHub ↗

msr_imm.xml */

Source from the content-addressed store, hash-verified

18062
18063/* msr_imm.xml */
18064int MSR_imm(context *ctx, Instruction *instr)
18065{
18066 int rc = DECODE_STATUS_UNMATCHED;
18067 /* class iclass_system */
18068 /* 1101010100|L=0|op0=00|op1=xxx|CRn=0100|CRm=xxxx|op2=xxx|Rt=11111 */
18069 if((INSWORD & 0xFFF8F01F)==0xD500401F) {
18070 decode_fields32(ENC_MSR_SI_PSTATE, ctx, instr);
18071 if(ctx->op1==0 && ctx->op2==0) {
18072 SEE /* CFINV */;
18073 }
18074 if(ctx->op1==0 && ctx->op2==1) {
18075 SEE /* XAFLAG */;
18076 }
18077 if(ctx->op1==0 && ctx->op2==2) {
18078 SEE /* AXFLAG */;
18079 }
18080 CheckSystemAccess(0,ctx->op1,4,ctx->CRm,ctx->op2,0x1f,0);
18081 ctx->need_secure = FALSE;
18082 if(!(ctx->op1&6)) {
18083 ctx->min_EL = EL1;
18084 }
18085 else if(ctx->op1==2) {
18086 ctx->min_EL = EL1;
18087 }
18088 else if(ctx->op1==3) {
18089 ctx->min_EL = EL0;
18090 }
18091 else if(ctx->op1==4) {
18092 ctx->min_EL = EL2;
18093 }
18094 else if(ctx->op1==5) {
18095 if(!HaveVirtHostExt()) {
18096 UNDEFINED;
18097 }
18098 ctx->min_EL = EL2;
18099 }
18100 else if(ctx->op1==6) {
18101 ctx->min_EL = EL3;
18102 }
18103 else if(ctx->op1==7) {
18104 ctx->min_EL = EL1;
18105 ctx->need_secure = TRUE;
18106 }
18107 /* if(UINT(ctx->pstate_el)<UINT(ctx->min_EL) || (ctx->need_secure && !IsSecure())) { UNDEFINED; } */
18108 ctx->operand = ctx->CRm;
18109 if(((ctx->op1<<3)|ctx->op2)==3) {
18110 if(!HaveUAOExt()) {
18111 UNDEFINED;
18112 }
18113 ctx->field = PSTATEField_UAO;
18114 }
18115 else if(((ctx->op1<<3)|ctx->op2)==4) {
18116 if(!HavePANExt()) {
18117 UNDEFINED;
18118 }
18119 ctx->field = PSTATEField_PAN;
18120 }
18121 else if(((ctx->op1<<3)|ctx->op2)==5) {

Callers 1

decode_iclass_pstateFunction · 0.85

Calls 4

decode_fields32Function · 0.85
CheckSystemAccessFunction · 0.85
SMSTART_MSR_immFunction · 0.85
SMSTOP_MSR_immFunction · 0.85

Tested by

no test coverage detected