summaryrefslogtreecommitdiffstats
path: root/md/writeup/arm64_assembly_crc32.md
diff options
context:
space:
mode:
Diffstat (limited to 'md/writeup/arm64_assembly_crc32.md')
-rw-r--r--md/writeup/arm64_assembly_crc32.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/md/writeup/arm64_assembly_crc32.md b/md/writeup/arm64_assembly_crc32.md
index 48ffd21..f177f3b 100644
--- a/md/writeup/arm64_assembly_crc32.md
+++ b/md/writeup/arm64_assembly_crc32.md
@@ -18,14 +18,16 @@ With Raspberry Pi 4 need to run it with 64bit linux.
### Raspberry Pi 4
Run command
-```
+
+```bash
uname -a
Linux raspberrypi 5.4.42-v8+ #1319 SMP PREEMPT Wed May 20 14:18:56 BST 2020 aarch64 GNU/Linux
```
There is substring "aarch64" that indicates that os supports 64 bits
To check if CPU supports crc32 instructions run
-```
+
+```bash
cat /proc/cpuinfo | grep crc
```
search for "crc32" substring
@@ -34,12 +36,12 @@ search for "crc32" substring
If you have Apple M1 then you already know it. If not sure run one of those commands to verify archirecture
-```
+```bash
uname -a
```
or
-```
+```bash
arch
```
@@ -228,13 +230,13 @@ int main() {
### Raspbery Pi 4
Need to set extra *-march* option to enable architecture variant that supports crc.
-```
+```bash
gcc asm_crc32.c -o asm_crc32 -march=armv8.1-a
```
### Apple M1
Works without extra options
-```
+```bash
gcc asm_crc32.c -o asm_crc32
```