| ... |
... |
@@ -2049,10 +2049,7 @@ genCCall target@(ForeignTarget expr _cconv) dest_regs arg_regs = do |
|
2049
|
2049
|
let code =
|
|
2050
|
2050
|
call_target_code -- compute the label (possibly into a register)
|
|
2051
|
2051
|
`appOL` moveStackDown stackSpaceWords
|
|
2052
|
|
- `snocOL` COMMENT ((text . show) (map (\(a, b, _c, _d) -> (a, b)) arg_regs''))
|
|
2053
|
|
- `snocOL` COMMENT ((text . show) stackSpaceWords <+> (text . show) passRegs)
|
|
2054
|
2052
|
`appOL` passArgumentsCode -- put the arguments into x0, ...
|
|
2055
|
|
- `snocOL` COMMENT (text "CCALL")
|
|
2056
|
2053
|
`snocOL` BL call_target_reg passRegs -- branch and link (C calls aren't tail calls, but return)
|
|
2057
|
2054
|
`appOL` readResultsCode -- parse the results into registers
|
|
2058
|
2055
|
`appOL` moveStackUp stackSpaceWords
|
| ... |
... |
@@ -2139,7 +2136,7 @@ genCCall target@(ForeignTarget expr _cconv) dest_regs arg_regs = do |
|
2139
|
2136
|
`snocOL` ann (text "Pass vector argument: " <> ppr r) mov
|
|
2140
|
2137
|
passArguments gpRegs fpRegs vRegs args stackSpaceWords (vReg : accumRegs) accumCode'
|
|
2141
|
2138
|
|
|
2142
|
|
- -- No more free vector argument registers , and we want to pass a vector argument.
|
|
|
2139
|
+ -- No more free vector argument registers, and we want to pass a vector argument.
|
|
2143
|
2140
|
-- See Note [RISC-V vector C calling convention]
|
|
2144
|
2141
|
passArguments _gpRegs _fpRegs [] ((_r, format, _hint, _code_r) : _args) _stackSpaceWords _accumRegs _accumCode
|
|
2145
|
2142
|
| isVecFormat format =
|
| ... |
... |
@@ -2695,7 +2692,7 @@ makeFarBranches {- only used when debugging -} _platform statics basic_blocks = |
|
2695
|
2692
|
VFMIN {} -> 2
|
|
2696
|
2693
|
VFMAX {} -> 2
|
|
2697
|
2694
|
VRGATHER {} -> 2
|
|
2698
|
|
- VFMA {} -> 3
|
|
|
2695
|
+ VFMA {} -> 2
|
|
2699
|
2696
|
-- estimate the subsituted size for jumps to lables
|
|
2700
|
2697
|
-- jumps to registers have size 1
|
|
2701
|
2698
|
BCOND {} -> long_bc_jump_size
|