It seems that by default Clang assumes GNU assembler syntax.
How to compile with Clang an assembly file using ARM syntax as this (directives) and this (instructions)?
Today I've been getting this error in my code stating:
RTE\Device\STM32F407VGTx\startup_stm32f407xx.s(191): A1163E: Unknown opcode R0, expecting opcode or macro
Here is the area of code where it stops at:
I have not performed any assembly in the…
This is my ARM assembly code:
AREA MyData, DATA
V SPACE 4
N EQU .
I've noticed the next memory address, after the block reserved by SPACE, is stored in N thanks to EQU and the dot.
However, I haven't found any information about what exactly that…
I am trying to convert an embedded gcc arm- project to use ARMClang instead of GCC.
My focus was to use CMake to automate the task of generating the make files, but I could
not figure out why I can not enforce the linker flags and I always get…
I found out that the ARM-compiler armcc V5.05 does not compile uint64_t correctly into assembly code. It uses only one register instead of two so the result is truncated to 32 bits (though the compiler is not complaining).
As a workaround I used…
Section 3.10.4 of the Arm generic user guide (page 172) gives an example for using TBB, but the example uses Arm assembler. I would like to learn how to use TBB with gas, but can't seem to figure out how. How should I revise the example from the…
I have a problem when using ssubl instruction in A64 instruction set.
I just want to subtract a constant value from an 8-byte SIMD vector. As the result might include a negative number, I use ssubl to extend the data range and do the signed…
On the Cortex-M3 I wanted to set the first two values of the array to 0 and 1, so I did the following:
main MOV R4, #0
array DCD 4,7,6,8
LDR R1, =array ; R1 = base address of array
STR R4, [R1, R4, LSL #2]
ADD R4, R4,…
Disclaimer: I am very new to 32-bit ARM ASM code and this is my first program.
When I try to run this program, the sum of the three integer values will be output wrong, however, the display of the three inputs is correctly printed, so I believe I am…
I have a function that receives a number from 0 to 10 as an input in R0. Then I need to place the multiplication table from 1 to 10 into an array in the data segment and place the address of the result array in R1.
I have a loop to make the…
Here is an explanation of DCD:
https://developer.arm.com/documentation/dui0473/m/directives-reference/dcd-and-dcdu
To me the usage seems very similar with .word. What is the difference between these two?
I am using STM32H7,
I find in assembly a special-purpose register called "CONTROL", which I assume it is 3 bits long according to this doc.
MSR CONTROL, r4
After debugging and the ARMv7m documentation, I think "CONTROL" register is just a…
I just started to learn ARM assembly and I know that there are mainly two toolchains to assemble ARM assembly, armasm and gnu. I am not able to use KEIL/IAR since I am using mac. Is there anyway I can add the armasm assembler to some IDEs on mac? I…
I am trying to create a Gist with appropriate highlighting for ARM (Arm7TDMI thumb) assembly code, but all of the assembly file extensions I have tried either lead to incorrect syntax highlighting or no highlighting at all. What is the proper…
I am programming the Stellaris LM3S9B92 Evalbot in assembly language (from what I gather, ARMv7 or a variety of it).
I use aliases a lot, as I find they make my code more readable. Typically, to signal that my register r2 contains a waiting value,…