Lines Matching refs:tok
787 debug_exp (expressionS tok[], int ntok) in debug_exp() argument
794 expressionS *t = &tok[i]; in debug_exp()
871 expressionS tok[], in tokenize_arguments() argument
874 expressionS *end_tok = tok + ntok; in tokenize_arguments()
878 expressionS *orig_tok = tok; in tokenize_arguments()
888 memset (tok, 0, sizeof (*tok) * ntok); in tokenize_arguments()
899 while (tok < end_tok && *input_line_pointer) in tokenize_arguments()
955 tok->X_add_number = 0; in tokenize_arguments()
968 expression (tok); in tokenize_arguments()
969 if (tok->X_op != O_constant || tok->X_add_number <= 0) in tokenize_arguments()
977 tok->X_op = r->op; in tokenize_arguments()
979 ++tok; in tokenize_arguments()
995 expression (tok); in tokenize_arguments()
996 if (*input_line_pointer == ')' && tok->X_op == O_register) in tokenize_arguments()
998 tok->X_op = (saw_comma ? O_cpregister : O_pregister); in tokenize_arguments()
1002 ++tok; in tokenize_arguments()
1014 expression (tok); in tokenize_arguments()
1015 if (tok->X_op == O_illegal || tok->X_op == O_absent) in tokenize_arguments()
1020 ++tok; in tokenize_arguments()
1031 debug_exp (orig_tok, ntok - (end_tok - tok)); in tokenize_arguments()
1037 return ntok - (end_tok - tok); in tokenize_arguments()
1059 const expressionS *tok, in find_opcode_match() argument
1098 if (tok[tokidx].X_op != O_register in find_opcode_match()
1099 || !is_ir_num (tok[tokidx].X_add_number)) in find_opcode_match()
1103 if (tok[tokidx].X_op != O_register in find_opcode_match()
1104 || !is_fpr_num (tok[tokidx].X_add_number)) in find_opcode_match()
1108 if (tok[tokidx].X_op != O_pregister in find_opcode_match()
1109 || !is_ir_num (tok[tokidx].X_add_number)) in find_opcode_match()
1113 if (tok[tokidx].X_op != O_cpregister in find_opcode_match()
1114 || !is_ir_num (tok[tokidx].X_add_number)) in find_opcode_match()
1121 switch (tok[tokidx].X_op) in find_opcode_match()
1168 const expressionS *tok, in assemble_tokens_to_insn() argument
1179 opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch); in assemble_tokens_to_insn()
1182 assemble_insn (opcode, tok, ntok, insn, BFD_RELOC_UNUSED); in assemble_tokens_to_insn()
1665 emit_lda (const expressionS *tok, in emit_lda() argument
1672 basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register); in emit_lda()
1674 basereg = tok[2].X_add_number; in emit_lda()
1676 (void) load_expression (tok[0].X_add_number, &tok[1], &basereg, NULL, "lda"); in emit_lda()
1683 emit_ldah (const expressionS *tok, in emit_ldah() argument
1689 newtok[0] = tok[0]; in emit_ldah()
1690 newtok[1] = tok[1]; in emit_ldah()
2018 const expressionS *tok, in assemble_insn() argument
2049 t = &tok[0]; in assemble_insn()
2052 t = &tok[1]; in assemble_insn()
2067 t = &tok[tokidx++]; in assemble_insn()
2170 emit_ir_load (const expressionS *tok, in emit_ir_load() argument
2179 = tok[1].X_add_symbol ? S_GET_NAME (tok[1].X_add_symbol): ""; in emit_ir_load()
2183 basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register); in emit_ir_load()
2185 basereg = tok[2].X_add_number; in emit_ir_load()
2187 lituse = load_expression (tok[0].X_add_number, &tok[1], in emit_ir_load()
2194 newtok[0] = tok[0]; in emit_ir_load()
2215 emit_loadstore (const expressionS *tok, in emit_loadstore() argument
2225 basereg = (tok[1].X_op == O_constant ? AXP_REG_ZERO : alpha_gp_register); in emit_loadstore()
2227 basereg = tok[2].X_add_number; in emit_loadstore()
2229 if (tok[1].X_op != O_constant || !range_signed_16 (tok[1].X_add_number)) in emit_loadstore()
2234 lituse = load_expression (AXP_REG_AT, &tok[1], in emit_loadstore()
2239 newtok[1] = tok[1]; in emit_loadstore()
2243 newtok[0] = tok[0]; in emit_loadstore()
2263 emit_ldXu (const expressionS *tok, in emit_ldXu() argument
2268 emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]); in emit_ldXu()
2280 basereg = (tok[1].X_op == O_constant in emit_ldXu()
2283 basereg = tok[2].X_add_number; in emit_ldXu()
2286 lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL, "lda"); in emit_ldXu()
2289 newtok[0] = tok[0]; in emit_ldXu()
2326 emit_ldX (const expressionS *tok, in emit_ldX() argument
2330 emit_ldXu (tok, ntok, vlgsize); in emit_ldX()
2331 assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1); in emit_ldX()
2338 emit_uldXu (const expressionS *tok, in emit_uldXu() argument
2349 memcpy (newtok, tok, sizeof (expressionS) * ntok); in emit_uldXu()
2378 newtok[2] = tok[0]; in emit_uldXu()
2387 emit_uldX (const expressionS *tok, in emit_uldX() argument
2391 emit_uldXu (tok, ntok, vlgsize); in emit_uldX()
2392 assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1); in emit_uldX()
2398 emit_ldil (const expressionS *tok, in emit_ldil() argument
2404 memcpy (newtok, tok, sizeof (newtok)); in emit_ldil()
2405 newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number); in emit_ldil()
2413 emit_stX (const expressionS *tok, in emit_stX() argument
2420 emit_loadstore (tok, ntok, stX_op[lgsize]); in emit_stX()
2432 basereg = (tok[1].X_op == O_constant in emit_stX()
2435 basereg = tok[2].X_add_number; in emit_stX()
2438 lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL, "lda"); in emit_stX()
2458 newtok[0] = tok[0]; in emit_stX()
2515 emit_ustX (const expressionS *tok, in emit_ustX() argument
2523 memcpy (newtok, tok, sizeof (expressionS) * ntok); in emit_ustX()
2539 newtok[0] = tok[0]; in emit_ustX()
2586 emit_sextX (const expressionS *tok, in emit_sextX() argument
2593 assemble_tokens (sextX_op[lgsize], tok, ntok, 0); in emit_sextX()
2600 newtok[0] = tok[0]; in emit_sextX()
2602 newtok[2] = tok[ntok - 1]; in emit_sextX()
2619 emit_division (const expressionS *tok, in emit_division() argument
2641 xr = regno (tok[0].X_add_number); in emit_division()
2642 yr = regno (tok[1].X_add_number); in emit_division()
2647 rr = regno (tok[2].X_add_number); in emit_division()
2716 emit_division (const expressionS *tok, in emit_division() argument
2737 xr = regno (tok[0].X_add_number); in emit_division()
2738 yr = regno (tok[1].X_add_number); in emit_division()
2743 rr = regno (tok[2].X_add_number); in emit_division()
2822 emit_jsrjmp (const expressionS *tok, in emit_jsrjmp() argument
2832 if (tokidx < ntok && tok[tokidx].X_op == O_register) in emit_jsrjmp()
2833 r = regno (tok[tokidx++].X_add_number); in emit_jsrjmp()
2840 (tok[tokidx].X_op == O_pregister || tok[tokidx].X_op == O_cpregister)) in emit_jsrjmp()
2841 r = regno (tok[tokidx++].X_add_number); in emit_jsrjmp()
2848 lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], in emit_jsrjmp()
2857 newtok[2] = tok[tokidx]; in emit_jsrjmp()
2876 && tok[tokidx].X_add_symbol in emit_jsrjmp()
2880 const char *symname = S_GET_NAME (tok[tokidx].X_add_symbol); in emit_jsrjmp()
2917 emit_retjcr (const expressionS *tok, in emit_retjcr() argument
2925 if (tokidx < ntok && tok[tokidx].X_op == O_register) in emit_retjcr()
2926 r = regno (tok[tokidx++].X_add_number); in emit_retjcr()
2933 (tok[tokidx].X_op == O_pregister || tok[tokidx].X_op == O_cpregister)) in emit_retjcr()
2934 r = regno (tok[tokidx++].X_add_number); in emit_retjcr()
2941 newtok[2] = tok[tokidx]; in emit_retjcr()
2951 emit_ldgp (const expressionS *tok ATTRIBUTE_UNUSED, in emit_ldgp()
2966 if (regno (tok[2].X_add_number) == AXP_REG_PV) in emit_ldgp()
2970 newtok[0] = tok[0]; in emit_ldgp()
2972 newtok[2] = tok[2]; in emit_ldgp()
2976 addend = tok[1]; in emit_ldgp()
2992 set_tok_preg (newtok[2], tok[0].X_add_number); in emit_ldgp()
3191 const expressionS *tok, in find_macro_match() argument
3216 if (tokidx >= ntok || tok[tokidx].X_op != O_register in find_macro_match()
3217 || !is_ir_num (tok[tokidx].X_add_number)) in find_macro_match()
3224 if (tokidx >= ntok || tok[tokidx].X_op != O_pregister in find_macro_match()
3225 || !is_ir_num (tok[tokidx].X_add_number)) in find_macro_match()
3232 if (tokidx < ntok && tok[tokidx].X_op == O_pregister in find_macro_match()
3233 && is_ir_num (tok[tokidx].X_add_number)) in find_macro_match()
3239 if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister in find_macro_match()
3240 || !is_ir_num (tok[tokidx].X_add_number)) in find_macro_match()
3247 if (tokidx >= ntok || tok[tokidx].X_op != O_register in find_macro_match()
3248 || !is_fpr_num (tok[tokidx].X_add_number)) in find_macro_match()
3257 switch (tok[tokidx].X_op) in find_macro_match()
3301 const expressionS *tok, in assemble_tokens() argument
3313 if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) in assemble_tokens()
3315 reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc; in assemble_tokens()
3327 macro = find_macro_match (macro, tok, &ntok); in assemble_tokens()
3330 (*macro->emit) (tok, ntok, macro->arg); in assemble_tokens()
3341 opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch); in assemble_tokens()
3345 assemble_insn (opcode, tok, ntok, &insn, reloc); in assemble_tokens()
3349 insn.sequence = tok[ntok].X_add_number; in assemble_tokens()
5535 expressionS tok[MAX_INSN_ARGS]; in md_assemble() local
5548 if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0) in md_assemble()
5557 assemble_tokens (opname, tok, ntok, alpha_macros_on); in md_assemble()