Stack frame header size Each stack frame contains ra and fp -- prologue.
Moduleghc-9.14.1GHC2021
GHC.CmmToAsm.LA64.Instr
- 4 types
- 105 values
- Packageghc-9.14.1
- Exports109
- LanguageGHC2021
- 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 OperandBITREVW Operand OperandBITREVD 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 TargetBEQZ 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 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-9.14.1 · GHC.CmmToAsm.LA64 · orphanInstruction instance for LA64