Advertisement
Guest User

Untitled

a guest
Aug 29th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.29 KB | None | 0 0
  1. --- a/opcodes/ppc-svp64-dis.c
  2. +++ b/opcodes/ppc-svp64-dis.c
  3. @@ -45,19 +45,17 @@ static const struct powerpc_opcode *
  4.  svp64_lookup (uint64_t insn, ppc_cpu_t dialect,
  5.      struct svp64_ctx *svp64)
  6.  {
  7. -  uint32_t rm;
  8.    unsigned long op;
  9. -  struct svp64_prefix svp64_prefix;
  10. +  struct svp64_insn svp64_insn;
  11.    const struct powerpc_opcode *opcode;
  12.    const struct svp64_record *record;
  13.    const struct svp64_record *record_end;
  14. -  uint32_t prefix = PPC_GET_PREFIX (insn);
  15.    uint32_t suffix = PPC_GET_SUFFIX (insn);
  16.  
  17. -  memset (&svp64_prefix, 0, sizeof (svp64_prefix));
  18. -  svp64_prefix_set (&svp64_prefix, SVP64_PREFIX_INSN, prefix);
  19. -  if ((svp64_prefix_get (svp64_prefix, SVP64_PREFIX_MAJOR) != 0x1) ||
  20. -      (svp64_prefix_get (svp64_prefix, SVP64_PREFIX_PID) != 0x3))
  21. +  svp64_insn_set (&svp64_insn, insn);
  22. +
  23. +  if ((svp64_insn_get_prefix_PO (&svp64_insn) != 0x1) ||
  24. +      (svp64_insn_get_prefix_id (&svp64_insn) != 0x3))
  25.      return NULL;
  26.  
  27.    opcode = lookup_powerpc (suffix, dialect & ~PPC_OPCODE_ANY);
  28. @@ -81,8 +79,6 @@ svp64_lookup (uint64_t insn, ppc_cpu_t dialect,
  29.    if (record == record_end)
  30.      return NULL;
  31.  
  32. -  rm = svp64_prefix_get (svp64_prefix, SVP64_PREFIX_RM);
  33. -  svp64_rm_set (&svp64->rm, SVP64_RM_SPR, rm);
  34.    svp64->desc = &record->desc;
  35.  
  36.    return opcode;
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement