summaryrefslogtreecommitdiff
path: root/md/writeup/arm64_assembly_crc32.md
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2023-02-04 14:10:26 +0000
committerFreeArtMan <dos21h@gmail.com>2023-02-04 14:10:26 +0000
commit380f0fe40b1ab20790e75dac779e73667cc5ac72 (patch)
tree9fa3b9c93b58c966daa22f955282bc3c181d909a /md/writeup/arm64_assembly_crc32.md
parentdf881efab146ca3ee61bf8936f948dd976fc4740 (diff)
downloadmd-content-380f0fe40b1ab20790e75dac779e73667cc5ac72.tar.gz
md-content-380f0fe40b1ab20790e75dac779e73667cc5ac72.zip
Update all content to new pygmentize
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
```