- [ X.INSN (X.AL, X.MOVLIT (X.TEMP t_stackb, Word.fromInt stackb)),
- X.INSN (X.AL, X.MOVSYM (X.TEMP t_target, name)),
- X.INSN (X.AL, X.SUB (X.REG X.SP, X.TEMP t_stackb)),
- X.INSN (X.AL, X.CALL (X.REG X.SP, X.TEMP t_target, nargs)),
- X.INSN (X.AL, X.ADD (X.REG X.SP, X.TEMP t_stackb)),
- X.INSN (X.AL, X.MOV (d, X.REG X.R0))]
+ shittodo @
+ (if stackb > 0
+ then [ X.INSN (X.AL, X.MOVLIT (X.TEMP t_stackb, Word.fromInt stackb)),
+ X.INSN (X.AL, X.MOVSYM (X.TEMP t_target, name)),
+ X.INSN (X.AL, X.SUB (X.REG X.SP, X.TEMP t_stackb)),
+ X.INSN (X.AL, X.CALL (X.REG X.SP, X.TEMP t_target, nargs)),
+ X.INSN (X.AL, X.ADD (X.REG X.SP, X.TEMP t_stackb)),
+ X.INSN (X.AL, X.MOV (d, X.REG X.R0))]
+ else [ X.INSN (X.AL, X.MOVSYM (X.TEMP t_target, name)),
+ X.INSN (X.AL, X.CALL (X.REG X.SP, X.TEMP t_target, nargs)),
+ X.INSN (X.AL, X.MOV (d, X.REG X.R0))]
+ )