eor_log_shift.xml */
| 3786 | |
| 3787 | /* eor_log_shift.xml */ |
| 3788 | int EOR_log_shift(context *ctx, Instruction *instr) |
| 3789 | { |
| 3790 | int rc = DECODE_STATUS_UNMATCHED; |
| 3791 | /* class iclass_general */ |
| 3792 | /* sf=x|opc=10|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ |
| 3793 | if((INSWORD & 0x7F200000)==0x4A000000) { |
| 3794 | decode_fields32(ENC_EOR_32_LOG_SHIFT, ctx, instr); |
| 3795 | ctx->d = UINT(ctx->Rd); |
| 3796 | ctx->n = UINT(ctx->Rn); |
| 3797 | ctx->m = UINT(ctx->Rm); |
| 3798 | ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20; |
| 3799 | if(!ctx->opc) { |
| 3800 | ctx->op = LogicalOp_AND; |
| 3801 | ctx->setflags = FALSE; |
| 3802 | instr->setflags = FLAGEFFECT_NONE; |
| 3803 | } |
| 3804 | else if(ctx->opc==1) { |
| 3805 | ctx->op = LogicalOp_ORR; |
| 3806 | ctx->setflags = FALSE; |
| 3807 | instr->setflags = FLAGEFFECT_NONE; |
| 3808 | } |
| 3809 | else if(ctx->opc==2) { |
| 3810 | ctx->op = LogicalOp_EOR; |
| 3811 | ctx->setflags = FALSE; |
| 3812 | instr->setflags = FLAGEFFECT_NONE; |
| 3813 | } |
| 3814 | else if(ctx->opc==3) { |
| 3815 | ctx->op = LogicalOp_AND; |
| 3816 | ctx->setflags = TRUE; |
| 3817 | instr->setflags = FLAGEFFECT_SETS; |
| 3818 | } |
| 3819 | if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { |
| 3820 | UNDEFINED; |
| 3821 | } |
| 3822 | ctx->shift_type = DecodeShift(ctx->shift); |
| 3823 | ctx->shift_amount = UINT(ctx->imm6); |
| 3824 | ctx->invert = (ctx->N==1); |
| 3825 | if(ctx->sf==0) OK(ENC_EOR_32_LOG_SHIFT); |
| 3826 | if(ctx->sf==1) OK(ENC_EOR_64_LOG_SHIFT); |
| 3827 | } |
| 3828 | return rc; |
| 3829 | } |
| 3830 | |
| 3831 | /* eret.xml */ |
| 3832 | int ERET(context *ctx, Instruction *instr) |
no test coverage detected