[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [bootstrappable] ARM Unified Assembly Language - GNU as does some we
From: |
Orians, Jeremiah (DTMB) |
Subject: |
RE: [bootstrappable] ARM Unified Assembly Language - GNU as does some weird stuff |
Date: |
Mon, 25 Jan 2021 23:12:46 +0000 |
> (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
- Re: [bootstrappable] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', (continued)
- Re: [Tinycc-devel] [bootstrappable] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', grischka, 2021/01/08
- Re: [Tinycc-devel] [bootstrappable] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Danny Milosavljevic, 2021/01/08
- RE: [bootstrappable] Re: [Tinycc-devel] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Orians, Jeremiah (DTMB), 2021/01/08
- Re: [Tinycc-devel] [bootstrappable] Re: Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Vincent Lefevre, 2021/01/08
- Re: [Tinycc-devel] [bootstrappable] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Jan Nieuwenhuizen, 2021/01/08
- ARM Unified Assembly Language - GNU as does some weird stuff, Danny Milosavljevic, 2021/01/25
- RE: [bootstrappable] ARM Unified Assembly Language - GNU as does some weird stuff,
Orians, Jeremiah (DTMB) <=
- Re: ARM Unified Assembly Language - GNU as does some weird stuff, Danny Milosavljevic, 2021/01/25
Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Jan Wielkiewicz, 2021/01/07
Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello', Timothy Sample, 2021/01/20