问题
Currently, I'm learning GNU as, and find a lot useful information in "info as".
I found ".set noat" is used in MIPS specified code, but when searching for this directive in "info as", I found its explanation in node "alpha directive", but not in "MIPS Dependent Features". Why? did I miss something in the manual?
TIA
回答1:
The .set at/noat
is a valid construction for MIPS architecture and works the similar way as on Alpha by disabling/enabling warning when $at
register is used by user.
As sometimes happens, documentation and code are not always 100% in sync. So please file a bug against binutils and even better - provide a patch. By doing that, you can learn from the pros (unless they are really busy, like sometimes happens).
About MIPS vs Alpha: it seems that the Alpha architecture has been greatly influenced by MIPS's.
回答2:
GNU as
supports gobs of processor targets (CPU architectures) from the 8041 micro-controller family to the mightiest Cray and beyond. The machine dependent section of the manual lists 42 architectures.
Most of the 121 pseudo instructions are common to all architectures, as well as the semantics of labels and references to them. The big differences between targets are the specific CPU instructions, address modes, and instruction encoding. Impressively, as
can generate the same object file formats for most targets: COFF, ELF, a.out, and SOM.
Since most pseudo instructions affect the assembler, and not CPU execution, it is unsurprising that they would apply to a large number of architectures.
来源:https://stackoverflow.com/questions/7911964/is-set-noat-unsupported-for-mips-assembly