Lines Matching refs:src
268 const char *src = p1->name; in md_begin() local
275 dst = buffer = XNEWVEC (char, strlen (src) + 1); in md_begin()
276 while (*src) in md_begin()
278 if (*src == '.') in md_begin()
280 src++; in md_begin()
283 if (*src == '/') in md_begin()
284 cmplen = src - p1->name + 1; in md_begin()
285 *dst++ = *src++; in md_begin()
381 parse_reg (char *src, op_type *mode, unsigned int *reg, int direction) in parse_reg() argument
387 if (!is_name_beginner (*src) || *src == '\001') in parse_reg()
389 end = src + 1; in parse_reg()
392 len = end - src; in parse_reg()
394 if (len == 2 && TOLOWER (src[0]) == 's' && TOLOWER (src[1]) == 'p') in parse_reg()
401 TOLOWER (src[0]) == 'c' && in parse_reg()
402 TOLOWER (src[1]) == 'c' && in parse_reg()
403 TOLOWER (src[2]) == 'r') in parse_reg()
410 TOLOWER (src[0]) == 'e' && in parse_reg()
411 TOLOWER (src[1]) == 'x' && in parse_reg()
412 TOLOWER (src[2]) == 'r') in parse_reg()
419 TOLOWER (src[0]) == 'v' && in parse_reg()
420 TOLOWER (src[1]) == 'b' && in parse_reg()
421 TOLOWER (src[2]) == 'r') in parse_reg()
428 TOLOWER (src[0]) == 's' && in parse_reg()
429 TOLOWER (src[1]) == 'b' && in parse_reg()
430 TOLOWER (src[2]) == 'r') in parse_reg()
436 if (len == 2 && TOLOWER (src[0]) == 'f' && TOLOWER (src[1]) == 'p') in parse_reg()
442 if (len == 3 && TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && in parse_reg()
443 src[2] >= '0' && src[2] <= '7') in parse_reg()
446 *reg = src[2] - '0'; in parse_reg()
451 if (len == 2 && TOLOWER (src[0]) == 'e' && src[1] >= '0' && src[1] <= '7') in parse_reg()
454 *reg = src[1] - '0' + 8; in parse_reg()
460 if (TOLOWER (src[0]) == 'r') in parse_reg()
462 if (src[1] >= '0' && src[1] <= '7') in parse_reg()
464 if (len == 3 && TOLOWER (src[2]) == 'l') in parse_reg()
467 *reg = (src[1] - '0') + 8; in parse_reg()
470 if (len == 3 && TOLOWER (src[2]) == 'h') in parse_reg()
473 *reg = (src[1] - '0'); in parse_reg()
479 *reg = (src[1] - '0'); in parse_reg()
494 parse_exp (char *src, struct h8_op *op) in parse_exp() argument
499 input_line_pointer = src; in parse_exp()
503 src = input_line_pointer; in parse_exp()
506 return skip_colonthing (src, &op->mode); in parse_exp()
514 skip_colonthing (char *src, int *mode) in skip_colonthing() argument
516 if (*src == ':') in skip_colonthing()
518 src++; in skip_colonthing()
520 if (src[0] == '8' && !ISDIGIT (src[1])) in skip_colonthing()
522 else if (src[0] == '2' && !ISDIGIT (src[1])) in skip_colonthing()
524 else if (src[0] == '3' && !ISDIGIT (src[1])) in skip_colonthing()
526 else if (src[0] == '4' && !ISDIGIT (src[1])) in skip_colonthing()
528 else if (src[0] == '5' && !ISDIGIT (src[1])) in skip_colonthing()
530 else if (src[0] == '2' && src[1] == '4' && !ISDIGIT (src[2])) in skip_colonthing()
532 else if (src[0] == '3' && src[1] == '2' && !ISDIGIT (src[2])) in skip_colonthing()
534 else if (src[0] == '1' && src[1] == '6' && !ISDIGIT (src[2])) in skip_colonthing()
539 while (ISDIGIT (*src)) in skip_colonthing()
540 src++; in skip_colonthing()
542 return src; in skip_colonthing()
610 char *src = *ptr; in get_operand() local
618 if (src[0] == '(' && src[8] == ')') in get_operand()
619 ++ src; in get_operand()
623 if (TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && in get_operand()
624 ISDIGIT (src[2]) && src[3] == '-' && in get_operand()
625 TOLOWER (src[4]) == 'e' && TOLOWER (src[5]) == 'r' && ISDIGIT (src[6])) in get_operand()
629 low = src[2] - '0'; in get_operand()
630 high = src[6] - '0'; in get_operand()
650 if (src[7] == ')') in get_operand()
651 *ptr = src + 8; in get_operand()
653 *ptr = src + 7; in get_operand()
657 len = parse_reg (src, &op->mode, &op->reg, direction); in get_operand()
660 src += len; in get_operand()
661 if (*src == '.') in get_operand()
664 switch (src[1]) in get_operand()
688 src += 2; in get_operand()
690 *ptr = src; in get_operand()
694 if (*src == '@') in get_operand()
696 src++; in get_operand()
697 if (*src == '@') in get_operand()
699 *ptr = parse_exp (src + 1, op); in get_operand()
720 if (*src == '-' || *src == '+') in get_operand()
722 len = parse_reg (src + 1, &mode, &num, direction); in get_operand()
727 *ptr = parse_exp (src, op); in get_operand()
736 op->mode = src[0] == '-' ? RDPREDEC : RDPREINC; in get_operand()
738 *ptr = src + 1 + len; in get_operand()
741 if (*src == '(') in get_operand()
743 src++; in get_operand()
746 len = parse_reg (src, &mode, &op->reg, direction); in get_operand()
747 if (len != 0 && (mode & MODE) == REG && src[len] == '.') in get_operand()
749 switch (TOLOWER (src[len + 1])) in get_operand()
765 && src[len + 2] == ',' in get_operand()
766 && TOLOWER (src[len + 3]) != 'p' in get_operand()
767 && TOLOWER (src[len + 4]) != 'c' in get_operand()
768 && src[len + 5] != ')') in get_operand()
770 *ptr = src + len + 6; in get_operand()
783 src = parse_exp (src, op); in get_operand()
784 if (*src == ')') in get_operand()
787 *ptr = src + 1; in get_operand()
791 if (*src != ',') in get_operand()
796 src++; in get_operand()
798 len = parse_reg (src, &mode, &op->reg, direction); in get_operand()
804 src += len; in get_operand()
805 if (src[0] == '.') in get_operand()
807 switch (TOLOWER (src[1])) in get_operand()
821 src += 2; in get_operand()
826 src = skip_colonthing (src, &op->mode); in get_operand()
828 if (*src != ')') in get_operand()
833 *ptr = src + 1; in get_operand()
836 len = parse_reg (src, &mode, &num, direction); in get_operand()
840 src += len; in get_operand()
841 if (*src == '+' || *src == '-') in get_operand()
847 op->mode = *src == '+' ? RSPOSTINC : RSPOSTDEC; in get_operand()
849 src++; in get_operand()
850 *ptr = src; in get_operand()
860 *ptr = src; in get_operand()
869 *ptr = parse_exp (src, op); in get_operand()
874 if (*src == '#') in get_operand()
877 *ptr = parse_exp (src + 1, op); in get_operand()
880 else if (strncmp (src, "mach", 4) == 0 || in get_operand()
881 strncmp (src, "macl", 4) == 0 || in get_operand()
882 strncmp (src, "MACH", 4) == 0 || in get_operand()
883 strncmp (src, "MACL", 4) == 0) in get_operand()
885 op->reg = TOLOWER (src[3]) == 'l'; in get_operand()
887 *ptr = src + 4; in get_operand()
893 *ptr = parse_exp (src, op); in get_operand()