Lines Matching refs:src

263       char *src = p1->name;  in md_begin()  local
270 dst = buffer = malloc (strlen (src) + 1); in md_begin()
271 while (*src) in md_begin()
273 if (*src == '.') in md_begin()
275 src++; in md_begin()
278 if (*src == '/') in md_begin()
279 cmplen = src - p1->name + 1; in md_begin()
280 *dst++ = *src++; in md_begin()
376 parse_reg (char *src, op_type *mode, unsigned int *reg, int direction) in parse_reg() argument
382 if (!is_name_beginner (*src) || *src == '\001') in parse_reg()
384 end = src + 1; in parse_reg()
387 len = end - src; in parse_reg()
389 if (len == 2 && TOLOWER (src[0]) == 's' && TOLOWER (src[1]) == 'p') in parse_reg()
396 TOLOWER (src[0]) == 'c' && in parse_reg()
397 TOLOWER (src[1]) == 'c' && in parse_reg()
398 TOLOWER (src[2]) == 'r') in parse_reg()
405 TOLOWER (src[0]) == 'e' && in parse_reg()
406 TOLOWER (src[1]) == 'x' && in parse_reg()
407 TOLOWER (src[2]) == 'r') in parse_reg()
414 TOLOWER (src[0]) == 'v' && in parse_reg()
415 TOLOWER (src[1]) == 'b' && in parse_reg()
416 TOLOWER (src[2]) == 'r') in parse_reg()
423 TOLOWER (src[0]) == 's' && in parse_reg()
424 TOLOWER (src[1]) == 'b' && in parse_reg()
425 TOLOWER (src[2]) == 'r') in parse_reg()
431 if (len == 2 && TOLOWER (src[0]) == 'f' && TOLOWER (src[1]) == 'p') in parse_reg()
437 if (len == 3 && TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && in parse_reg()
438 src[2] >= '0' && src[2] <= '7') in parse_reg()
441 *reg = src[2] - '0'; in parse_reg()
446 if (len == 2 && TOLOWER (src[0]) == 'e' && src[1] >= '0' && src[1] <= '7') in parse_reg()
449 *reg = src[1] - '0' + 8; in parse_reg()
455 if (TOLOWER (src[0]) == 'r') in parse_reg()
457 if (src[1] >= '0' && src[1] <= '7') in parse_reg()
459 if (len == 3 && TOLOWER (src[2]) == 'l') in parse_reg()
462 *reg = (src[1] - '0') + 8; in parse_reg()
465 if (len == 3 && TOLOWER (src[2]) == 'h') in parse_reg()
468 *reg = (src[1] - '0'); in parse_reg()
474 *reg = (src[1] - '0'); in parse_reg()
489 parse_exp (char *src, struct h8_op *op) in parse_exp() argument
494 input_line_pointer = src; in parse_exp()
498 src = input_line_pointer; in parse_exp()
501 return skip_colonthing (src, &op->mode); in parse_exp()
509 skip_colonthing (char *src, int *mode) in skip_colonthing() argument
511 if (*src == ':') in skip_colonthing()
513 src++; in skip_colonthing()
515 if (src[0] == '8' && !ISDIGIT (src[1])) in skip_colonthing()
517 else if (src[0] == '2' && !ISDIGIT (src[1])) in skip_colonthing()
519 else if (src[0] == '3' && !ISDIGIT (src[1])) in skip_colonthing()
521 else if (src[0] == '4' && !ISDIGIT (src[1])) in skip_colonthing()
523 else if (src[0] == '5' && !ISDIGIT (src[1])) in skip_colonthing()
525 else if (src[0] == '2' && src[1] == '4' && !ISDIGIT (src[2])) in skip_colonthing()
527 else if (src[0] == '3' && src[1] == '2' && !ISDIGIT (src[2])) in skip_colonthing()
529 else if (src[0] == '1' && src[1] == '6' && !ISDIGIT (src[2])) in skip_colonthing()
534 while (ISDIGIT (*src)) in skip_colonthing()
535 src++; in skip_colonthing()
537 return src; in skip_colonthing()
605 char *src = *ptr; in get_operand() local
613 if (src[0] == '(' && src[8] == ')') in get_operand()
614 ++ src; in get_operand()
618 if (TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && in get_operand()
619 ISDIGIT (src[2]) && src[3] == '-' && in get_operand()
620 TOLOWER (src[4]) == 'e' && TOLOWER (src[5]) == 'r' && ISDIGIT (src[6])) in get_operand()
624 low = src[2] - '0'; in get_operand()
625 high = src[6] - '0'; in get_operand()
645 if (src[7] == ')') in get_operand()
646 *ptr = src + 8; in get_operand()
648 *ptr = src + 7; in get_operand()
652 len = parse_reg (src, &op->mode, &op->reg, direction); in get_operand()
655 src += len; in get_operand()
656 if (*src == '.') in get_operand()
659 switch (src[1]) in get_operand()
683 src += 2; in get_operand()
685 *ptr = src; in get_operand()
689 if (*src == '@') in get_operand()
691 src++; in get_operand()
692 if (*src == '@') in get_operand()
694 *ptr = parse_exp (src + 1, op); in get_operand()
715 if (*src == '-' || *src == '+') in get_operand()
717 len = parse_reg (src + 1, &mode, &num, direction); in get_operand()
722 *ptr = parse_exp (src, op); in get_operand()
731 op->mode = src[0] == '-' ? RDPREDEC : RDPREINC; in get_operand()
733 *ptr = src + 1 + len; in get_operand()
736 if (*src == '(') in get_operand()
738 src++; in get_operand()
741 len = parse_reg (src, &mode, &op->reg, direction); in get_operand()
742 if (len != 0 && (mode & MODE) == REG && src[len] == '.') in get_operand()
744 switch (TOLOWER (src[len + 1])) in get_operand()
760 && src[len + 2] == ',' in get_operand()
761 && TOLOWER (src[len + 3]) != 'p' in get_operand()
762 && TOLOWER (src[len + 4]) != 'c' in get_operand()
763 && src[len + 5] != ')') in get_operand()
765 *ptr = src + len + 6; in get_operand()
778 src = parse_exp (src, op); in get_operand()
779 if (*src == ')') in get_operand()
782 *ptr = src + 1; in get_operand()
786 if (*src != ',') in get_operand()
791 src++; in get_operand()
793 len = parse_reg (src, &mode, &op->reg, direction); in get_operand()
799 src += len; in get_operand()
800 if (src[0] == '.') in get_operand()
802 switch (TOLOWER (src[1])) in get_operand()
816 src += 2; in get_operand()
821 src = skip_colonthing (src, &op->mode); in get_operand()
823 if (*src != ')' && '(') in get_operand()
828 *ptr = src + 1; in get_operand()
831 len = parse_reg (src, &mode, &num, direction); in get_operand()
835 src += len; in get_operand()
836 if (*src == '+' || *src == '-') in get_operand()
842 op->mode = *src == '+' ? RSPOSTINC : RSPOSTDEC; in get_operand()
844 src++; in get_operand()
845 *ptr = src; in get_operand()
855 *ptr = src; in get_operand()
864 *ptr = parse_exp (src, op); in get_operand()
869 if (*src == '#') in get_operand()
872 *ptr = parse_exp (src + 1, op); in get_operand()
875 else if (strncmp (src, "mach", 4) == 0 || in get_operand()
876 strncmp (src, "macl", 4) == 0 || in get_operand()
877 strncmp (src, "MACH", 4) == 0 || in get_operand()
878 strncmp (src, "MACL", 4) == 0) in get_operand()
880 op->reg = TOLOWER (src[3]) == 'l'; in get_operand()
882 *ptr = src + 4; in get_operand()
888 *ptr = parse_exp (src, op); in get_operand()