Skip to content

Commit 80ce7ce

Browse files
committed
[RISCV] Mention frm in addition to vxrm in the comments for RISCVInsertReadWriteCSR. NFC
1 parent ca72b0a commit 80ce7ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/lib/Target/RISCV/RISCVInsertReadWriteCSR.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
// This file implements the machine function pass to insert read/write of CSR-s
99
// of the RISC-V instructions.
1010
//
11-
// Currently the pass implements naive insertion of a write to vxrm before an
12-
// RVV fixed-point instruction.
11+
// Currently the pass implements:
12+
// -Naive insertion of a write to vxrm before an RVV fixed-point instruction.
13+
// -Writing and saving frm before an RVV floating-point instruction with a
14+
// static rounding mode and restores the value after.
1315
//
1416
//===----------------------------------------------------------------------===//
1517

@@ -57,7 +59,8 @@ INITIALIZE_PASS(RISCVInsertReadWriteCSR, DEBUG_TYPE,
5759
RISCV_INSERT_READ_WRITE_CSR_NAME, false, false)
5860

5961
// This function inserts a write to vxrm when encountering an RVV fixed-point
60-
// instruction.
62+
// instruction. This function also swaps frm and restores it when encountering
63+
// an RVV floating point instruction with a static rounding mode.
6164
bool RISCVInsertReadWriteCSR::emitWriteRoundingMode(MachineBasicBlock &MBB) {
6265
bool Changed = false;
6366
for (MachineInstr &MI : MBB) {

0 commit comments

Comments
 (0)