File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1745,6 +1745,35 @@ bool G4_SendDescRaw::isBarrier() const {
1745
1745
return funcID == SFID::GATEWAY && (funcCtrl & 0xFF ) == 0x4 ;
1746
1746
}
1747
1747
1748
+ bool G4_SendDescRaw::isBTS () const {
1749
+ if (isLscOp ()) {
1750
+ switch (getLscAddrType ()) {
1751
+ case LSC_ADDR_TYPE_BSS:
1752
+ case LSC_ADDR_TYPE_SS:
1753
+ case LSC_ADDR_TYPE_BTI:
1754
+ return true ;
1755
+ default :
1756
+ break ;
1757
+ }
1758
+ } else {
1759
+ const G4_Operand *BTI = getBti ();
1760
+ uint32_t BTIImm = 0 ;
1761
+ if (BTI && !BTI->isImm ()) {
1762
+ // Desc in reg, should be stateful.
1763
+ return true ;
1764
+ } else if (BTI) {
1765
+ BTIImm = (BTI->asImm ()->getInt () & 0xFF );
1766
+ } else {
1767
+ BTIImm = (getDesc () & 0xFF );
1768
+ }
1769
+ constexpr uint32_t BSS_BTI = 252 ;
1770
+ constexpr uint32_t BTI_MAX = 240 ;
1771
+ if (BTIImm <= BTI_MAX || BTIImm == BSS_BTI)
1772
+ return true ;
1773
+ }
1774
+ return false ;
1775
+ }
1776
+
1748
1777
std::optional<ImmOff> G4_SendDescRaw::getOffset () const {
1749
1778
if (isLscOp ()) {
1750
1779
// technically unavailable until XE2, but this is binary compatible,
Original file line number Diff line number Diff line change @@ -297,6 +297,7 @@ class G4_SendDesc {
297
297
bool isGTWY () const {return getSFID () == SFID::GATEWAY;}
298
298
//
299
299
virtual bool isSLM () const = 0;
300
+ virtual bool isBTS () const = 0; // BTS stateful
300
301
virtual bool isTyped () const = 0;
301
302
virtual bool isAtomic () const = 0;
302
303
virtual bool isBarrier () const = 0;
@@ -680,6 +681,7 @@ class G4_SendDescRaw : public G4_SendDesc {
680
681
virtual std::optional<ImmOff> getOffset () const override ;
681
682
682
683
virtual bool isSLM () const override { return isSLMMessage (); }
684
+ virtual bool isBTS () const override ;
683
685
virtual bool isAtomic () const override { return isAtomicMessage (); }
684
686
virtual bool isBarrier () const override ;
685
687
virtual bool isFence () const override ;
You can’t perform that action at this time.
0 commit comments