Questions tagged [arm]
Code specifically targeting processors designed by ARM. Generally useful in conjunction with [assembly], but sometimes relevant for other languages.
11 questions
4
votes
1
answer
129
views
Computing the factorial of a number in ARM assembly
I'm new to ARM assembly, and I want to improve myself.
Here is code that I wrote. It computes and returns the factorial of the integer passed in r0. Any suggestion ...
2
votes
3
answers
238
views
Optimizing a for loop for changing pixels values using lookup table
I tried to parallelize the loop, and I got a good result but still not enough. This post is a follow up to a recent one where I optimized other parts of the code using a lookup table and spacial and ...
4
votes
1
answer
130
views
Arm GPIO driver
I'm new to bare-metal programming. I'm currently developing some drivers for my first project.
This is a simple GPIO driver. I tested it and it's working fine.
What do you guys think of it, and how ...
3
votes
1
answer
144
views
Fast way to compute a^d mod n
For a Miller-Rabin primality test I need a fast way to compute a^d mod n.
Where a is one of 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...
5
votes
1
answer
259
views
Abstraction for embedded C++ register operations
I just started with embeddeded C++ since I only coded in C for the last year and I wanted to do/learn something while I'm in university.
First of the there is the Register manipulation class. I won't ...
4
votes
0
answers
159
views
RC4 stream cipher in ARM Assembly
Below is a complete implementation of RC4 in ARM assembly. Unit tests pass, including comparison to C implementation and to published test vectors.
I'm appreciative of all feedback, comments (things ...
3
votes
1
answer
141
views
Project Euler 1 (sum of multiples of 3 or 5) in ARM Assembly
Project Euler #1 asks:
Find the sum of all the multiples of 3 or 5 below 1000.
In ARM Assembly;
I did this in 3 loops, which avoids any MOD or DIV.
Each loop is written out, without a common ...
4
votes
0
answers
251
views
Arm Assembly Tokenize String (strtok()), Load Move, Add Efficiency
Dabbling a bit more with arm assembly, I wrote a few functions to handle string splitting. The goal was to write a few reusable functions that could be combined to emulate (roughly) what C ...
2
votes
1
answer
304
views
FizzBuzz in arm64
I made a FizzBuzz program in arm64; I print out the values in hex instead of decimal. This was the first arm64 program I made and I'm looking for advice on how I can improve it.
The code to print out ...
4
votes
0
answers
968
views
Binary to hex in ARM64 SIMD assembly
As an exercise in learning ARM64 assembly (aka AArch64), I wrote this function to convert 64-bit binary to hexadecimal with SIMD instructions. I'm most interested in feedback on the algorithm, ...
4
votes
1
answer
2k
views
Decimal to binary conversion in ARM assembly
I'm "playing" with ARM assembly on a Raspberry Pi, reading various tutorials and posts to help - no, it's not a college assignment, I'm too old for college! I'm pleased with getting the ...