)]}'
{
  "commit": "dc103c4cd93d244e06d2b6f38464fb40d0c5a736",
  "tree": "291bd680a0a31a8e692b024c31cf81fb32f633e2",
  "parents": [
    "2848c2ebe9a8a604cd63455263299d7258bc8252",
    "288c372b7a039cb05803ebc6ed04254fec535cf0"
  ],
  "author": {
    "name": "Jonathan Brouwer",
    "email": "jonathantbrouwer@gmail.com",
    "time": "Wed Dec 31 17:32:04 2025 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Dec 31 17:32:04 2025 +0100"
  },
  "message": "Rollup merge of #146798 - a4lg:riscv-intrinsics-zkne_or_zknd, r\u003dAmanieu\n\nRISC-V: Implement (Zkne or Zknd) intrinsics correctly\n\nOn rust-lang/stdarch#1765, it has been pointed out that two RISC-V (64-bit only) intrinsics to perform AES key scheduling have wrong target feature.\n`aes64ks1i` and `aes64ks2` instructions require *either* Zkne (scalar cryptography: AES encryption) or Zknd (scalar cryptography: AES decryption) extension (or both) but corresponding Rust intrinsics (in `core::arch::riscv64`) required *both* Zkne and Zknd extensions.\n\nAn excerpt from the original intrinsics:\n\n```rust\n#[target_feature(enable \u003d \"zkne\", enable \u003d \"zknd\")]\n```\n\nTo fix that, we need to:\n\n1.  Represent a condition where *either* Zkne or Zknd is available and\n2.  Workaround an issue: `llvm.riscv.aes64ks1i` / `llvm.riscv.aes64ks2` LLVM intrinsics require either Zkne or Zknd extension.\n\nThis PR attempts to resolve them by:\n\n1.  Adding a perma-unstable RISC-V target feature: `zkne_or_zknd` (implied from both `zkne` and `zknd`) and\n2.  Using inline assembly to construct machine code directly (because `zkne_or_zknd` alone cannot imply neither Zkne nor Zknd, we cannot use LLVM intrinsics).\n\nThe author confirmed that we can construct an AES key scheduling function with decent performance using fixed `aes64ks1i` and `aes64ks2` intrinsics (with optimization enabled).\n",
  "tree_diff": []
}
