Lines Matching +full:- +full:oc

1 //===-- ARMWinEHPrinter.cpp - Windows on ARM EH Data Printer ----*- C++ -*-===//
8 //===----------------------------------------------------------------------===//
16 // RuntimeFunction's remaining 30-bits and can fully describe the entire frame.
18 // +---------------------------------------+
20 // +---------------------------------------+
22 // +---------------------------------------+
37 // the associated exception handler. Additionally, the entry contains byte-code
40 // +---------------------------------------+
42 // +---------------------------------------+
44 // +---------------------------------------+
54 // The decoder itself is table-driven, using the first byte to determine the
60 // The byte-code maintains a 1-1 instruction mapping, indicating both the width
121 { 0x80, 0x00, &Decoder::opcode_0xxxxxxx }, // UOP_STACK_FREE (16-bit)
122 { 0xc0, 0x80, &Decoder::opcode_10Lxxxxx }, // UOP_POP (32-bit)
123 { 0xf0, 0xc0, &Decoder::opcode_1100xxxx }, // UOP_STACK_SAVE (16-bit)
124 { 0xf8, 0xd0, &Decoder::opcode_11010Lxx }, // UOP_POP (16-bit)
125 { 0xf8, 0xd8, &Decoder::opcode_11011Lxx }, // UOP_POP (32-bit)
126 { 0xf8, 0xe0, &Decoder::opcode_11100xxx }, // UOP_VPOP (32-bit)
127 { 0xfc, 0xe8, &Decoder::opcode_111010xx }, // UOP_STACK_FREE (32-bit)
128 { 0xfe, 0xec, &Decoder::opcode_1110110L }, // UOP_POP (16-bit)
129 { 0xff, 0xee, &Decoder::opcode_11101110 }, // UOP_MICROSOFT_SPECIFIC (16-bit)
134 { 0xff, 0xef, &Decoder::opcode_11101111 }, // UOP_LDRPC_POSTINC (32-bit)
135 { 0xff, 0xf5, &Decoder::opcode_11110101 }, // UOP_VPOP (32-bit)
136 { 0xff, 0xf6, &Decoder::opcode_11110110 }, // UOP_VPOP (32-bit)
137 { 0xff, 0xf7, &Decoder::opcode_11110111 }, // UOP_STACK_RESTORE (16-bit)
138 { 0xff, 0xf8, &Decoder::opcode_11111000 }, // UOP_STACK_RESTORE (16-bit)
139 { 0xff, 0xf9, &Decoder::opcode_11111001 }, // UOP_STACK_RESTORE (32-bit)
140 { 0xff, 0xfa, &Decoder::opcode_11111010 }, // UOP_STACK_RESTORE (32-bit)
141 { 0xff, 0xfb, &Decoder::opcode_11111011 }, // UOP_NOP (16-bit)
142 { 0xff, 0xfc, &Decoder::opcode_11111100 }, // UOP_NOP (32-bit)
143 { 0xff, 0xfd, &Decoder::opcode_11111101 }, // UOP_NOP (16-bit) / END
144 { 0xff, 0xfe, &Decoder::opcode_11111110 }, // UOP_NOP (32-bit) / END
192 if (VA >= Address && (VA - Address) <= Size) in getSectionContaining()
227 bool Decoder::opcode_0xxxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_0xxxxxxx() argument
229 uint8_t Imm = OC[Offset] & 0x7f; in opcode_0xxxxxxx()
231 OC[Offset], in opcode_0xxxxxxx()
238 bool Decoder::opcode_10Lxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_10Lxxxxx() argument
240 unsigned Link = (OC[Offset] & 0x20) >> 5; in opcode_10Lxxxxx()
242 | ((OC[Offset + 0] & 0x1f) << 8) in opcode_10Lxxxxx()
243 | ((OC[Offset + 1] & 0xff) << 0); in opcode_10Lxxxxx()
248 OC[Offset + 0], OC[Offset + 1], in opcode_10Lxxxxx()
257 bool Decoder::opcode_1100xxxx(const uint8_t *OC, unsigned &Offset, in opcode_1100xxxx() argument
261 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
264 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
269 bool Decoder::opcode_11010Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11010Lxx() argument
271 unsigned Link = (OC[Offset] & 0x4) >> 3; in opcode_11010Lxx()
272 unsigned Count = (OC[Offset] & 0x3); in opcode_11010Lxx()
275 | (((1 << (Count + 1)) - 1) << 4); in opcode_11010Lxx()
277 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11010Lxx()
286 bool Decoder::opcode_11011Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11011Lxx() argument
288 unsigned Link = (OC[Offset] & 0x4) >> 2; in opcode_11011Lxx()
289 unsigned Count = (OC[Offset] & 0x3) + 4; in opcode_11011Lxx()
292 | (((1 << (Count + 1)) - 1) << 4); in opcode_11011Lxx()
294 SW.startLine() << format("0x%02x ; %s.w ", OC[Offset], in opcode_11011Lxx()
303 bool Decoder::opcode_11100xxx(const uint8_t *OC, unsigned &Offset, in opcode_11100xxx() argument
305 unsigned High = (OC[Offset] & 0x7); in opcode_11100xxx()
306 uint32_t VFPMask = (((1 << (High + 1)) - 1) << 8); in opcode_11100xxx()
308 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11100xxx()
317 bool Decoder::opcode_111010xx(const uint8_t *OC, unsigned &Offset, in opcode_111010xx() argument
319 uint16_t Imm = ((OC[Offset + 0] & 0x03) << 8) | ((OC[Offset + 1] & 0xff) << 0); in opcode_111010xx()
322 OC[Offset + 0], OC[Offset + 1], in opcode_111010xx()
330 bool Decoder::opcode_1110110L(const uint8_t *OC, unsigned &Offset, in opcode_1110110L() argument
332 uint8_t GPRMask = ((OC[Offset + 0] & 0x01) << (Prologue ? 14 : 15)) in opcode_1110110L()
333 | ((OC[Offset + 1] & 0xff) << 0); in opcode_1110110L()
335 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_1110110L()
336 OC[Offset + 1], Prologue ? "push" : "pop"); in opcode_1110110L()
344 bool Decoder::opcode_11101110(const uint8_t *OC, unsigned &Offset, in opcode_11101110() argument
348 if (OC[Offset + 1] & 0xf0) in opcode_11101110()
350 OC[Offset + 0], OC[Offset + 1]); in opcode_11101110()
353 << format("0x%02x 0x%02x ; microsoft-specific (type: %u)\n", in opcode_11101110()
354 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] & 0x0f); in opcode_11101110()
360 bool Decoder::opcode_11101111(const uint8_t *OC, unsigned &Offset, in opcode_11101111() argument
364 if (OC[Offset + 1] & 0xf0) in opcode_11101111()
366 OC[Offset + 0], OC[Offset + 1]); in opcode_11101111()
370 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] << 2); in opcode_11101111()
376 bool Decoder::opcode_11110101(const uint8_t *OC, unsigned &Offset, in opcode_11110101() argument
378 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110101()
379 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110101()
380 uint32_t VFPMask = ((1 << (End - Start)) - 1) << Start; in opcode_11110101()
382 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110101()
383 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110101()
391 bool Decoder::opcode_11110110(const uint8_t *OC, unsigned &Offset, in opcode_11110110() argument
393 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110110()
394 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110110()
395 uint32_t VFPMask = ((1 << (End - Start)) - 1) << 16; in opcode_11110110()
397 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110110()
398 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110110()
406 bool Decoder::opcode_11110111(const uint8_t *OC, unsigned &Offset, in opcode_11110111() argument
408 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11110111()
411 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11110111()
419 bool Decoder::opcode_11111000(const uint8_t *OC, unsigned &Offset, in opcode_11111000() argument
421 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111000()
422 | (OC[Offset + 2] << 8) in opcode_11111000()
423 | (OC[Offset + 3] << 0); in opcode_11111000()
427 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111000()
434 bool Decoder::opcode_11111001(const uint8_t *OC, unsigned &Offset, in opcode_11111001() argument
436 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11111001()
440 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11111001()
447 bool Decoder::opcode_11111010(const uint8_t *OC, unsigned &Offset, in opcode_11111010() argument
449 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111010()
450 | (OC[Offset + 2] << 8) in opcode_11111010()
451 | (OC[Offset + 3] << 0); in opcode_11111010()
455 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111010()
462 bool Decoder::opcode_11111011(const uint8_t *OC, unsigned &Offset, in opcode_11111011() argument
464 SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); in opcode_11111011()
469 bool Decoder::opcode_11111100(const uint8_t *OC, unsigned &Offset, in opcode_11111100() argument
471 SW.startLine() << format("0x%02x ; nop.w\n", OC[Offset]); in opcode_11111100()
476 bool Decoder::opcode_11111101(const uint8_t *OC, unsigned &Offset, in opcode_11111101() argument
478 SW.startLine() << format("0x%02x ; b\n", OC[Offset]); in opcode_11111101()
483 bool Decoder::opcode_11111110(const uint8_t *OC, unsigned &Offset, in opcode_11111110() argument
485 SW.startLine() << format("0x%02x ; b.w\n", OC[Offset]); in opcode_11111110()
490 bool Decoder::opcode_11111111(const uint8_t *OC, unsigned &Offset, in opcode_11111111() argument
504 Terminated = (this->*Ring[DI].Routine)(Opcodes.data(), OI, 0, Prologue); in decodeOpcodes()
520 uint64_t Offset = VA - SectionVA; in dumpXDataRecord()
573 Expected<StringRef> Name = Symbol->getName(); in dumpXDataRecord()
612 Expected<StringRef> FunctionNameOrErr = Function->getName(); in dumpUnpackedEntry()
621 Expected<uint64_t> FunctionAddressOrErr = Function->getAddress(); in dumpUnpackedEntry()
634 FunctionAddress = PEHeader->ImageBase + RF.BeginAddress; in dumpUnpackedEntry()
640 Expected<StringRef> Name = XDataRecord->getName(); in dumpUnpackedEntry()
649 Expected<uint64_t> AddressOrErr = XDataRecord->getAddress(); in dumpUnpackedEntry()
661 Expected<section_iterator> SIOrErr = XDataRecord->getSection(); in dumpUnpackedEntry()
675 uint64_t Address = PEHeader->ImageBase + RF.ExceptionInformationRVA(); in dumpUnpackedEntry()
702 Expected<StringRef> FunctionNameOrErr = Function->getName(); in dumpPackedEntry()
711 Expected<uint64_t> FunctionAddressOrErr = Function->getAddress(); in dumpPackedEntry()
724 FunctionAddress = PEHeader->ImageBase + RF.BeginAddress; in dumpPackedEntry()
762 errs() << ".pdata content is not " << PDataEntrySize << "-byte aligned\n"; in dumpProcedureData()