From 9051a8f905f24dffe5b3d4701f43aabca2218fd6 Mon Sep 17 00:00:00 2001 From: rmsyn Date: Sun, 21 May 2023 02:22:07 +0000 Subject: [PATCH] eclic: move eclic-mode-hack.S into Rust Uses inline assembly to move the code from `eclic-mode-hack.S` into Rust. The generated assembly is different. This commit should be reverted if regressions are noticed on real hardware. --- assemble.sh | 11 -- bin/gd32vf103xx-hal.a | Bin 5112 -> 0 bytes build.rs | 21 --- eclic-mode-hack.S | 345 ------------------------------------------ src/eclic.rs | 4 + src/eclic/mode.rs | 264 ++++++++++++++++++++++++++++++++ 6 files changed, 268 insertions(+), 377 deletions(-) delete mode 100755 assemble.sh delete mode 100644 bin/gd32vf103xx-hal.a delete mode 100644 build.rs delete mode 100644 eclic-mode-hack.S create mode 100644 src/eclic/mode.rs diff --git a/assemble.sh b/assemble.sh deleted file mode 100755 index f0598ad..0000000 --- a/assemble.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -# remove existing blobs because otherwise this will append object files to the old blobs -rm -f bin/*.a - -riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32imac eclic-mode-hack.S -o bin/eclic-mode-hack.o -ar crs bin/gd32vf103xx-hal.a bin/eclic-mode-hack.o - -rm bin/eclic-mode-hack.o diff --git a/bin/gd32vf103xx-hal.a b/bin/gd32vf103xx-hal.a deleted file mode 100644 index 77d3c32f726346c6de6705fe26b22b14bdf8b45a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5112 zcmeI0e{2&~9KgS~u{tNA*%j7I(-geW9LmxUl9NR|bW5JJc_kw1(g_z#JS-|xMS@M^DZOp&pQ#=-V z-^XK_ceJj^f57hvOa`LCnV{M*+Flet5ceb|6VXjGn^fh^mSj=`r))0lUU4r1_abmd z1Xknkalz!mlS@vir-#mLKRa@+V#+n`IbU;O&BfYF{>u$ls`4cG?fN%=jn?h;mj#Xl z{LRzN9W6Ina@zK`m9-yf_s6H>9f=!>(*N~q^Ht-N)E=#K2&AVG^VFd#PmibHt@L^N zWhF_}NwmGEQ&SNjUn+Ruj%C;?a&31ox>3`uI+Jo?Rz{F=A&;Gr$J!n23ElM z7xLM7+$E!ZWBNwxfCq7e{PZZ2;q#f7XL%YCa-je+eE|w_J*8P4oXE?VyP2;F<;3%$h?*L2IgJN`=TiQbqkJqn@K`;>uDNXJ5 z5c7p2!6-yy0cZ#ZAR1^h+d|DjIfL#DdNNp*K`+#YeXn59w!f%aOdOz>{v#|6JZOaZ|37G~)Q1K}OwCk2lYKPC7*VhRkV4=_vSL&rzN z6;unbAG7hGhvh-y<#@pK8D?pPfpCb}CHOFLrQoB)vfyLHZowyrJ%T5Q%@5`zu~*ce zCZ=aiOlL7mH3k|l@X|`b=c#^`;ETko1z#pMACRsRKO^dYB3>)_8u7D&e<7|Fe4Y3? z!G93f37(C&T*)VRKCxeL32{L1V&Zzi^t>Pi1(y>y2wqCOPVjQ#M!_<1NU)dKe1Ka; zyk69=C2kVjNE{YS&lXa%;0SSx;23d4aDw;+!Sq#_*D4rX+UtFKvI9$96=k}J^^|5_?>`hy?1R$< zhuN3D64}qY)>cSAt67-qFjG1@8(<7edflM&sST@u)=Qp?nbKBKq>t1_X*uS6%>UMp zzQ)<}>qplyTZyhqsSa~?KcI