* config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option.
(sparc_ip): Warn if %g2 or %g3 register is used and not covered
by .register pseudo-op if -64 and --no-undeclared-regs.
(s_register, sparc_adjust_symtab): New functions.
* config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab):
Declare sparc_adjust_symtab as tc_adjust_symtab.
* doc/c-sparc.texi: Add description of #ignore special literal
for .register pseudo-op.