Coverage Report

Created: 2025-11-09 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/capstonenext/arch/PowerPC/PPCDisassembler.c
Line
Count
Source
1
/* Capstone Disassembly Engine, http://www.capstone-engine.org */
2
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2022, */
3
/*    Rot127 <unisono@quyllur.org> 2022-2023 */
4
/* Automatically translated source file from LLVM. */
5
6
/* LLVM-commit: <commit> */
7
/* LLVM-tag: <tag> */
8
9
/* Only small edits allowed. */
10
/* For multiple similar edits, please create a Patch for the translator. */
11
12
/* Capstone's C++ file translator: */
13
/* https://github.com/capstone-engine/capstone/tree/next/suite/auto-sync */
14
15
//===------ PPCDisassembler.cpp - Disassembler for PowerPC ------*- C++ -*-===//
16
//
17
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
18
// See https://llvm.org/LICENSE.txt for license information.
19
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
20
//
21
//===----------------------------------------------------------------------===//
22
23
#include <capstone/platform.h>
24
#include <stdio.h>
25
#include <stdlib.h>
26
#include <string.h>
27
28
#include "../../LEB128.h"
29
#include "../../MCDisassembler.h"
30
#include "../../MCFixedLenDisassembler.h"
31
#include "../../MCInst.h"
32
#include "../../MCInstPrinter.h"
33
#include "../../MCInstrDesc.h"
34
#include "../../MCRegisterInfo.h"
35
#include "../../SStream.h"
36
#include "../../utils.h"
37
#include "PPCLinkage.h"
38
#include "PPCMapping.h"
39
#include "PPCMCTargetDesc.h"
40
#include "PPCPredicates.h"
41
42
#define CONCAT(a, b) CONCAT_(a, b)
43
#define CONCAT_(a, b) a##_##b
44
45
DEFINE_PPC_REGCLASSES
46
47
#define DEBUG_TYPE "ppc-disassembler"
48
49
DecodeStatus getInstruction(csh ud, const uint8_t *Bytes, size_t BytesLen,
50
          MCInst *MI, uint16_t *Size, uint64_t Address,
51
          void *Info);
52
// end anonymous namespace
53
54
static DecodeStatus decodeCondBrTarget(MCInst *Inst, unsigned Imm,
55
               uint64_t Address, const void *Decoder)
56
1.32k
{
57
1.32k
  MCOperand_CreateImm0(Inst, (SignExtend32((Imm), 14)));
58
1.32k
  return MCDisassembler_Success;
59
1.32k
}
60
61
static DecodeStatus decodeDirectBrTarget(MCInst *Inst, unsigned Imm,
62
           uint64_t Address, const void *Decoder)
63
80
{
64
80
  int32_t Offset = SignExtend32((Imm), 24);
65
80
  MCOperand_CreateImm0(Inst, (Offset));
66
80
  return MCDisassembler_Success;
67
80
}
68
69
// FIXME: These can be generated by TableGen from the existing register
70
// encoding values!
71
72
static DecodeStatus decodeRegisterClass(MCInst *Inst, uint64_t RegNo,
73
          const MCPhysReg *Regs)
74
19.9k
{
75
19.9k
  MCOperand_CreateReg0(Inst, (Regs[RegNo]));
76
19.9k
  return MCDisassembler_Success;
77
19.9k
}
78
79
static DecodeStatus DecodeCRRCRegisterClass(MCInst *Inst, uint64_t RegNo,
80
              uint64_t Address,
81
              const void *Decoder)
82
6.85k
{
83
6.85k
  return decodeRegisterClass(Inst, RegNo, CRRegs);
84
6.85k
}
85
86
static DecodeStatus DecodeCRBITRCRegisterClass(MCInst *Inst, uint64_t RegNo,
87
                 uint64_t Address,
88
                 const void *Decoder)
89
16.3k
{
90
16.3k
  return decodeRegisterClass(Inst, RegNo, CRBITRegs);
91
16.3k
}
92
93
static DecodeStatus DecodeF4RCRegisterClass(MCInst *Inst, uint64_t RegNo,
94
              uint64_t Address,
95
              const void *Decoder)
96
5.94k
{
97
5.94k
  return decodeRegisterClass(Inst, RegNo, FRegs);
98
5.94k
}
99
100
static DecodeStatus DecodeF8RCRegisterClass(MCInst *Inst, uint64_t RegNo,
101
              uint64_t Address,
102
              const void *Decoder)
103
9.74k
{
104
9.74k
  return decodeRegisterClass(Inst, RegNo, FRegs);
105
9.74k
}
106
107
static DecodeStatus DecodeFpRCRegisterClass(MCInst *Inst, uint64_t RegNo,
108
              uint64_t Address,
109
              const void *Decoder)
110
344
{
111
344
  if (RegNo > 30 || (RegNo & 1))
112
11
    return MCDisassembler_Fail;
113
333
  return decodeRegisterClass(Inst, RegNo >> 1, FpRegs);
114
344
}
115
116
static DecodeStatus DecodeVFRCRegisterClass(MCInst *Inst, uint64_t RegNo,
117
              uint64_t Address,
118
              const void *Decoder)
119
528
{
120
528
  return decodeRegisterClass(Inst, RegNo, VFRegs);
121
528
}
122
123
static DecodeStatus DecodeVRRCRegisterClass(MCInst *Inst, uint64_t RegNo,
124
              uint64_t Address,
125
              const void *Decoder)
126
15.6k
{
127
15.6k
  return decodeRegisterClass(Inst, RegNo, VRegs);
128
15.6k
}
129
130
static DecodeStatus DecodeVSRCRegisterClass(MCInst *Inst, uint64_t RegNo,
131
              uint64_t Address,
132
              const void *Decoder)
133
18.3k
{
134
18.3k
  return decodeRegisterClass(Inst, RegNo, VSRegs);
135
18.3k
}
136
137
static DecodeStatus DecodeVSFRCRegisterClass(MCInst *Inst, uint64_t RegNo,
138
               uint64_t Address,
139
               const void *Decoder)
140
4.38k
{
141
4.38k
  return decodeRegisterClass(Inst, RegNo, VSFRegs);
142
4.38k
}
143
144
static DecodeStatus DecodeVSSRCRegisterClass(MCInst *Inst, uint64_t RegNo,
145
               uint64_t Address,
146
               const void *Decoder)
147
3.10k
{
148
3.10k
  return decodeRegisterClass(Inst, RegNo, VSSRegs);
149
3.10k
}
150
151
static DecodeStatus DecodeGPRCRegisterClass(MCInst *Inst, uint64_t RegNo,
152
              uint64_t Address,
153
              const void *Decoder)
154
100k
{
155
100k
  return decodeRegisterClass(Inst, RegNo, RRegs);
156
100k
}
157
158
static DecodeStatus DecodeGPRC_NOR0RegisterClass(MCInst *Inst, uint64_t RegNo,
159
             uint64_t Address,
160
             const void *Decoder)
161
11.9k
{
162
11.9k
  return decodeRegisterClass(Inst, RegNo, RRegsNoR0);
163
11.9k
}
164
165
static DecodeStatus DecodeG8RCRegisterClass(MCInst *Inst, uint64_t RegNo,
166
              uint64_t Address,
167
              const void *Decoder)
168
25.3k
{
169
25.3k
  return decodeRegisterClass(Inst, RegNo, XRegs);
170
25.3k
}
171
172
static DecodeStatus DecodeG8pRCRegisterClass(MCInst *Inst, uint64_t RegNo,
173
               uint64_t Address,
174
               const void *Decoder)
175
207
{
176
207
  return decodeRegisterClass(Inst, RegNo, XRegs);
177
207
}
178
179
static DecodeStatus DecodeG8RC_NOX0RegisterClass(MCInst *Inst, uint64_t RegNo,
180
             uint64_t Address,
181
             const void *Decoder)
182
102
{
183
102
  return decodeRegisterClass(Inst, RegNo, XRegsNoX0);
184
102
}
185
186
256
#define DecodePointerLikeRegClass0 DecodeGPRCRegisterClass
187
2.99k
#define DecodePointerLikeRegClass1 DecodeGPRC_NOR0RegisterClass
188
189
static DecodeStatus DecodeSPERCRegisterClass(MCInst *Inst, uint64_t RegNo,
190
               uint64_t Address,
191
               const void *Decoder)
192
0
{
193
0
  return decodeRegisterClass(Inst, RegNo, SPERegs);
194
0
}
195
196
static DecodeStatus DecodeACCRCRegisterClass(MCInst *Inst, uint64_t RegNo,
197
               uint64_t Address,
198
               const void *Decoder)
199
0
{
200
0
  return decodeRegisterClass(Inst, RegNo, ACCRegs);
201
0
}
202
203
static DecodeStatus DecodeWACCRCRegisterClass(MCInst *Inst, uint64_t RegNo,
204
                uint64_t Address,
205
                const void *Decoder)
206
2
{
207
2
  return decodeRegisterClass(Inst, RegNo, WACCRegs);
208
2
}
209
210
static DecodeStatus DecodeWACC_HIRCRegisterClass(MCInst *Inst, uint64_t RegNo,
211
             uint64_t Address,
212
             const void *Decoder)
213
30
{
214
30
  return decodeRegisterClass(Inst, RegNo, WACC_HIRegs);
215
30
}
216
217
// TODO: Make this function static when the register class is used by a new
218
//       instruction.
219
DecodeStatus DecodeDMRROWRCRegisterClass(MCInst *Inst, uint64_t RegNo,
220
           uint64_t Address, const void *Decoder)
221
0
{
222
0
  return decodeRegisterClass(Inst, RegNo, DMRROWRegs);
223
0
}
224
225
static DecodeStatus DecodeDMRROWpRCRegisterClass(MCInst *Inst, uint64_t RegNo,
226
             uint64_t Address,
227
             const void *Decoder)
228
7
{
229
7
  return decodeRegisterClass(Inst, RegNo, DMRROWpRegs);
230
7
}
231
232
static DecodeStatus DecodeDMRRCRegisterClass(MCInst *Inst, uint64_t RegNo,
233
               uint64_t Address,
234
               const void *Decoder)
235
85
{
236
85
  return decodeRegisterClass(Inst, RegNo, DMRRegs);
237
85
}
238
239
// TODO: Make this function static when the register class is used by a new
240
//       instruction.
241
DecodeStatus DecodeDMRpRCRegisterClass(MCInst *Inst, uint64_t RegNo,
242
               uint64_t Address, const void *Decoder)
243
0
{
244
0
  return decodeRegisterClass(Inst, RegNo, DMRpRegs);
245
0
}
246
247
static DecodeStatus DecodeVSRpRCRegisterClass(MCInst *Inst, uint64_t RegNo,
248
                uint64_t Address,
249
                const void *Decoder)
250
240
{
251
240
  return decodeRegisterClass(Inst, RegNo, VSRpRegs);
252
240
}
253
254
155
#define DecodeQSRCRegisterClass DecodeQFRCRegisterClass
255
97
#define DecodeQBRCRegisterClass DecodeQFRCRegisterClass
256
257
static DecodeStatus DecodeQFRCRegisterClass(MCInst *Inst, uint64_t RegNo,
258
              uint64_t Address,
259
              const void *Decoder)
260
18.8k
{
261
18.8k
  return decodeRegisterClass(Inst, RegNo, QFRegs);
262
18.8k
}
263
264
#define DEFINE_decodeUImmOperand(N) \
265
  static DecodeStatus CONCAT(decodeUImmOperand, \
266
           N)(MCInst * Inst, uint64_t Imm, \
267
              int64_t Address, const void *Decoder) \
268
5.11k
  { \
269
5.11k
    if (!isUIntN(N, Imm)) \
270
5.11k
      return MCDisassembler_Fail; \
271
5.11k
    MCOperand_CreateImm0(Inst, (Imm)); \
272
5.11k
    return MCDisassembler_Success; \
273
5.11k
  }
PPCDisassembler.c:decodeUImmOperand_5
Line
Count
Source
268
2.65k
  { \
269
2.65k
    if (!isUIntN(N, Imm)) \
270
2.65k
      return MCDisassembler_Fail; \
271
2.65k
    MCOperand_CreateImm0(Inst, (Imm)); \
272
2.65k
    return MCDisassembler_Success; \
273
2.65k
  }
PPCDisassembler.c:decodeUImmOperand_1
Line
Count
Source
268
306
  { \
269
306
    if (!isUIntN(N, Imm)) \
270
306
      return MCDisassembler_Fail; \
271
306
    MCOperand_CreateImm0(Inst, (Imm)); \
272
306
    return MCDisassembler_Success; \
273
306
  }
PPCDisassembler.c:decodeUImmOperand_4
Line
Count
Source
268
319
  { \
269
319
    if (!isUIntN(N, Imm)) \
270
319
      return MCDisassembler_Fail; \
271
319
    MCOperand_CreateImm0(Inst, (Imm)); \
272
318
    return MCDisassembler_Success; \
273
319
  }
PPCDisassembler.c:decodeUImmOperand_3
Line
Count
Source
268
317
  { \
269
317
    if (!isUIntN(N, Imm)) \
270
317
      return MCDisassembler_Fail; \
271
317
    MCOperand_CreateImm0(Inst, (Imm)); \
272
317
    return MCDisassembler_Success; \
273
317
  }
PPCDisassembler.c:decodeUImmOperand_16
Line
Count
Source
268
458
  { \
269
458
    if (!isUIntN(N, Imm)) \
270
458
      return MCDisassembler_Fail; \
271
458
    MCOperand_CreateImm0(Inst, (Imm)); \
272
458
    return MCDisassembler_Success; \
273
458
  }
PPCDisassembler.c:decodeUImmOperand_6
Line
Count
Source
268
822
  { \
269
822
    if (!isUIntN(N, Imm)) \
270
822
      return MCDisassembler_Fail; \
271
822
    MCOperand_CreateImm0(Inst, (Imm)); \
272
822
    return MCDisassembler_Success; \
273
822
  }
PPCDisassembler.c:decodeUImmOperand_2
Line
Count
Source
268
195
  { \
269
195
    if (!isUIntN(N, Imm)) \
270
195
      return MCDisassembler_Fail; \
271
195
    MCOperand_CreateImm0(Inst, (Imm)); \
272
195
    return MCDisassembler_Success; \
273
195
  }
Unexecuted instantiation: PPCDisassembler.c:decodeUImmOperand_10
PPCDisassembler.c:decodeUImmOperand_8
Line
Count
Source
268
12
  { \
269
12
    if (!isUIntN(N, Imm)) \
270
12
      return MCDisassembler_Fail; \
271
12
    MCOperand_CreateImm0(Inst, (Imm)); \
272
12
    return MCDisassembler_Success; \
273
12
  }
PPCDisassembler.c:decodeUImmOperand_7
Line
Count
Source
268
10
  { \
269
10
    if (!isUIntN(N, Imm)) \
270
10
      return MCDisassembler_Fail; \
271
10
    MCOperand_CreateImm0(Inst, (Imm)); \
272
10
    return MCDisassembler_Success; \
273
10
  }
PPCDisassembler.c:decodeUImmOperand_12
Line
Count
Source
268
21
  { \
269
21
    if (!isUIntN(N, Imm)) \
270
21
      return MCDisassembler_Fail; \
271
21
    MCOperand_CreateImm0(Inst, (Imm)); \
272
21
    return MCDisassembler_Success; \
273
21
  }
274
DEFINE_decodeUImmOperand(1);
275
DEFINE_decodeUImmOperand(2);
276
DEFINE_decodeUImmOperand(3);
277
DEFINE_decodeUImmOperand(4);
278
DEFINE_decodeUImmOperand(5);
279
DEFINE_decodeUImmOperand(6);
280
DEFINE_decodeUImmOperand(7);
281
DEFINE_decodeUImmOperand(8);
282
DEFINE_decodeUImmOperand(10);
283
DEFINE_decodeUImmOperand(12);
284
DEFINE_decodeUImmOperand(16);
285
286
#define DEFINE_decodeSImmOperand(N) \
287
  static DecodeStatus CONCAT(decodeSImmOperand, \
288
           N)(MCInst * Inst, uint64_t Imm, \
289
              int64_t Address, const void *Decoder) \
290
841
  { \
291
841
    if (!isUIntN(N, Imm)) \
292
841
      return MCDisassembler_Fail; \
293
841
    MCOperand_CreateImm0(Inst, (SignExtend64((Imm), N))); \
294
841
    return MCDisassembler_Success; \
295
841
  }
PPCDisassembler.c:decodeSImmOperand_16
Line
Count
Source
290
766
  { \
291
766
    if (!isUIntN(N, Imm)) \
292
766
      return MCDisassembler_Fail; \
293
766
    MCOperand_CreateImm0(Inst, (SignExtend64((Imm), N))); \
294
766
    return MCDisassembler_Success; \
295
766
  }
PPCDisassembler.c:decodeSImmOperand_5
Line
Count
Source
290
15
  { \
291
15
    if (!isUIntN(N, Imm)) \
292
15
      return MCDisassembler_Fail; \
293
15
    MCOperand_CreateImm0(Inst, (SignExtend64((Imm), N))); \
294
15
    return MCDisassembler_Success; \
295
15
  }
PPCDisassembler.c:decodeSImmOperand_34
Line
Count
Source
290
60
  { \
291
60
    if (!isUIntN(N, Imm)) \
292
60
      return MCDisassembler_Fail; \
293
60
    MCOperand_CreateImm0(Inst, (SignExtend64((Imm), N))); \
294
60
    return MCDisassembler_Success; \
295
60
  }
296
DEFINE_decodeSImmOperand(16);
297
DEFINE_decodeSImmOperand(5);
298
DEFINE_decodeSImmOperand(34);
299
300
static DecodeStatus decodeImmZeroOperand(MCInst *Inst, uint64_t Imm,
301
           int64_t Address, const void *Decoder)
302
49
{
303
49
  if (Imm != 0)
304
1
    return MCDisassembler_Fail;
305
48
  MCOperand_CreateImm0(Inst, (Imm));
306
48
  return MCDisassembler_Success;
307
49
}
308
309
static DecodeStatus decodeVSRpEvenOperands(MCInst *Inst, uint64_t RegNo,
310
             uint64_t Address,
311
             const void *Decoder)
312
0
{
313
0
  if (RegNo & 1)
314
0
    return MCDisassembler_Fail;
315
0
  MCOperand_CreateReg0(Inst, (VSRpRegs[RegNo >> 1]));
316
0
  return MCDisassembler_Success;
317
0
}
318
319
static DecodeStatus decodeDispSPE8Operand(MCInst *Inst, uint64_t Imm,
320
            int64_t Address, const void *Decoder)
321
0
{
322
  // Decode the dispSPE8 field, which has 5-bits, 8-byte aligned.
323
324
0
  uint64_t Disp = Imm & 0x1F;
325
326
0
  MCOperand_CreateImm0(Inst, (Disp << 3));
327
0
  return MCDisassembler_Success;
328
0
}
329
330
static DecodeStatus decodeDispSPE4Operand(MCInst *Inst, uint64_t Imm,
331
            int64_t Address, const void *Decoder)
332
0
{
333
  // Decode the dispSPE8 field, which has 5-bits, 4-byte aligned.
334
335
0
  uint64_t Disp = Imm & 0x1F;
336
337
0
  MCOperand_CreateImm0(Inst, (Disp << 2));
338
0
  return MCDisassembler_Success;
339
0
}
340
341
static DecodeStatus decodeDispSPE2Operand(MCInst *Inst, uint64_t Imm,
342
            int64_t Address, const void *Decoder)
343
0
{
344
  // Decode the dispSPE8 field, which has 5-bits, 2-byte aligned.
345
346
0
  uint64_t Disp = Imm & 0x1F;
347
0
  MCOperand_CreateImm0(Inst, (Disp << 1));
348
0
  return MCDisassembler_Success;
349
0
}
350
351
static DecodeStatus decodeDispRIXOperand(MCInst *Inst, uint64_t Imm,
352
           int64_t Address, const void *Decoder)
353
623
{
354
  // The rix displacement is an immediate shifted by 2
355
623
  MCOperand_CreateImm0(Inst, (SignExtend64((Imm << 2), 16)));
356
623
  return MCDisassembler_Success;
357
623
}
358
359
static DecodeStatus decodeDispRIX16Operand(MCInst *Inst, uint64_t Imm,
360
             int64_t Address, const void *Decoder)
361
200
{
362
  // The rix16 displacement has 12-bits which are shifted by 4.
363
200
  MCOperand_CreateImm0(Inst, (SignExtend64((Imm << 4), 16)));
364
200
  return MCDisassembler_Success;
365
200
}
366
367
static DecodeStatus decodeDispRIHashOperand(MCInst *Inst, uint64_t Imm,
368
              int64_t Address,
369
              const void *Decoder)
370
15
{
371
  // Decode the disp field for a hash store or hash check operation.
372
  // The field is composed of an immediate value that is 6 bits
373
  // and covers the range -8 to -512. The immediate is always negative and 2s
374
  // complement which is why we sign extend a 7 bit value.
375
15
  const int64_t Disp = SignExtend64(((Imm & 0x3F) + 64), 7) * 8;
376
377
15
  MCOperand_CreateImm0(Inst, (Disp));
378
15
  return MCDisassembler_Success;
379
15
}
380
381
static DecodeStatus decodeCRBitMOperand(MCInst *Inst, uint64_t Imm,
382
          int64_t Address, const void *Decoder)
383
1.25k
{
384
  // The cr bit encoding is 0x80 >> cr_reg_num.
385
386
1.25k
  unsigned Zeros = CountTrailingZeros_32(Imm);
387
1.25k
  if (Zeros >= 8)
388
2
    return MCDisassembler_Fail;
389
390
1.25k
  MCOperand_CreateReg0(Inst, (CRRegs[7 - Zeros]));
391
1.25k
  return MCDisassembler_Success;
392
1.25k
}
393
394
#include "PPCGenDisassemblerTables.inc"
395
396
DecodeStatus getInstruction(csh ud, const uint8_t *Bytes, size_t BytesLen,
397
          MCInst *MI, uint16_t *Size, uint64_t Address,
398
          void *Info)
399
10.0k
{
400
  // If this is an 8-byte prefixed instruction, handle it here.
401
  // Note: prefixed instructions aren't technically 8-byte entities - the
402
  // prefix
403
  //       appears in memory at an address 4 bytes prior to that of the base
404
  //       instruction regardless of endianness. So we read the two pieces and
405
  //       rebuild the 8-byte instruction.
406
  // TODO: In this function we call decodeInstruction several times with
407
  //       different decoder tables. It may be possible to only call once by
408
  //       looking at the top 6 bits of the instruction.
409
10.0k
  if (PPC_getFeatureBits(MI->csh->mode, PPC_FeaturePrefixInstrs) &&
410
10.0k
      BytesLen >= 8) {
411
9.51k
    uint32_t Prefix = readBytes32(MI, Bytes);
412
9.51k
    uint32_t BaseInst = readBytes32(MI, Bytes + 4);
413
9.51k
    uint64_t Inst = BaseInst | (uint64_t)Prefix << 32;
414
9.51k
    DecodeStatus result = decodeInstruction_4(DecoderTable64, MI,
415
9.51k
                Inst, Address, NULL);
416
9.51k
    if (result != MCDisassembler_Fail) {
417
95
      *Size = 8;
418
95
      return result;
419
95
    }
420
9.51k
  }
421
422
  // Get the four bytes of the instruction.
423
9.93k
  *Size = 4;
424
9.93k
  if (BytesLen < 4) {
425
114
    *Size = 0;
426
114
    return MCDisassembler_Fail;
427
114
  }
428
429
  // Read the instruction in the proper endianness.
430
9.81k
  uint64_t Inst = readBytes32(MI, Bytes);
431
432
9.81k
  if (PPC_getFeatureBits(MI->csh->mode, PPC_FeatureQPX)) {
433
3.66k
    DecodeStatus result = decodeInstruction_4(DecoderTableQPX32, MI,
434
3.66k
                Inst, Address, NULL);
435
3.66k
    if (result != MCDisassembler_Fail)
436
253
      return result;
437
6.15k
  } else if (PPC_getFeatureBits(MI->csh->mode, PPC_FeatureSPE)) {
438
0
    DecodeStatus result = decodeInstruction_4(DecoderTableSPE32, MI,
439
0
                Inst, Address, NULL);
440
0
    if (result != MCDisassembler_Fail)
441
0
      return result;
442
6.15k
  } else if (PPC_getFeatureBits(MI->csh->mode, PPC_FeaturePS)) {
443
1.77k
    DecodeStatus result = decodeInstruction_4(DecoderTablePS32, MI,
444
1.77k
                Inst, Address, NULL);
445
1.77k
    if (result != MCDisassembler_Fail)
446
226
      return result;
447
1.77k
  }
448
449
9.33k
  return decodeInstruction_4(DecoderTable32, MI, Inst, Address, NULL);
450
9.81k
}
451
452
DecodeStatus PPC_LLVM_getInstruction(csh handle, const uint8_t *Bytes,
453
             size_t BytesLen, MCInst *MI,
454
             uint16_t *Size, uint64_t Address,
455
             void *Info)
456
10.0k
{
457
10.0k
  return getInstruction(handle, Bytes, BytesLen, MI, Size, Address, Info);
458
10.0k
}