Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164805234
D23857.id68909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23857.id68909.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 3:26 AM (17 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35988876
Default Alt Text
D23857.id68909.diff (1 KB)
Attached To
Mode
D23857: Merge commit 7214f7a79 from llvm git (by Sam Elliott):
Attached
Detach File
Event Timeline
Log In to Comment