Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30610 > unrolled thread

examples of arm assem.

Started byHul Tytus <ht@panix.com>
First post2021-05-08 19:28 +0000
Last post2021-05-25 17:29 -0700
Articles 11 — 5 participants

Back to article view | Back to comp.arch.embedded


Contents

  examples of arm assem. Hul Tytus <ht@panix.com> - 2021-05-08 19:28 +0000
    Re: examples of arm assem. Theo <theom+news@chiark.greenend.org.uk> - 2021-05-13 14:28 +0100
      Re: examples of arm assem. boB <boB@K7IQ.com> - 2021-05-13 11:50 -0700
        Re: examples of arm assem. Hul Tytus <ht@panix.com> - 2021-05-13 22:37 +0000
      Re: examples of arm assem. Don Y <blockedofcourse@foo.invalid> - 2021-05-13 11:54 -0700
        Re: examples of arm assem. Hul Tytus <ht@panix.com> - 2021-05-13 22:45 +0000
          Re: examples of arm assem. Don Y <blockedofcourse@foo.invalid> - 2021-05-13 16:55 -0700
          Re: examples of arm assem. Theo <theom+news@chiark.greenend.org.uk> - 2021-05-14 10:49 +0100
            Re: examples of arm assem. Hul Tytus <ht@panix.com> - 2021-05-14 13:26 +0000
    Re: examples of arm assem. Hul Tytus <ht@panix.com> - 2021-05-31 20:10 +0000
    Re: examples of arm assem. Jonathan Harston <jgh@mdfs.net> - 2021-05-25 17:29 -0700

#30610 — examples of arm assem.

FromHul Tytus <ht@panix.com>
Date2021-05-08 19:28 +0000
Subjectexamples of arm assem.
Message-ID<s76op7$t7c$1@reader1.panix.com>
Anyone know where on the internet files of programs, or portions
of such, written an Arm assembley can be found? I'm in need
of examples of arm assembly to serve as test code for a just
written assembler. 

Hul


[toc] | [next] | [standalone]


#30611

FromTheo <theom+news@chiark.greenend.org.uk>
Date2021-05-13 14:28 +0100
Message-ID<yqf*EP0jy@news.chiark.greenend.org.uk>
In reply to#30610
Hul Tytus <ht@panix.com> wrote:
> 
> Anyone know where on the internet files of programs, or portions
> of such, written an Arm assembley can be found? I'm in need
> of examples of arm assembly to serve as test code for a just
> written assembler. 

ARM has at least 4 instruction sets:

1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
2. Thumb compressed 16-bit instructions (operating on 32 bit data)
3. Thumb-2 compressed 16-bit instructions
(not strictly a separate ISA but a way to mix #1 and #2 in a single
instruction stream)
4. AArch64 32-bit wide instructions operating on 64-bit data
(completely different from all the above)

There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
'unified assembly language' intend to cover both with one syntax.

Plus armasm and gas have different ways of writing assembly code.


Choose your poison...

Theo

[toc] | [prev] | [next] | [standalone]


#30613

FromboB <boB@K7IQ.com>
Date2021-05-13 11:50 -0700
Message-ID<q4tq9gt3kf4e1es6omqu23cl2fdqjs2ja3@4ax.com>
In reply to#30611
On 13 May 2021 14:28:24 +0100 (BST), Theo
<theom+news@chiark.greenend.org.uk> wrote:

>Hul Tytus <ht@panix.com> wrote:
>> 
>> Anyone know where on the internet files of programs, or portions
>> of such, written an Arm assembley can be found? I'm in need
>> of examples of arm assembly to serve as test code for a just
>> written assembler. 
>
>ARM has at least 4 instruction sets:
>
>1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
>2. Thumb compressed 16-bit instructions (operating on 32 bit data)
>3. Thumb-2 compressed 16-bit instructions
>(not strictly a separate ISA but a way to mix #1 and #2 in a single
>instruction stream)
>4. AArch64 32-bit wide instructions operating on 64-bit data
>(completely different from all the above)
>
>There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
>'unified assembly language' intend to cover both with one syntax.
>
>Plus armasm and gas have different ways of writing assembly code.
>
>
>Choose your poison...
>
>Theo


Good point about the different instruction sets !

I just use the regular Cortex M3 M4 and old non Cortex M versions
myself.

I get comfused on the actual "versions" or ARM code though...

I used the older NXP/Philips parts  with no Cortex M, the LPC2368
series.  Not sure if that is V4 or V7 ?  Or something else ?

boB

[toc] | [prev] | [next] | [standalone]


#30616

FromHul Tytus <ht@panix.com>
Date2021-05-13 22:37 +0000
Message-ID<s7k9nq$c97$3@reader1.panix.com>
In reply to#30613
Bob - I'm not too sure either. I'll probably find out though.
The version 7 arckitecture reference is the current source.

Hul

boB <boB@k7iq.com> wrote:
> On 13 May 2021 14:28:24 +0100 (BST), Theo
> <theom+news@chiark.greenend.org.uk> wrote:

> >Hul Tytus <ht@panix.com> wrote:
> >> 
> >> Anyone know where on the internet files of programs, or portions
> >> of such, written an Arm assembley can be found? I'm in need
> >> of examples of arm assembly to serve as test code for a just
> >> written assembler. 
> >
> >ARM has at least 4 instruction sets:
> >
> >1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
> >2. Thumb compressed 16-bit instructions (operating on 32 bit data)
> >3. Thumb-2 compressed 16-bit instructions
> >(not strictly a separate ISA but a way to mix #1 and #2 in a single
> >instruction stream)
> >4. AArch64 32-bit wide instructions operating on 64-bit data
> >(completely different from all the above)
> >
> >There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
> >'unified assembly language' intend to cover both with one syntax.
> >
> >Plus armasm and gas have different ways of writing assembly code.
> >
> >
> >Choose your poison...
> >
> >Theo


> Good point about the different instruction sets !

> I just use the regular Cortex M3 M4 and old non Cortex M versions
> myself.

> I get comfused on the actual "versions" or ARM code though...

> I used the older NXP/Philips parts  with no Cortex M, the LPC2368
> series.  Not sure if that is V4 or V7 ?  Or something else ?

> boB

[toc] | [prev] | [next] | [standalone]


#30614

FromDon Y <blockedofcourse@foo.invalid>
Date2021-05-13 11:54 -0700
Message-ID<s7jsls$77r$2@dont-email.me>
In reply to#30611
On 5/13/2021 6:28 AM, Theo wrote:
> Hul Tytus <ht@panix.com> wrote:
>>
>> Anyone know where on the internet files of programs, or portions
>> of such, written an Arm assembley can be found? I'm in need
>> of examples of arm assembly to serve as test code for a just
>> written assembler.
> 
> ARM has at least 4 instruction sets:
> 
> 1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
> 2. Thumb compressed 16-bit instructions (operating on 32 bit data)
> 3. Thumb-2 compressed 16-bit instructions
> (not strictly a separate ISA but a way to mix #1 and #2 in a single
> instruction stream)
> 4. AArch64 32-bit wide instructions operating on 64-bit data
> (completely different from all the above)
> 
> There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
> 'unified assembly language' intend to cover both with one syntax.
> 
> Plus armasm and gas have different ways of writing assembly code.
> 
> Choose your poison...

It's unclear whether his tool targets one dialect, all, or can be
commanded (command line switch) to address a specific one.

One assumes that having the knowledge to craft such a tool would
imply knowledge of the problem he's solving! (?)

[toc] | [prev] | [next] | [standalone]


#30617

FromHul Tytus <ht@panix.com>
Date2021-05-13 22:45 +0000
Message-ID<s7ka6c$c97$4@reader1.panix.com>
In reply to#30614
Don, the objective is a small assembler for in-house use and
to be included with some equipment with arm processors. Some
list files for checking the immediate and branching calculations
and placements would be handy.

Hul


Don Y <blockedofcourse@foo.invalid> wrote:
> On 5/13/2021 6:28 AM, Theo wrote:
> > Hul Tytus <ht@panix.com> wrote:
> >>
> >> Anyone know where on the internet files of programs, or portions
> >> of such, written an Arm assembley can be found? I'm in need
> >> of examples of arm assembly to serve as test code for a just
> >> written assembler.
> > 
> > ARM has at least 4 instruction sets:
> > 
> > 1. The classic 32-bit ISA (32-bit instructions operating on 32 bit data)
> > 2. Thumb compressed 16-bit instructions (operating on 32 bit data)
> > 3. Thumb-2 compressed 16-bit instructions
> > (not strictly a separate ISA but a way to mix #1 and #2 in a single
> > instruction stream)
> > 4. AArch64 32-bit wide instructions operating on 64-bit data
> > (completely different from all the above)
> > 
> > There are then classic ARM 32-bit mnemonics, Thumb mnemonics and UAL
> > 'unified assembly language' intend to cover both with one syntax.
> > 
> > Plus armasm and gas have different ways of writing assembly code.
> > 
> > Choose your poison...

> It's unclear whether his tool targets one dialect, all, or can be
> commanded (command line switch) to address a specific one.

> One assumes that having the knowledge to craft such a tool would
> imply knowledge of the problem he's solving! (?)

[toc] | [prev] | [next] | [standalone]


#30619

FromDon Y <blockedofcourse@foo.invalid>
Date2021-05-13 16:55 -0700
Message-ID<s7ke9v$vpg$1@dont-email.me>
In reply to#30617
On 5/13/2021 3:45 PM, Hul Tytus wrote:
> Don, the objective is a small assembler for in-house use and
> to be included with some equipment with arm processors. Some

*Not* "self-hosting" but, rather, just to avoid the "mess" of
installing a UN*X-ish environment on <whatever> platform your
folks develop?  Esp if you wanted to allow customers that
capability?

> list files for checking the immediate and branching calculations
> and placements would be handy.

So, you don't just want "sample sources" but, rather, sample
*compiled* (assembled) sources -- as a check for your code generation?

Do you have some other assembler on-hand (gas, gcc) to produce those?

[I'm assuming you are generating "absolute" objects (not relocatable
as that would further complicate such an analysis) so you'd also need
to link/load the objects built with gas, etc.?]

[toc] | [prev] | [next] | [standalone]


#30622

FromTheo <theom+news@chiark.greenend.org.uk>
Date2021-05-14 10:49 +0100
Message-ID<yqf*Uh5jy@news.chiark.greenend.org.uk>
In reply to#30617
Hul Tytus <ht@panix.com> wrote:
> Don, the objective is a small assembler for in-house use and
> to be included with some equipment with arm processors. Some
> list files for checking the immediate and branching calculations
> and placements would be handy.

You didn't really clarify your requirements, but I'll point you at one big
'classic' 32-bit ARM codebase:

https://www.riscosopen.org/

specifically
https://gitlab.riscosopen.org/RiscOS/Sources

This is targeting the assembly format used by armasm (using an older fork
of that called objasm).  Newer parts are in C but you can find lots of
assembly in the 's' folders.

There's no Thumb and little VFP or NEON, but some FPA (the original 1980s
ARM FPU).  There's substantial use of macros as well.

Theo

[toc] | [prev] | [next] | [standalone]


#30623

FromHul Tytus <ht@panix.com>
Date2021-05-14 13:26 +0000
Message-ID<s7ltpp$m23$1@reader1.panix.com>
In reply to#30622
Thanks Theo. The thumb (1 and/or 2) codes are needed though. 

Hul

Theo <theom+news@chiark.greenend.org.uk> wrote:
> Hul Tytus <ht@panix.com> wrote:
> > Don, the objective is a small assembler for in-house use and
> > to be included with some equipment with arm processors. Some
> > list files for checking the immediate and branching calculations
> > and placements would be handy.

> You didn't really clarify your requirements, but I'll point you at one big
> 'classic' 32-bit ARM codebase:

> https://www.riscosopen.org/

> specifically
> https://gitlab.riscosopen.org/RiscOS/Sources

> This is targeting the assembly format used by armasm (using an older fork
> of that called objasm).  Newer parts are in C but you can find lots of
> assembly in the 's' folders.

> There's no Thumb and little VFP or NEON, but some FPA (the original 1980s
> ARM FPU).  There's substantial use of macros as well.

> Theo

[toc] | [prev] | [next] | [standalone]


#30652

FromHul Tytus <ht@panix.com>
Date2021-05-31 20:10 +0000
Message-ID<s93frh$2pb$1@reader1.panix.com>
In reply to#30610
Jonathon - I'm in the testing phase now but, thankfully, strictly 32 bit
code. One trick I've found that's been helpful is "fasmarm", which is
an offshoot of a 386 et.al. assembler. The name is, if memory serves,
flat assembler or fasm. I've got it on a Microsoft xp msdos directory.
The fasmarm handles the 64 bit codes which might make it useful for
you.

Hul 

Jonathan Harston <jgh@mdfs.net> wrote:
> On Thursday, 13 May 2021 at 02:18:08 UTC+1, Hul Tytus wrote:
> > Anyone know where on the internet files of programs, or portions 
> > of such, written an Arm assembley can be found? I'm in need 
> > of examples of arm assembly to serve as test code for a just 
> > written assembler. 

> Good luck. I'm in the middle of writing an ARM64 assembler, so
> am in the same position. Plus untangling the complexity of the
> ARM64 instruction architecture. ;)

> jgh

[toc] | [prev] | [next] | [standalone]


#30657

FromJonathan Harston <jgh@mdfs.net>
Date2021-05-25 17:29 -0700
Message-ID<973c3901-f536-4320-a693-af0dbfd28dc2n@googlegroups.com>
In reply to#30610
On Thursday, 13 May 2021 at 02:18:08 UTC+1, Hul Tytus wrote:
> Anyone know where on the internet files of programs, or portions 
> of such, written an Arm assembley can be found? I'm in need 
> of examples of arm assembly to serve as test code for a just 
> written assembler. 

Good luck. I'm in the middle of writing an ARM64 assembler, so
am in the same position. Plus untangling the complexity of the
ARM64 instruction architecture. ;)

jgh

[toc] | [prev] | [standalone]


Back to top | Article view | comp.arch.embedded


csiph-web