Re: examples of arm assem.

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Quoted text here. Click to load it

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

Re: examples of arm assem.
On 13 May 2021 14:28:24 +0100 (BST), Theo

Quoted text here. Click to load it


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



Re: examples of arm assem.
Bob - I'm not too sure either. I'll probably find out though.
The version 7 arckitecture reference is the current source.

Hul

Quoted text here. Click to load it










Re: examples of arm assem.
On 5/13/2021 6:28 AM, Theo wrote:
Quoted text here. Click to load it

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! (?)

Re: examples of arm assem.
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


Quoted text here. Click to load it



Re: examples of arm assem.
On 5/13/2021 3:45 PM, Hul Tytus wrote:
Quoted text here. Click to load it

*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?

Quoted text here. Click to load it

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.?]

Re: examples of arm assem.
Quoted text here. Click to load it

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

Re: examples of arm assem.
Thanks Theo. The thumb (1 and/or 2) codes are needed though.  

Hul

Quoted text here. Click to load it







Re: examples of arm assem.
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  

Quoted text here. Click to load it



Site Timeline