File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,6 @@ class RISCVTargetInfo : public TargetInfo {
125125  ParsedTargetAttr parseTargetAttr (StringRef Str) const  override ;
126126  llvm::APInt getFMVPriority (ArrayRef<StringRef> Features) const  override ;
127127
128-   std::pair<unsigned , unsigned > hardwareInterferenceSizes () const  override  {
129-     return  std::make_pair (32 , 32 );
130-   }
131- 
132128  bool  supportsCpuSupports () const  override  { return  getTriple ().isOSLinux (); }
133129  bool  supportsCpuIs () const  override  { return  getTriple ().isOSLinux (); }
134130  bool  supportsCpuInit () const  override  { return  getTriple ().isOSLinux (); }
@@ -178,6 +174,10 @@ class LLVM_LIBRARY_VISIBILITY RISCV32TargetInfo : public RISCVTargetInfo {
178174    resetDataLayout (" e-m:e-p:32:32-i64:64-n32-S128"  );
179175  }
180176
177+   std::pair<unsigned , unsigned > hardwareInterferenceSizes () const  override  {
178+     return  std::make_pair (32 , 32 );
179+   }
180+ 
181181  bool  setABI (const  std::string &Name) override  {
182182    if  (Name == " ilp32e"  ) {
183183      ABI = Name;
@@ -208,6 +208,10 @@ class LLVM_LIBRARY_VISIBILITY RISCV64TargetInfo : public RISCVTargetInfo {
208208    resetDataLayout (" e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"  );
209209  }
210210
211+   std::pair<unsigned , unsigned > hardwareInterferenceSizes () const  override  {
212+     return  std::make_pair (64 , 64 );
213+   }
214+ 
211215  bool  setABI (const  std::string &Name) override  {
212216    if  (Name == " lp64e"  ) {
213217      ABI = Name;
Original file line number Diff line number Diff line change 1+ // REQUIRES: riscv-registered-target 
2+ 
3+ // RUN: %clang_cc1 -E -dM -triple=riscv32 < /dev/null | \ 
4+ // RUN:     FileCheck -match-full-lines -check-prefixes=RV32 %s 
5+ // RUN: %clang_cc1 -E -dM -triple=riscv64 < /dev/null | \ 
6+ // RUN:     FileCheck -match-full-lines -check-prefixes=RV64 %s 
7+ 
8+ // RV32: #define __GCC_CONSTRUCTIVE_SIZE 32 
9+ // RV32: #define __GCC_DESTRUCTIVE_SIZE 32 
10+ 
11+ // RV64: #define __GCC_CONSTRUCTIVE_SIZE 64 
12+ // RV64: #define __GCC_DESTRUCTIVE_SIZE 64 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments