diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-11-15 02:36:11 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-11-15 02:36:11 +0100 |
commit | 824c3aa83d9acc45567421c0d08ca6eb4d718a43 (patch) | |
tree | 7c3cfd0eeba46285c773e4650f2eb3ef9cfef1b7 /content/2023-09-01-cas-llsc-aba/Makefile | |
parent | 93e0b1aa9be8e1f198d798e7b5d5df57fef4b15d (diff) | |
download | blog-824c3aa83d9acc45567421c0d08ca6eb4d718a43.tar.gz blog-824c3aa83d9acc45567421c0d08ca6eb4d718a43.zip |
post: cas, aba and ll/sc first draft
Diffstat (limited to 'content/2023-09-01-cas-llsc-aba/Makefile')
-rw-r--r-- | content/2023-09-01-cas-llsc-aba/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/content/2023-09-01-cas-llsc-aba/Makefile b/content/2023-09-01-cas-llsc-aba/Makefile new file mode 100644 index 0000000..602418f --- /dev/null +++ b/content/2023-09-01-cas-llsc-aba/Makefile @@ -0,0 +1,37 @@ +BINS = cas-aba-issue cas-ptr-generation a64-basic-llsc a64-llsc + +CFLAGS_cas-ptr-generation = -mcx16 +CFLAGS = -g -O3 -Wall -Wextra $(CFLAGS_$(*)) + +A64_SYSROOT = /usr/aarch64-linux-gnu + +run: $(BINS:%=run-%) +build: $(BINS:%=%.elf) + +# -- HOST NATIVE TARGETS ------------------------------------------------------- + +run-%: %.elf + ./$^ + +%.elf : %.cc + $(CXX) $(CFLAGS) -o $@ $^ -latomic + +disasm: cas-ptr-generation.elf + objdump -C -d -j .text -M intel --no-show-raw-insn --visualize-jumps=color $^ | less -R + +# -- ARM64 CROSS TARGETS ------------------------------------------------------- + +a64-%.elf: a64-%.cc + clang++ $(CFLAGS) -target aarch64-linux-gnu --sysroot=$(A64_SYSROOT) -fuse-ld=lld -o $@ $^ + #llvm-objdump -j .text -C -d $@ + +run-a64-%: a64-%.elf + qemu-aarch64 -L $(A64_SYSROOT) -E LD_LIBRARY_PATH=$(A64_SYSROOT)/lib64 $^ + +# -- MISC TARGETS -------------------------------------------------------------- + +fmt: + clang-format -i *.cc + +clean: + $(RM) *.elf |