diff --git a/Cargo.toml b/Cargo.toml index b6929c2..cc928a8 100644 --- a/Cargo.toml +++ b/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] diff --git a/assemble.ps1 b/assemble.ps1 index 389014a..c5e67f6 100644 --- a/assemble.ps1 +++ b/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 } diff --git a/assemble.sh b/assemble.sh index 997d9ae..b8d85d6 100755 --- a/assemble.sh +++ b/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 diff --git a/bin/riscv32i-unknown-none-elf.a b/bin/riscv32i-unknown-none-elf.a index 928edbe..f09da16 100644 Binary files a/bin/riscv32i-unknown-none-elf.a and b/bin/riscv32i-unknown-none-elf.a differ diff --git a/bin/riscv32ic-unknown-none-elf.a b/bin/riscv32ic-unknown-none-elf.a index 8c48759..1d0ee0a 100644 Binary files a/bin/riscv32ic-unknown-none-elf.a and b/bin/riscv32ic-unknown-none-elf.a differ diff --git a/bin/riscv32if-unknown-none-elf.a b/bin/riscv32if-unknown-none-elf.a new file mode 100644 index 0000000..f8e099f Binary files /dev/null and b/bin/riscv32if-unknown-none-elf.a differ diff --git a/bin/riscv32ifc-unknown-none-elf.a b/bin/riscv32ifc-unknown-none-elf.a new file mode 100644 index 0000000..0a5234e Binary files /dev/null and b/bin/riscv32ifc-unknown-none-elf.a differ diff --git a/bin/riscv32ifd-unknown-none-elf.a b/bin/riscv32ifd-unknown-none-elf.a new file mode 100644 index 0000000..a5924f7 Binary files /dev/null and b/bin/riscv32ifd-unknown-none-elf.a differ diff --git a/bin/riscv32ifdc-unknown-none-elf.a b/bin/riscv32ifdc-unknown-none-elf.a new file mode 100644 index 0000000..8c424ff Binary files /dev/null and b/bin/riscv32ifdc-unknown-none-elf.a differ diff --git a/bin/riscv32im-unknown-none-elf.a b/bin/riscv32im-unknown-none-elf.a index 541bc29..629a2d4 100644 Binary files a/bin/riscv32im-unknown-none-elf.a and b/bin/riscv32im-unknown-none-elf.a differ diff --git a/bin/riscv32imc-unknown-none-elf.a b/bin/riscv32imc-unknown-none-elf.a index f09206c..a39c080 100644 Binary files a/bin/riscv32imc-unknown-none-elf.a and b/bin/riscv32imc-unknown-none-elf.a differ diff --git a/bin/riscv32imf-unknown-none-elf.a b/bin/riscv32imf-unknown-none-elf.a new file mode 100644 index 0000000..aa1c333 Binary files /dev/null and b/bin/riscv32imf-unknown-none-elf.a differ diff --git a/bin/riscv32imfc-unknown-none-elf.a b/bin/riscv32imfc-unknown-none-elf.a new file mode 100644 index 0000000..c03b503 Binary files /dev/null and b/bin/riscv32imfc-unknown-none-elf.a differ diff --git a/bin/riscv32imfd-unknown-none-elf.a b/bin/riscv32imfd-unknown-none-elf.a new file mode 100644 index 0000000..34d9847 Binary files /dev/null and b/bin/riscv32imfd-unknown-none-elf.a differ diff --git a/bin/riscv32imfdc-unknown-none-elf.a b/bin/riscv32imfdc-unknown-none-elf.a new file mode 100644 index 0000000..2cfabd7 Binary files /dev/null and b/bin/riscv32imfdc-unknown-none-elf.a differ diff --git a/bin/riscv64i-unknown-none-elf.a b/bin/riscv64i-unknown-none-elf.a index a9d8564..9f4ca5d 100644 Binary files a/bin/riscv64i-unknown-none-elf.a and b/bin/riscv64i-unknown-none-elf.a differ diff --git a/bin/riscv64ic-unknown-none-elf.a b/bin/riscv64ic-unknown-none-elf.a index 84cac63..7b563c6 100644 Binary files a/bin/riscv64ic-unknown-none-elf.a and b/bin/riscv64ic-unknown-none-elf.a differ diff --git a/bin/riscv64if-unknown-none-elf.a b/bin/riscv64if-unknown-none-elf.a new file mode 100644 index 0000000..f9e4aa4 Binary files /dev/null and b/bin/riscv64if-unknown-none-elf.a differ diff --git a/bin/riscv64ifc-unknown-none-elf.a b/bin/riscv64ifc-unknown-none-elf.a new file mode 100644 index 0000000..f118261 Binary files /dev/null and b/bin/riscv64ifc-unknown-none-elf.a differ diff --git a/bin/riscv64ifd-unknown-none-elf.a b/bin/riscv64ifd-unknown-none-elf.a new file mode 100644 index 0000000..666f812 Binary files /dev/null and b/bin/riscv64ifd-unknown-none-elf.a differ diff --git a/bin/riscv64ifdc-unknown-none-elf.a b/bin/riscv64ifdc-unknown-none-elf.a new file mode 100644 index 0000000..5512906 Binary files /dev/null and b/bin/riscv64ifdc-unknown-none-elf.a differ diff --git a/bin/riscv64im-unknown-none-elf.a b/bin/riscv64im-unknown-none-elf.a index dbd50b2..e7e7490 100644 Binary files a/bin/riscv64im-unknown-none-elf.a and b/bin/riscv64im-unknown-none-elf.a differ diff --git a/bin/riscv64imc-unknown-none-elf.a b/bin/riscv64imc-unknown-none-elf.a index f5dbd9b..b2763d0 100644 Binary files a/bin/riscv64imc-unknown-none-elf.a and b/bin/riscv64imc-unknown-none-elf.a differ diff --git a/bin/riscv64imf-unknown-none-elf.a b/bin/riscv64imf-unknown-none-elf.a new file mode 100644 index 0000000..9333589 Binary files /dev/null and b/bin/riscv64imf-unknown-none-elf.a differ diff --git a/bin/riscv64imfc-unknown-none-elf.a b/bin/riscv64imfc-unknown-none-elf.a new file mode 100644 index 0000000..2c75f54 Binary files /dev/null and b/bin/riscv64imfc-unknown-none-elf.a differ diff --git a/bin/riscv64imfd-unknown-none-elf.a b/bin/riscv64imfd-unknown-none-elf.a new file mode 100644 index 0000000..f9d11c3 Binary files /dev/null and b/bin/riscv64imfd-unknown-none-elf.a differ diff --git a/bin/riscv64imfdc-unknown-none-elf.a b/bin/riscv64imfdc-unknown-none-elf.a new file mode 100644 index 0000000..b991498 Binary files /dev/null and b/bin/riscv64imfdc-unknown-none-elf.a differ diff --git a/build.rs b/build.rs index dff0f3e..9801b19 100644 --- a/build.rs +++ b/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();