瀏覽代碼

update to riscv 0.7

smsxgli 3 年之前
父節點
當前提交
27b0ed55e0
共有 28 個文件被更改,包括 37 次插入9 次删除
  1. 1 1
      riscv-rt/Cargo.toml
  2. 15 4
      riscv-rt/assemble.ps1
  3. 20 3
      riscv-rt/assemble.sh
  4. 二進制
      riscv-rt/bin/riscv32i-unknown-none-elf.a
  5. 二進制
      riscv-rt/bin/riscv32ic-unknown-none-elf.a
  6. 二進制
      riscv-rt/bin/riscv32if-unknown-none-elf.a
  7. 二進制
      riscv-rt/bin/riscv32ifc-unknown-none-elf.a
  8. 二進制
      riscv-rt/bin/riscv32ifd-unknown-none-elf.a
  9. 二進制
      riscv-rt/bin/riscv32ifdc-unknown-none-elf.a
  10. 二進制
      riscv-rt/bin/riscv32im-unknown-none-elf.a
  11. 二進制
      riscv-rt/bin/riscv32imc-unknown-none-elf.a
  12. 二進制
      riscv-rt/bin/riscv32imf-unknown-none-elf.a
  13. 二進制
      riscv-rt/bin/riscv32imfc-unknown-none-elf.a
  14. 二進制
      riscv-rt/bin/riscv32imfd-unknown-none-elf.a
  15. 二進制
      riscv-rt/bin/riscv32imfdc-unknown-none-elf.a
  16. 二進制
      riscv-rt/bin/riscv64i-unknown-none-elf.a
  17. 二進制
      riscv-rt/bin/riscv64ic-unknown-none-elf.a
  18. 二進制
      riscv-rt/bin/riscv64if-unknown-none-elf.a
  19. 二進制
      riscv-rt/bin/riscv64ifc-unknown-none-elf.a
  20. 二進制
      riscv-rt/bin/riscv64ifd-unknown-none-elf.a
  21. 二進制
      riscv-rt/bin/riscv64ifdc-unknown-none-elf.a
  22. 二進制
      riscv-rt/bin/riscv64im-unknown-none-elf.a
  23. 二進制
      riscv-rt/bin/riscv64imc-unknown-none-elf.a
  24. 二進制
      riscv-rt/bin/riscv64imf-unknown-none-elf.a
  25. 二進制
      riscv-rt/bin/riscv64imfc-unknown-none-elf.a
  26. 二進制
      riscv-rt/bin/riscv64imfd-unknown-none-elf.a
  27. 二進制
      riscv-rt/bin/riscv64imfdc-unknown-none-elf.a
  28. 1 1
      riscv-rt/build.rs

+ 1 - 1
riscv-rt/Cargo.toml

@@ -10,7 +10,7 @@ license = "ISC"
 
 [dependencies]
 r0 = "1.0.0"
-riscv = "0.6"
+riscv = "0.7"
 riscv-rt-macros = { path = "macros", version = "0.1.6" }
 
 [features]

+ 15 - 4
riscv-rt/assemble.ps1

@@ -1,15 +1,26 @@
+New-Item -Force -Name bin -Type Directory
+
 # remove existing blobs because otherwise this will append object files to the old blobs
 Remove-Item -Force bin/*.a
 
 $crate = "riscv-rt"
-$extension_sets = @("i", "im", "ic", "imc")
+
+$extension_sets = @("i", "im", "ic", "imc", "if", "ifc", "imf", "imfc", "ifd", "ifdc", "imfd", "imfdc")
+
 $pwd = Get-Location
 
-foreach ($ext in $extension_sets) {
-    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c -mabi=ilp32 -march=rv32$ext asm.S -o bin/$crate.o
+foreach ($ext in $extension_sets)
+{
+    $abi = ""
+    if ($ext.contains("d"))
+        {$abi = "d"}
+    elseif ($ext.contains("f"))
+        {$abi = "f"}
+
+    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c "-mabi=ilp32$abi" "-march=rv32$ext" asm.S -o bin/$crate.o
     riscv64-unknown-elf-ar crs bin/riscv32$ext-unknown-none-elf.a bin/$crate.o
 
-    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c -mabi=lp64 -march=rv64$ext asm.S -o bin/$crate.o
+    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$pwd=/riscv-rt -c "-mabi=lp64$abi" "-march=rv64$ext" asm.S -o bin/$crate.o
     riscv64-unknown-elf-ar crs bin/riscv64$ext-unknown-none-elf.a bin/$crate.o
 }
 

+ 20 - 3
riscv-rt/assemble.sh

@@ -7,12 +7,29 @@ crate=riscv-rt
 # remove existing blobs because otherwise this will append object files to the old blobs
 rm -f bin/*.a
 
-for ext in i ic im imc
+exts=('i' 'ic' 'im' 'imc' 'if' 'ifc' 'imf' 'imfc' 'ifd' 'ifdc' 'imfd' 'imfdc')
+
+for ext in ${exts[@]}
 do
-    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=ilp32 -march=rv32${ext} asm.S -o bin/$crate.o
+    case $ext in
+
+        *'d'*)
+            abi='d'
+            ;;
+        
+        *'f'*)
+            abi='f'
+            ;;
+        
+        *)
+            abi=''
+            ;;
+    esac
+
+    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=ilp32${abi} -march=rv32${ext} asm.S -o bin/$crate.o
     riscv64-unknown-elf-ar crs bin/riscv32${ext}-unknown-none-elf.a bin/$crate.o
 
-    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=lp64 -march=rv64${ext} asm.S -o bin/$crate.o
+    riscv64-unknown-elf-gcc -ggdb3 -fdebug-prefix-map=$(pwd)=/riscv-rt -c -mabi=lp64${abi} -march=rv64${ext} asm.S -o bin/$crate.o
     riscv64-unknown-elf-ar crs bin/riscv64${ext}-unknown-none-elf.a bin/$crate.o
 done
 

二進制
riscv-rt/bin/riscv32i-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32ic-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32if-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32ifc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32ifd-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32ifdc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32im-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32imc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32imf-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32imfc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32imfd-unknown-none-elf.a


二進制
riscv-rt/bin/riscv32imfdc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64i-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64ic-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64if-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64ifc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64ifd-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64ifdc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64im-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64imc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64imf-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64imfc-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64imfd-unknown-none-elf.a


二進制
riscv-rt/bin/riscv64imfdc-unknown-none-elf.a


+ 1 - 1
riscv-rt/build.rs

@@ -14,7 +14,7 @@ fn main() {
 
     if target.starts_with("riscv") {
         let mut target = Target::from_target_str(&target);
-        target.retain_extensions("imc");
+        target.retain_extensions("imfdc");
 
         let target = target.to_string();