Page MenuHomeFreeBSD

D23857.diff
No OneTemporary

D23857.diff

Index: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
===================================================================
--- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -185,6 +185,9 @@
setOperationAction(ISD::READCYCLECOUNTER, MVT::i64,
Subtarget.is64Bit() ? Legal : Custom);
+ setOperationAction(ISD::TRAP, MVT::Other, Legal);
+ setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal);
+
if (Subtarget.hasStdExtA()) {
setMaxAtomicSizeInBitsSupported(Subtarget.getXLen());
setMinCmpXchgSizeInBits(32);
Index: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
===================================================================
--- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -1075,6 +1075,16 @@
mayLoad = 0, mayStore = 0, hasNoSchedulingInfo = 1 in
def ReadCycleWide : Pseudo<(outs GPR:$lo, GPR:$hi), (ins), [], "", "">;
+/// traps
+
+// We lower `trap` to `unimp`, as this causes a hard exception on nearly all
+// systems.
+def : Pat<(trap), (UNIMP)>;
+
+// We lower `debugtrap` to `ebreak`, as this will get the attention of the
+// debugger if possible.
+def : Pat<(debugtrap), (EBREAK)>;
+
//===----------------------------------------------------------------------===//
// Standard extensions
//===----------------------------------------------------------------------===//

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 13, 5:30 AM (11 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23659639
Default Alt Text
D23857.diff (1 KB)

Event Timeline