Print this page
6068 libdisasm: previnstr arch op should have a sane default
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdisasm/common/dis_sparc.c
          +++ new/usr/src/lib/libdisasm/common/dis_sparc.c
↓ open down ↓ 189 lines elided ↑ open up ↑
 190  190          return (4);
 191  191  }
 192  192  
 193  193  /* ARGSUSED */
 194  194  static int
 195  195  dis_sparc_min_instrlen(dis_handle_t *dhp)
 196  196  {
 197  197          return (4);
 198  198  }
 199  199  
 200      -/*
 201      - * The dis_i386.c comment for this says it returns the previous instruction,
 202      - * however, I'm fairly sure it's actually returning the _address_ of the
 203      - * nth previous instruction.
 204      - */
 205  200  /* ARGSUSED */
 206  201  static uint64_t
 207  202  dis_sparc_previnstr(dis_handle_t *dhp, uint64_t pc, int n)
 208  203  {
 209  204          if (n <= 0)
 210  205                  return (pc);
 211  206  
 212  207          if (pc < n)
 213  208                  return (pc);
 214  209  
↓ open down ↓ 145 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX