search for: fieldfrominstruction

Displaying 4 results from an estimated 4 matches for "fieldfrominstruction".

2012 Dec 21
1
[LLVMdev] A potential bug in helper function "fieldFromInstruction" in tablegen'erated file "XXXGenDisassemblerTables.inc"
Helper function: template<typename InsnType> static InsnType fieldFromInstruction(InsnType insn, unsigned startBit, unsigned numBits) { assert(startBit + numBits <= (sizeof(InsnType)*8) && "Instruction field out of bounds!"); InsnType fieldMask; if (numBits == sizeof(InsnType)*8) fieldMask = (...
2017 Nov 30
2
PPC64 Disassembler
...GenDisassemblerTables.inc”, where the table is > declared, and where the it > > is decoded, so the current instruction bne cr7,0x2000092c (0x409e000c) is > being processed by > > the case 30 in the PPCGenDisassemblerTables.inc file: > > case 30: > > tmp = fieldFromInstruction(insn, 21, 5); > > if (decodeUImmOperand<5>(MI, tmp, Address, Decoder) == > MCDisassembler::Fail) { return MCDisassembler::Fail; } > > tmp = fieldFromInstruction(insn, 16, 5); > > if (DecodeCRBITRCRegisterClass(MI, tmp, Address, Decoder) == > MCD...
2017 Nov 30
2
PPC64 Disassembler
The `isBranch` flag is already set on the branch instructions. Furthermore, we do use the `isBranch()` query in a few places in the PPC back end, so this does work. Perhaps there's something specific about the lldb usage? Is it somehow possible that the `isBranch()` query is called on the wrong instruction? Would you be able to provide a test case that reproduces the issue? On Thu, Nov 30,
2013 Apr 30
3
[LLVMdev] A simpler method to reject undefined encodings
...the MC disassembler. In order to correct this I would have to create custom decoder methods for a dozen-some instructions which is wasteful. I would much prefer to be able to define a constraint function like: static DecodeStatus CheckNEONConstraint(const MCInst &Inst, unsigned Insn) { Vd = fieldFromInstruction(Insn, 12, 4); Vm = fieldFromInstruction(Insn, 0, 4); Vn = fieldFromInstruction(Insn, 16, 4); Q = fieldFromInstruction(Insn, 6, 1); if (Q == 1 && ((Vd & 1) || (Vm & 1) || (Vn & 1))) return MCDisassembler::Fail; return MCDIsassembler::Success; } Then I'd like...