Stack frame header size Each stack frame contains ra and fp -- prologue.
Moduleghc-10.0.0.20260917GHC2024
GHC.CmmToAsm.LA64.Instr
Synopsis
- value stackFrameHeaderSize
- value spillSlotSize
- value stackAlign
- value maxSpillSlots
- value spillSlotToOffset
- value regUsageOfInstr
- value callerSavedRegisters
- value patchRegsOfInstr
- value isJumpishInstr
- value jumpDestsOfInstr
- value patchJumpInstr
- value mkSpillInstr
- value mkLoadInstr
- value takeDeltaInstr
- value isMetaInstr
- value canFallthroughTo
- value mkRegRegMoveInstr
- value takeRegRegMoveInstr
- value mkJumpInstr
- value mkStackAllocInstr
- value mkStackDeallocInstr
- value allocMoreStack
- data Instr
- data BarrierType
- value instrCon
- data Target
- data Operand
- value opReg
- value opRegNo
- value zero
- value ra
- value sp
- value tp
- value fp
- value tmp
- value x0
- value x1
- value x2
- value x3
- value x4
- value x5
- value x6
- value x7
- value x8
- value x9
- value x10
- value x11
- value x12
- value x13
- value x14
- value x15
- value x16
- value x17
- value x18
- value x19
- value x20
- value x21
- value x22
- value x23
- value x24
- value x25
- value x26
- value x27
- value x28
- value x29
- value x30
- value x31
- value d0
- value d1
- value d2
- value d3
- value d4
- value d5
- value d6
- value d7
- value d8
- value d9
- value d10
- value d11
- value d12
- value d13
- value d14
- value d15
- value d16
- value d17
- value d18
- value d19
- value d20
- value d21
- value d22
- value d23
- value d24
- value d25
- value d26
- value d27
- value d28
- value d29
- value d30
- value d31
- value fitsInNbits
- value isUnsignOp
- value isNbitEncodeable
- value isEncodeableInWidth
- value isIntOp
- value isFloatOp
- value isFloatReg
- value widthToInt
- value widthFromOpReg
- value ldFormat
- Packageghc-10.0.0.20260917
- Exports109
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceInstr.hs
All registers are 8 byte wide.
The number of bytes that the stack pointer should be aligned to.
The number of spill slots available without allocating more.
Convert a spill slot number to a *byte* offset.
Get the registers that are being used by this instruction. regUsage doesn't need to do any trickery for jumps and such. Just state precisely the regs read and written by that insn. The consequences of control flow transfers, as far as register allocation goes, are taken care of by the register allocator.
Caller-saved registers (according to calling convention)
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
zero| ra | tp | sp | a0 | a1 | a2 | a3 | a4 | a5 | a6 | a7 | t0 | t1 | t2 | t3 | t4 | t5 | t6 | t7 | t8 | Rv | fp | s0 | s1 | s2 | s3 | s4 | s5 | s6 | s7 | s8 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
Apply a given mapping to all the register references in this instruction.
Checks whether this instruction is a jump/branch instruction. One that can change the flow of control in a way that the register allocator needs to worry about.
Get the BlockIds of the jump destinations (if any)
Change the destination of this (potential) jump instruction. Used in the linear allocator when adding fixup blocks for join points.
Make a spill instruction, spill a register into spill slot.
Make a reload instruction, reload from spill slot to a register.
See if this instruction is telling us the current C stack delta
Not real instructions. Just meta data
Copy the value in a register to another one. Must work for all register classes.
Take the source and destination from this (potential) reg -> reg move instruction We have to be a bit careful here: A MOV can also mean an implicit conversion. This case is filtered out.
Make an unconditional jump instruction.
Decrement sp to allocate stack space.
Increment SP to deallocate stack space.
Constructors
COMMENT SDocMULTILINE_COMMENT SDocANN SDoc InstrLOCATION Int Int Int LexicalFastStringNEWBLOCK BlockIdDELTA IntLDATA Section RawCmmStaticsStatic data spat out during code generation.
PUSH_STACK_FRAMEPOP_STACK_FRAMEADD Operand Operand OperandSUB Operand Operand OperandALSL Operand Operand Operand OperandALSLU Operand Operand Operand OperandLU12I Operand OperandLU32I Operand OperandLU52I Operand Operand OperandSSLT Operand Operand OperandSSLTU Operand Operand OperandPCADDI Operand OperandPCADDU12I Operand OperandPCADDU18I Operand OperandPCALAU12I Operand OperandAND Operand Operand OperandOR Operand Operand OperandXOR Operand Operand OperandNOR Operand Operand OperandANDN Operand Operand OperandORN Operand Operand OperandMUL Operand Operand OperandMULW Operand Operand OperandMULWU Operand Operand OperandMULH Operand Operand OperandMULHU Operand Operand OperandDIV Operand Operand OperandDIVU Operand Operand OperandMOD Operand Operand OperandMODU Operand Operand OperandSLL Operand Operand OperandSRL Operand Operand OperandSRA Operand Operand OperandROTR Operand Operand OperandEXT Operand OperandCLO Operand OperandCTO Operand OperandCLZ Operand OperandCTZ Operand OperandBYTEPICK Operand Operand Operand OperandREVB2H Operand OperandREVB4H Operand OperandREVB2W Operand OperandREVBD Operand OperandREVH2W Operand OperandREVHD Operand OperandBITREV4B Operand OperandBITREV8B Operand OperandBITREV Operand OperandBSTRINS Format Operand Operand Operand OperandBSTRPICK Format Operand Operand Operand OperandMASKEQZ Operand Operand OperandMASKNEZ Operand Operand OperandNOPMOV Operand OperandNEG Operand OperandCSET Cond Operand Operand OperandJ TargetJ_TBL [Maybe BlockId] (Maybe CLabel) RegB TargetBL Target [Reg]CALL Target [Reg]CALL36 TargetTAIL36 Operand TargetBCOND1 Cond Operand Operand TargetBCOND Cond Operand Operand TargetBEQZ1 Operand OperandBEQZ Operand TargetBNEZ Operand TargetLD Format Operand OperandLDU Format Operand OperandST Format Operand OperandLDX Format Operand OperandLDXU Format Operand OperandSTX Format Operand OperandLDPTR Format Operand OperandSTPTR Format Operand OperandPRELD Operand OperandAMSWAPDB Format Operand Operand OperandAMADDDB Format Operand Operand OperandAMANDDB Format Operand Operand OperandAMORDB Format Operand Operand OperandAMXORDB Format Operand Operand OperandAMCASDB Format Operand Operand OperandLL Format Operand Operand OperandSC Format Operand Operand OperandDBAR BarrierTypeIBAR BarrierTypeFCVT Operand OperandSCVTF Operand OperandFCVTZS Operand Operand OperandFMAX Operand Operand OperandFMIN Operand Operand OperandFMAXA Operand Operand OperandFMINA Operand Operand OperandFNEG Operand OperandFABS Operand OperandFSQRT Operand OperandFMA FMASign Operand Operand Operand Operand
Instances1Instruction
Instruction InstrDefined in ghc-10.0.0.20260917 · GHC.CmmToAsm.LA64 · orphanInstruction instance for LA64
Instances2Eq, Show
Eq BarrierTypeDefined in ghc-10.0.0.20260917 · GHC.CmmToAsm.LA64.InstrShow BarrierTypeDefined in ghc-10.0.0.20260917 · GHC.CmmToAsm.LA64.Instr