> (1) b #60 > It seems that GNU as ignores the immediate entirely and just always encodes > #0 (to test, do ".syntax unified" and then "b #60" in GNU as). WTF? > Likewise with bl, blx.
All assemblers (except M1) do that because the linker is to populate that value at link time using the symbol table to allow code segment relocation. > (2) push #4 > It works in GNU as--but is it specified by ARM to push the register r2 ? > I think exposing ISA implementation details like that is a leaky > abstraction--and no good can come from it. > Likewise with pop, stm*, ldm*. Well arm doesn't actually have a push/pop instructions, only load and store instructions > GNU as fails to assemble these. And no one cared enough to fix it for 30 years? Is it possible something is missed? > (4) lsl r1, #4, #2 > GNU as encodes exactly the same as "lsl r1, #4"--drops the "#2" silently. 4 << 2 is 16. Log2(16) == 4; sounds about right -Jeremiah