Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- slothy.targets.aarch64.apple_m1_icestorm_experimental
- slothy.targets.aarch64.aarch64_big_experimental
- slothy.targets.riscv.xuantie_c908
- slothy.targets.x86_64.intel_atom
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
Expand All @@ -41,6 +42,7 @@ jobs:
- slothy.targets.aarch64.apple_m1_icestorm_experimental
- slothy.targets.aarch64.aarch64_big_experimental
- slothy.targets.riscv.xuantie_c908
- slothy.targets.x86_64.intel_atom
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-ubuntu
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SLOTHY is generic in the target architecture and microarchitecture. This reposit
- Armv8.1-M+Helium: Cortex-M55, Cortex-M85
- AArch64: Cortex-A55, and experimentally Cortex-A72, Cortex-X/Neoverse-V, Apple M1 (Firestorm, Icestorm)
- RISC-V (RV{32,64}IMB): XuanTie C908
- x86_64 (AT&T syntax, Intel syntax via a translator): experimentally Intel Atom (Bonnell)

SLOTHY is discussed in [Fast and Clean: Auditable high-performance assembly via constraint solving](https://eprint.iacr.org/2022/1303).

Expand Down
5 changes: 5 additions & 0 deletions common/OptimizationRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
import slothy.targets.riscv.riscv as RISCV
import slothy.targets.riscv.xuantie_c908 as Target_XuanTieC908

import slothy.targets.x86_64.x86_64 as X86_64
import slothy.targets.x86_64.intel_atom as Target_IntelAtom

target_label_dict = {
Target_CortexA55: "a55",
Target_CortexA72: "a72",
Expand All @@ -59,13 +62,15 @@
Target_AppleM1_icestorm: "m1_icestorm",
Target_AArch64Big: "aarch64_big",
Target_XuanTieC908: "c908",
Target_IntelAtom: "atom",
}

arch_label_dict = {
Arch_Armv7M: "armv7m",
Arch_Armv81M: "armv8m",
AArch64_Neon: "aarch64",
RISCV: "riscv",
X86_64: "x86_64",
}


Expand Down
5 changes: 3 additions & 2 deletions docs/source/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ It is thus independent of and potentially combinable with superoptimizers operat

## Does SLOTHY support x86?

The core of SLOTHY is architecture- and microarchitecture-agnostic and can accommodate x86. As it stands, however,
there is no model of the x86 architecture. Feel free to build one!
Yes, partially. SLOTHY includes an x86_64 model (AT&T syntax natively, with Intel syntax via
`slothy.targets.x86_64.x86_translator`) covering the instructions needed for Keccak, and a uArch model for
Intel Atom (Bonnell). Loop optimization on x86_64 is not yet safe, because flag writes are only partially modelled.

## Does SLOTHY support RISC-V?

Expand Down
1 change: 1 addition & 0 deletions docs/source/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SLOTHY is generic in the target architecture and microarchitecture. This reposit
- Armv8.1-M+Helium: Cortex-M55, Cortex-M85
- AArch64: Cortex-A55, and experimentally Cortex-A72, Cortex-X/Neoverse-V, Apple M1 (Firestorm, Icestorm)
- RISC-V (RV{32,64}IMB): XuanTie C908
- x86_64 (AT&T syntax, Intel syntax via a translator): experimentally Intel Atom (Bonnell)

SLOTHY is discussed in [Fast and Clean: Auditable high-performance assembly via constraint solving](https://eprint.iacr.org/2022/1303).

Expand Down
18 changes: 18 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

import slothy.targets.riscv.xuantie_c908 as Target_C908

import slothy.targets.x86_64.intel_atom as Target_IntelAtom

##########################################################################################

from examples.naive.aarch64.dilithium._example import (
Expand Down Expand Up @@ -105,6 +107,18 @@
example_instances as example_instances_riscv_keccak,
)

from examples.naive.x86_64.simple._example import (
example_instances as example_instances_x86_64_simple,
)

from examples.naive.x86_64.intel._example import (
example_instances as example_instances_x86_64_intel,
)

from examples.naive.x86_64.keccak._example import (
example_instances as example_instances_x86_64_keccak,
)


def main():
examples = (
Expand All @@ -126,6 +140,9 @@ def main():
+ example_instances_riscv_ntt_kyber
+ example_instances_riscv_kyber_basemul
+ example_instances_riscv_keccak
+ example_instances_x86_64_simple
+ example_instances_x86_64_intel
+ example_instances_x86_64_keccak
)

all_example_names = [e.name for e in examples]
Expand Down Expand Up @@ -163,6 +180,7 @@ def main():
Target_AppleM1_icestorm.__name__,
Target_AArch64Big.__name__,
Target_C908.__name__,
Target_IntelAtom.__name__,
],
)
args = parser.parse_args()
Expand Down
Loading
Loading