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

Function MOVZ

arch/arm64/disassembler/decode2.c:17628–17660  ·  view source on GitHub ↗

movz.xml */

Source from the content-addressed store, hash-verified

17626
17627/* movz.xml */
17628int MOVZ(context *ctx, Instruction *instr)
17629{
17630 int rc = DECODE_STATUS_UNMATCHED;
17631 /* class iclass_imm18_packed */
17632 /* sf=x|opc=10|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */
17633 if((INSWORD & 0x7F800000)==0x52800000) {
17634 decode_fields32(ENC_MOVZ_32_MOVEWIDE, ctx, instr);
17635 ctx->d = UINT(ctx->Rd);
17636 ctx->datasize = (ctx->sf==1) ? 0x40 : 0x20;
17637 ctx->imm = ctx->imm16;
17638 if(!ctx->opc) {
17639 ctx->opcode = MoveWideOp_N;
17640 }
17641 else if(ctx->opc==2) {
17642 ctx->opcode = MoveWideOp_Z;
17643 }
17644 else if(ctx->opc==3) {
17645 ctx->opcode = MoveWideOp_K;
17646 }
17647 else {
17648 UNDEFINED;
17649 }
17650 if(ctx->sf==0 && SLICE(ctx->hw,1,1)==1) {
17651 UNDEFINED;
17652 }
17653 ctx->pos = UINT((ctx->hw<<4));
17654 /* regular aliases */
17655 if(!(IsZero(ctx->imm16) && ctx->hw!=0)) return MOV_MOVZ(ctx, instr);
17656 if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOVZ_32_MOVEWIDE);
17657 if(ctx->sf==1) OK(ENC_MOVZ_64_MOVEWIDE);
17658 }
17659 return rc;
17660}
17661
17662/* mov_add_addsub_imm.xml */
17663int MOV_ADD_addsub_imm(context *ctx, Instruction *instr)

Callers 1

decode_iclass_movewideFunction · 0.85

Calls 3

decode_fields32Function · 0.85
IsZeroFunction · 0.85
MOV_MOVZFunction · 0.85

Tested by

no test coverage detected