MCPcopy Create free account
hub / github.com/capstone-engine/capstone / DecodeVLDInstruction

Function DecodeVLDInstruction

arch/ARM/ARMDisassembler.c:2513–2794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2511}
2512
2513static DecodeStatus DecodeVLDInstruction(MCInst *Inst, unsigned Insn,
2514 uint64_t Address, const void *Decoder)
2515{
2516 DecodeStatus S = MCDisassembler_Success;
2517 unsigned wb, Rn, Rm;
2518 unsigned Rd = fieldFromInstruction_4(Insn, 12, 4);
2519 Rd |= fieldFromInstruction_4(Insn, 22, 1) << 4;
2520 wb = fieldFromInstruction_4(Insn, 16, 4);
2521 Rn = fieldFromInstruction_4(Insn, 16, 4);
2522 Rn |= fieldFromInstruction_4(Insn, 4, 2) << 4;
2523 Rm = fieldFromInstruction_4(Insn, 0, 4);
2524
2525 // First output register
2526 switch (MCInst_getOpcode(Inst)) {
2527 case ARM_VLD1q16: case ARM_VLD1q32: case ARM_VLD1q64: case ARM_VLD1q8:
2528 case ARM_VLD1q16wb_fixed: case ARM_VLD1q16wb_register:
2529 case ARM_VLD1q32wb_fixed: case ARM_VLD1q32wb_register:
2530 case ARM_VLD1q64wb_fixed: case ARM_VLD1q64wb_register:
2531 case ARM_VLD1q8wb_fixed: case ARM_VLD1q8wb_register:
2532 case ARM_VLD2d16: case ARM_VLD2d32: case ARM_VLD2d8:
2533 case ARM_VLD2d16wb_fixed: case ARM_VLD2d16wb_register:
2534 case ARM_VLD2d32wb_fixed: case ARM_VLD2d32wb_register:
2535 case ARM_VLD2d8wb_fixed: case ARM_VLD2d8wb_register:
2536 if (!Check(&S, DecodeDPairRegisterClass(Inst, Rd, Address, Decoder)))
2537 return MCDisassembler_Fail;
2538 break;
2539
2540 case ARM_VLD2b16:
2541 case ARM_VLD2b32:
2542 case ARM_VLD2b8:
2543 case ARM_VLD2b16wb_fixed:
2544 case ARM_VLD2b16wb_register:
2545 case ARM_VLD2b32wb_fixed:
2546 case ARM_VLD2b32wb_register:
2547 case ARM_VLD2b8wb_fixed:
2548 case ARM_VLD2b8wb_register:
2549 if (!Check(&S, DecodeDPairSpacedRegisterClass(Inst, Rd, Address, Decoder)))
2550 return MCDisassembler_Fail;
2551 break;
2552
2553 default:
2554 if (!Check(&S, DecodeDPRRegisterClass(Inst, Rd, Address, Decoder)))
2555 return MCDisassembler_Fail;
2556 }
2557
2558 // Second output register
2559 switch (MCInst_getOpcode(Inst)) {
2560 case ARM_VLD3d8:
2561 case ARM_VLD3d16:
2562 case ARM_VLD3d32:
2563 case ARM_VLD3d8_UPD:
2564 case ARM_VLD3d16_UPD:
2565 case ARM_VLD3d32_UPD:
2566 case ARM_VLD4d8:
2567 case ARM_VLD4d16:
2568 case ARM_VLD4d32:
2569 case ARM_VLD4d8_UPD:
2570 case ARM_VLD4d16_UPD:

Callers 4

DecodeVLDST1InstructionFunction · 0.85
DecodeVLDST2InstructionFunction · 0.85
DecodeVLDST3InstructionFunction · 0.85
DecodeVLDST4InstructionFunction · 0.85

Calls 9

MCInst_getOpcodeFunction · 0.85
DecodeDPairRegisterClassFunction · 0.85
DecodeDPRRegisterClassFunction · 0.85
MCOperand_CreateImm0Function · 0.85
DecodeAddrMode6OperandFunction · 0.85
MCOperand_CreateReg0Function · 0.85
CheckFunction · 0.70
DecodeGPRRegisterClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…