This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 25 Aug 2016 17:10:07 +0200
- Subject: Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
- Authentication-results: sourceware.org; auth=none
- References: <87y43m16yo.fsf@oracle.com> <c70a77ad-430b-df35-ed2e-c3074e83808c@redhat.com>
> This patch fixes a typo in the mnemonic of the camellia_fl instruction,
> which was implemented before as camellia_fi.
Is there any chance that the misspelt mnemonic could be present in assembler
source files out in the wild ? Ie do we need to support the misspelt
mnemonic for backwards compatibility ? Or maybe issue a error message
describing the correct spelling ?
There is always that possibility. AFAIK the instruction has always been
documented in the SPARC specs as camellia_fl. However, some people may
have read sparc-opc.c, find camellia_fi and use it.
We could:
a) Silently support both spellings, but this would mean code not
portable to other systems using different assemblers, such as
Solaris.
b) Support both spellings emitting a warning if the invalid mnemonic is
used. Same problem than above, but we give a chance to the
programmer to fix the error.
c) As you suggested, emit an error if camellia_fi is used, describing
the problem.
d) Just support camellia_fl and emit a generic error "invalid
instruction" if camellia_fi is used. This is what the submitted
patch implements.
If we want to address this at all, I would probably implement a). The
only people using camellia_fi will be people looking at GAS's sources,
so the portability issue probably is not that important in these
scenarios.