Files
Toooba/Tests/isa/CPrograms/build-assembler.sh
2026-04-01 14:48:14 +01:00

23 lines
1.3 KiB
Bash

# Send assembler file to remote machine to run
scp start.S home-1:/home/akilan/cheri/output/sdk/bin/
# scp main.c home-1:/home/akilan/cheri/output/sdk/bin/
scp malloc.c home-1:/home/akilan/cheri/output/sdk/bin/
# scp cheri.S home:/home/akilan/cheri/output/sdk/bin/
# Run compiled instruction remotely
# ssh home 'cd /home/akilan/cheri/output/sdk/bin/ && ./clang --target=riscv64-unknown-elf -march=rv64gcxcheri -mabi=l64pc128 -nostdlib -nostartfiles -Wl,-Ttext=0x80000000 -o testC cheri.S'
# ssh home-1 'cd /home/akilan/cheri/output/sdk/bin/ && ./clang --target=riscv64-unknown-elf -march=rv64gcxcheri -mabi=l64pc128 -nostdlib -nostartfiles -Wl,-Ttext=0x80000000 -o testC start.S main.c'
ssh home-1 'cd /home/akilan/cheri/output/sdk/bin/ && ./clang --target=riscv64-unknown-elf -march=rv64gcxcheri -mabi=lp64d -nostdlib -nostartfiles -Wl,-Ttext=0x80000000 -o testC start.S main.c'
# Malloc test implementation
ssh home-1 'cd /home/akilan/cheri/output/sdk/bin/ && ./clang --target=riscv64-unknown-elf -march=rv64gcxcheri -mabi=lp64d -nostdlib -nostartfiles -fno-builtin-malloc -mcmodel=medany -Wl,-Ttext=0x80000000 -o testC start.S malloc.c'
# Disassembly ouput
ssh home-1 'cd /home/akilan/cheri/output/sdk/bin/ && ./llvm-objdump -d testC'
# Copy file back for testing
scp home-1:/home/akilan/cheri/output/sdk/bin/testC ../