[PATCH] D155690: [RISCV] Mask instructions in Zkt as constant-time

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 03:08:42 PDT 2023


wangpc created this revision.
wangpc added reviewers: asb, craig.topper, reames, jrtc27, kito-cheng, VincentWu.
Herald added subscribers: jobnoorman, luke, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
wangpc requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.

We use one bit in TSFlags to indicate that this instruction has
data-independent execution time property (constant-time) as required
in Zkt extension.

This property may help to verify whether a function is constant-time.

(Though there are limited usages currently, I think this will be
helpful to crypto libraries).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155690

Files:
  llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
  llvm/lib/Target/RISCV/RISCVInstrFormats.td
  llvm/lib/Target/RISCV/RISCVInstrFormatsC.td
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/lib/Target/RISCV/RISCVInstrInfoC.td
  llvm/lib/Target/RISCV/RISCVInstrInfoM.td
  llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
  llvm/lib/Target/RISCV/RISCVInstrInfoZk.td
  llvm/test/MC/RISCV/rv32-constant-time.s
  llvm/test/MC/RISCV/rv64-constant-time.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155690.541931.patch
Type: text/x-patch
Size: 20612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/d26c5967/attachment.bin>


More information about the llvm-commits mailing list