On Wed, Apr 19, 2017 at 11:35 PM, Jeffrey Walton <noloa...@gmail.com> wrote:
> On Wed, Apr 19, 2017 at 9:57 PM, Jim Wilson <jim.wil...@linaro.org> wrote:
>> On Wed, Apr 19, 2017 at 12:38 PM, Jeffrey Walton <noloa...@gmail.com> wrote:
> The thing I am not sure about is saving and restoring the cpu. The AS
> manual states "Specifying .cpu clears any previously selected
> architecture extensions". But arch_extensions does not seem to work,
> so I guess its a moot point. Also, the manual only discusses '.set' in
> the context of MIPS. The program below does not produce a warning or
> error. I am not sure if its doing what's expected.
For a non-mips target, .set is the same as .equ and =, it sets a
symbol value to an expression. Your code using .set push and .set pop
isn't doing anything useful.
I don't see any mechanism in the assembler to save/restore a cpu
setting. There is one in gcc, but not until gcc 6.
I don't see any easy solution for you at the moment, you need a
binutils/gcc upgrade, or you need to put crc code in separate files.
Or you could force all files to be compiled with -mcpu=generic, and
then you can use .cpu to add/remove crc support as necessary.
linaro-toolchain mailing list