Sven Tennie pushed to branch wip/supersven/riscv-vectors at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • compiler/GHC/CmmToAsm/RV64/Regs.hs
    ... ... @@ -250,12 +250,12 @@ realRegSqueeze cls rr =
    250 250
         RcFloat ->
    
    251 251
           case rr of
    
    252 252
             RealRegSingle regNo
    
    253
    -          | regNo <= d31RegNo -> 1
    
    253
    +          | isFloatRegNo regNo -> 1
    
    254 254
               | otherwise -> 0
    
    255 255
         RcVector ->
    
    256 256
           case rr of
    
    257 257
             RealRegSingle regNo
    
    258
    -          | regNo <= v31RegNo -> 1
    
    258
    +          | isVectorRegNo regNo -> 1
    
    259 259
               | otherwise -> 0
    
    260 260
     
    
    261 261
     mkVirtualReg :: Unique -> Format -> VirtualReg
    

  • compiler/GHC/CmmToAsm/Reg/Linear/RV64.hs
    ... ... @@ -83,7 +83,7 @@ getFreeRegs cls (FreeRegs g f v) =
    83 83
         -- change often.)
    
    84 84
         allocatableIntRegs = [5 .. 7] ++ [10 .. 17] ++ [28 .. 30]
    
    85 85
         allocatableDoubleRegs = [0 .. 7] ++ [10 .. 17] ++ [28 .. 31]
    
    86
    -    allocatableVectorRegs = 1 : [7 .. 31]
    
    86
    +    allocatableVectorRegs = [7 .. 31]
    
    87 87
     
    
    88 88
     -- | Set corresponding register bit to 0
    
    89 89
     allocateReg :: (HasCallStack) => RealReg -> FreeRegs -> FreeRegs