arm

Imports

Imports #

"cmd/internal/obj"
"cmd/internal/obj"
"cmd/internal/objabi"
"fmt"
"internal/buildcfg"
"log"
"math"
"slices"
"cmd/internal/obj"
"fmt"
"cmd/internal/obj"
"cmd/internal/objabi"
"cmd/internal/sys"
"internal/abi"
"internal/buildcfg"
"log"
"cmd/internal/obj"

Constants & Variables

AABSD const #

const AABSD

AABSF const #

const AABSF

AADC const #

const AADC

AADD const #

const AADD

AADDD const #

const AADDD

AADDF const #

const AADDF

AAND const #

const AAND = *ast.BinaryExpr

AB const #

aliases

const AB = obj.AJMP

ABCC const #

const ABCC

ABCS const #

const ABCS

ABEQ const #

* Do not reorder or fragment the conditional branch * opcodes, or the predication code will break

const ABEQ

ABFC const #

const ABFC

ABFI const #

const ABFI

ABFX const #

const ABFX

ABFXU const #

const ABFXU

ABGE const #

const ABGE

ABGT const #

const ABGT

ABHI const #

const ABHI

ABHS const #

const ABHS

ABIC const #

const ABIC

ABL const #

const ABL = obj.ACALL

ABLE const #

const ABLE

ABLO const #

const ABLO

ABLS const #

const ABLS

ABLT const #

const ABLT

ABMI const #

const ABMI

ABNE const #

const ABNE

ABPL const #

const ABPL

ABVC const #

const ABVC

ABVS const #

const ABVS

ABX const #

const ABX

ABXRET const #

const ABXRET

ACLZ const #

const ACLZ

ACMN const #

const ACMN

ACMP const #

const ACMP

ACMPD const #

const ACMPD

ACMPF const #

const ACMPF

ADIV const #

const ADIV

ADIVD const #

const ADIVD

ADIVF const #

const ADIVF

ADIVHW const #

const ADIVHW

ADIVU const #

const ADIVU

ADIVUHW const #

const ADIVUHW

ADMB const #

const ADMB

ADWORD const #

const ADWORD

AEOR const #

const AEOR

AFMULAD const #

const AFMULAD

AFMULAF const #

const AFMULAF

AFMULSD const #

const AFMULSD

AFMULSF const #

const AFMULSF

AFNMULAD const #

const AFNMULAD

AFNMULAF const #

const AFNMULAF

AFNMULSD const #

const AFNMULSD

AFNMULSF const #

const AFNMULSF

ALAST const #

const ALAST

ALDREX const #

const ALDREX

ALDREXB const #

const ALDREXB

ALDREXD const #

const ALDREXD

AMMUL const #

const AMMUL

AMMULA const #

const AMMULA

AMMULS const #

const AMMULS

AMOD const #

const AMOD

AMODU const #

const AMODU

AMOVB const #

const AMOVB

AMOVBS const #

const AMOVBS

AMOVBU const #

const AMOVBU

AMOVD const #

const AMOVD

AMOVDF const #

const AMOVDF

AMOVDW const #

const AMOVDW

AMOVF const #

const AMOVF

AMOVFD const #

const AMOVFD

AMOVFW const #

const AMOVFW

AMOVH const #

const AMOVH

AMOVHS const #

const AMOVHS

AMOVHU const #

const AMOVHU

AMOVM const #

const AMOVM

AMOVW const #

const AMOVW

AMOVWD const #

const AMOVWD

AMOVWF const #

const AMOVWF

AMRC const #

const AMRC

AMUL const #

const AMUL

AMULA const #

const AMULA

AMULABB const #

const AMULABB

AMULAD const #

const AMULAD

AMULAF const #

const AMULAF

AMULAL const #

const AMULAL

AMULALU const #

const AMULALU

AMULAWB const #

const AMULAWB

AMULAWT const #

const AMULAWT

AMULBB const #

const AMULBB

AMULD const #

const AMULD

AMULF const #

const AMULF

AMULL const #

const AMULL

AMULLU const #

const AMULLU

AMULS const #

const AMULS

AMULSD const #

const AMULSD

AMULSF const #

const AMULSF

AMULU const #

const AMULU

AMULWB const #

const AMULWB

AMULWT const #

const AMULWT

AMVN const #

const AMVN

ANEGD const #

const ANEGD

ANEGF const #

const ANEGF

ANMULAD const #

const ANMULAD

ANMULAF const #

const ANMULAF

ANMULD const #

const ANMULD

ANMULF const #

const ANMULF

ANMULSD const #

const ANMULSD

ANMULSF const #

const ANMULSF

AORR const #

const AORR

APLD const #

const APLD

ARBIT const #

const ARBIT

AREV const #

const AREV

AREV16 const #

const AREV16

AREVSH const #

const AREVSH

ARFE const #

const ARFE

ARMDWARFRegisters var #

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0040b/IHI0040B_aadwarf.pdf

var ARMDWARFRegisters = map[int16]int16{...}

ARSB const #

const ARSB

ARSC const #

const ARSC

ASBC const #

const ASBC

ASLL const #

const ASLL

ASQRTD const #

const ASQRTD

ASQRTF const #

const ASQRTF

ASRA const #

const ASRA

ASRL const #

const ASRL

ASTREX const #

const ASTREX

ASTREXB const #

const ASTREXB

ASTREXD const #

const ASTREXD

ASUB const #

const ASUB

ASUBD const #

const ASUBD

ASUBF const #

const ASUBF

ASWI const #

const ASWI

ASWPBU const #

const ASWPBU

ASWPW const #

const ASWPW

ATEQ const #

const ATEQ

ATST const #

const ATST

AWORD const #

const AWORD

AXTAB const #

const AXTAB

AXTABU const #

const AXTABU

AXTAH const #

const AXTAH

AXTAHU const #

const AXTAHU

Anames var #

var Anames = []string{...}

C_ADDR const #

const C_ADDR

C_FAUTO const #

const C_FAUTO

C_FBIT const #

scond byte

const C_FBIT = *ast.BinaryExpr

C_FCR const #

const C_FCR

C_FOREG const #

const C_FOREG

C_FREG const #

const C_FREG

C_GOK const #

const C_GOK

C_HAUTO const #

const C_HAUTO

C_HFAUTO const #

const C_HFAUTO

C_HFOREG const #

const C_HFOREG

C_HOREG const #

const C_HOREG

C_HREG const #

const C_HREG

C_LACON const #

const C_LACON

C_LAUTO const #

const C_LAUTO

C_LBRA const #

const C_LBRA

C_LCON const #

const C_LCON

C_LCONADDR const #

const C_LCONADDR

C_LFCON const #

const C_LFCON

C_LOREG const #

const C_LOREG

C_NCLASS const #

const C_NCLASS

C_NCON const #

const C_NCON

C_NONE const #

const C_NONE = iota

C_PBIT const #

scond byte

const C_PBIT = *ast.BinaryExpr

C_PC const #

const C_PC

C_PSR const #

const C_PSR

C_RACON const #

const C_RACON

C_RCON const #

const C_RCON

C_RCON2A const #

const C_RCON2A

C_RCON2S const #

const C_RCON2S

C_REG const #

const C_REG

C_REGLIST const #

const C_REGLIST

C_REGREG const #

const C_REGREG

C_REGREG2 const #

const C_REGREG2

C_ROREG const #

const C_ROREG

C_SAUTO const #

const C_SAUTO

C_SBIT const #

scond byte

const C_SBIT = *ast.BinaryExpr

C_SBRA const #

const C_SBRA

C_SCON const #

const C_SCON

C_SCOND const #

scond byte

const C_SCOND = *ast.BinaryExpr

C_SCOND_EQ const #

scond byte

const C_SCOND_EQ = *ast.BinaryExpr

C_SCOND_GE const #

scond byte

const C_SCOND_GE = *ast.BinaryExpr

C_SCOND_GT const #

scond byte

const C_SCOND_GT = *ast.BinaryExpr

C_SCOND_HI const #

scond byte

const C_SCOND_HI = *ast.BinaryExpr

C_SCOND_HS const #

scond byte

const C_SCOND_HS = *ast.BinaryExpr

C_SCOND_LE const #

scond byte

const C_SCOND_LE = *ast.BinaryExpr

C_SCOND_LO const #

scond byte

const C_SCOND_LO = *ast.BinaryExpr

C_SCOND_LS const #

scond byte

const C_SCOND_LS = *ast.BinaryExpr

C_SCOND_LT const #

scond byte

const C_SCOND_LT = *ast.BinaryExpr

C_SCOND_MI const #

scond byte

const C_SCOND_MI = *ast.BinaryExpr

C_SCOND_NE const #

scond byte

const C_SCOND_NE = *ast.BinaryExpr

C_SCOND_NONE const #

scond byte

const C_SCOND_NONE = *ast.BinaryExpr

C_SCOND_NV const #

scond byte

const C_SCOND_NV = *ast.BinaryExpr

C_SCOND_PL const #

scond byte

const C_SCOND_PL = *ast.BinaryExpr

C_SCOND_VC const #

scond byte

const C_SCOND_VC = *ast.BinaryExpr

C_SCOND_VS const #

scond byte

const C_SCOND_VS = *ast.BinaryExpr

C_SCOND_XOR const #

These constants are the ARM condition codes encodings, XORed with 14 so that C_SCOND_NONE has value 0, so that a zeroed Prog.scond means "always execute".

const C_SCOND_XOR = 14

C_SFCON const #

const C_SFCON

C_SHIFT const #

const C_SHIFT

C_SHIFTADDR const #

const C_SHIFTADDR

C_SOREG const #

const C_SOREG

C_SP const #

const C_SP

C_SPR const #

const C_SPR

C_SROREG const #

const C_SROREG

C_TEXTSIZE const #

const C_TEXTSIZE

C_TLS_IE const #

TLS "var" in initial exec mode: will become a memory address (chosen by the program linker) that the dynamic linker will fill with the offset from the thread local base.

const C_TLS_IE

C_TLS_LE const #

TLS "var" in local exec mode: will become a constant offset from thread local base that is ultimately chosen by the program linker.

const C_TLS_LE

C_UBIT const #

scond byte

const C_UBIT = *ast.BinaryExpr

C_WBIT const #

scond byte

const C_WBIT = *ast.BinaryExpr

C_ZFCON const #

const C_ZFCON

FOLL const #

Prog.mark

const FOLL = *ast.BinaryExpr

FREGEXT const #

const FREGEXT = REG_F7

FREGRET const #

compiler allocates register variables F0 up compiler allocates external registers F7 down

const FREGRET = REG_F0

FREGTMP const #

const FREGTMP = REG_F15

LABEL const #

Prog.mark

const LABEL = *ast.BinaryExpr

LEAF const #

Prog.mark

const LEAF = *ast.BinaryExpr

LFROM const #

const LFROM = *ast.BinaryExpr

LPCREL const #

const LPCREL = *ast.BinaryExpr

LPOOL const #

const LPOOL = *ast.BinaryExpr

LTO const #

const LTO = *ast.BinaryExpr

Linkarm var #

var Linkarm = obj.LinkArch{...}

MAXREG const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const MAXREG

NFREG const #

const NFREG = 16

NREG const #

const NREG = 16

NSNAME const #

const NSNAME = 8

NSYM const #

const NSYM = 50

REGARG const #

-1 disables use of REGARG

const REGARG = *ast.UnaryExpr

REGCTXT const #

const REGCTXT = REG_R7

REGEXT const #

compiler allocates R1 up as temps compiler allocates register variables R3 up compiler allocates external registers R10 down

const REGEXT = REG_R10

REGG const #

these two registers are declared in runtime.h

const REGG = *ast.BinaryExpr

REGM const #

const REGM = *ast.BinaryExpr

REGPC const #

const REGPC = REG_R15

REGRET const #

const REGRET = REG_R0

REGSP const #

const REGSP = REG_R13

REGTMP const #

const REGTMP = REG_R11

REG_CPSR const #

const REG_CPSR

REG_F0 const #

const REG_F0

REG_F1 const #

const REG_F1

REG_F10 const #

const REG_F10

REG_F11 const #

const REG_F11

REG_F12 const #

const REG_F12

REG_F13 const #

const REG_F13

REG_F14 const #

const REG_F14

REG_F15 const #

const REG_F15

REG_F2 const #

const REG_F2

REG_F3 const #

const REG_F3

REG_F4 const #

const REG_F4

REG_F5 const #

const REG_F5

REG_F6 const #

const REG_F6

REG_F7 const #

const REG_F7

REG_F8 const #

const REG_F8

REG_F9 const #

const REG_F9

REG_FPCR const #

const REG_FPCR

REG_FPSR const #

const REG_FPSR

REG_MB_ISH const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_ISH

REG_MB_ISHST const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_ISHST

REG_MB_NSH const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_NSH

REG_MB_NSHST const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_NSHST

REG_MB_OSH const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_OSH

REG_MB_OSHST const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_OSHST

REG_MB_ST const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_ST

REG_MB_SY const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_MB_SY

REG_R0 const #

const REG_R0 = *ast.BinaryExpr

REG_R1 const #

const REG_R1

REG_R10 const #

const REG_R10

REG_R11 const #

const REG_R11

REG_R12 const #

const REG_R12

REG_R13 const #

const REG_R13

REG_R14 const #

const REG_R14

REG_R15 const #

const REG_R15

REG_R2 const #

const REG_R2

REG_R3 const #

const REG_R3

REG_R4 const #

const REG_R4

REG_R5 const #

const REG_R5

REG_R6 const #

const REG_R6

REG_R7 const #

const REG_R7

REG_R8 const #

const REG_R8

REG_R9 const #

const REG_R9

REG_SPECIAL const #

Special registers, after subtracting obj.RBaseARM, bit 9 indicates a special register and the low bits select the register.

const REG_SPECIAL = *ast.BinaryExpr

REG_SPSR const #

const REG_SPSR

SHIFT_AR const #

scond byte

const SHIFT_AR = *ast.BinaryExpr

SHIFT_LL const #

D_SHIFT type

const SHIFT_LL = *ast.BinaryExpr

SHIFT_LR const #

scond byte

const SHIFT_LR = *ast.BinaryExpr

SHIFT_RR const #

scond byte

const SHIFT_RR = *ast.BinaryExpr

cnames5 var #

var cnames5 = []string{...}

mbOp var #

var mbOp = []struct{...}{...}

oprange var #

var oprange [*ast.BinaryExpr][]Optab

optab var #

var optab = []Optab{...}

progedit_tlsfallback var #

var progedit_tlsfallback *obj.LSym

symdiv var #

var symdiv *obj.LSym

symdivu var #

var symdivu *obj.LSym

symmod var #

var symmod *obj.LSym

symmodu var #

var symmodu *obj.LSym

unaryDst var #

var unaryDst = map[obj.As]bool{...}

xcmp var #

var xcmp [*ast.BinaryExpr][*ast.BinaryExpr]bool

Type Aliases

Opcross type #

type Opcross [32][2][32]uint8

Structs

Optab struct #

type Optab struct {
as obj.As
a1 uint8
a2 int8
a3 uint8
type_ uint8
size int8
param int16
flag int8
pcrelsiz uint8
scond uint8
}

ctxt5 struct #

ctxt5 holds state while assembling a single function. Each function gets a fresh ctxt5. This allows for multiple functions to be safely concurrently assembled.

type ctxt5 struct {
ctxt *obj.Link
newprog obj.ProgAlloc
cursym *obj.LSym
printp *obj.Prog
blitrl *obj.Prog
elitrl *obj.Prog
autosize int64
instoffset int64
pc int64
pool struct{...}
}

Functions

DRconv function #

func DRconv(a int) string

aclass method #

func (c *ctxt5) aclass(a *obj.Addr) int

aconsize method #

func (c *ctxt5) aconsize() int

addpool method #

func (c *ctxt5) addpool(p *obj.Prog, a *obj.Addr)

asmout method #

func (c *ctxt5) asmout(p *obj.Prog, o *Optab, out []uint32)

buildop function #

func buildop(ctxt *obj.Link)

checkSuffix function #

func checkSuffix(c *ctxt5, p *obj.Prog, o *Optab)

checkpool method #

checkpool flushes the literal pool when the first reference to it threatens to go out of range of a 12-bit PC-relative offset. nextpc is the tentative next PC at which the pool could be emitted. checkpool should be called *before* emitting the instruction that would cause the PC to reach nextpc. If nextpc is too far from the first pool reference, checkpool will flush the pool immediately after p. The caller should resume processing a p.Link.

func (c *ctxt5) checkpool(p *obj.Prog, nextpc int32) bool

chipfloat5 method #

func (c *ctxt5) chipfloat5(e float64) int

chipzero5 method #

func (c *ctxt5) chipzero5(e float64) int

cmp function #

func cmp(a int, b int) bool

flushpool method #

func (c *ctxt5) flushpool(p *obj.Prog, skip int, force int) bool

immaddr function #

func immaddr(v int32) int32

immfloat function #

func immfloat(v int32) bool

immhalf function #

func immhalf(v int32) bool

immrot function #

func immrot(v uint32) int32

immrot2a function #

immrot2a returns bits encoding the immediate constant fields of two instructions, such that the encoded constants x, y satisfy x|y==v, x&y==0. Returns 0,0 if no such decomposition of v exists.

func immrot2a(v uint32) (uint32, uint32)

immrot2s function #

immrot2s returns bits encoding the immediate constant fields of two instructions, such that the encoded constants y, x satisfy y-x==v, y&x==0. Returns 0,0 if no such decomposition of v exists.

func immrot2s(v uint32) (uint32, uint32)

init function #

func init()

init function #

func init()

mov method #

func (c *ctxt5) mov(p *obj.Prog) uint32

movxt method #

func (c *ctxt5) movxt(p *obj.Prog) uint32

nocache function #

func nocache(p *obj.Prog)

ocmp function #

func ocmp(a Optab, b Optab) int

ofsr method #

func (c *ctxt5) ofsr(a obj.As, r int, v int32, b int, sc int, p *obj.Prog) uint32

olhr method #

func (c *ctxt5) olhr(v int32, b int, r int, sc int) uint32

olhrr method #

func (c *ctxt5) olhrr(i int, b int, r int, sc int) uint32

olr method #

func (c *ctxt5) olr(v int32, b int, r int, sc int) uint32

olrr method #

func (c *ctxt5) olrr(i int, b int, r int, sc int) uint32

omvl method #

func (c *ctxt5) omvl(p *obj.Prog, a *obj.Addr, dr int) uint32

omvr method #

MVN $C_NCON, Reg -> MOVW $C_RCON, Reg

func (c *ctxt5) omvr(p *obj.Prog, a *obj.Addr, dr int) uint32

omvs method #

MOVW $"lower 16-bit", Reg

func (c *ctxt5) omvs(p *obj.Prog, a *obj.Addr, dr int) uint32

opbra method #

func (c *ctxt5) opbra(p *obj.Prog, a obj.As, sc int) uint32

oplook method #

func (c *ctxt5) oplook(p *obj.Prog) *Optab

oprrr method #

func (c *ctxt5) oprrr(p *obj.Prog, a obj.As, sc int) uint32

opset function #

func opset(a obj.As, b0 obj.As)

oshr method #

func (c *ctxt5) oshr(r int, v int32, b int, sc int) uint32

oshrr method #

func (c *ctxt5) oshrr(r int, i int, b int, sc int) uint32

osr method #

func (c *ctxt5) osr(a obj.As, r int, v int32, b int, sc int) uint32

osrr method #

func (c *ctxt5) osrr(r int, i int, b int, sc int) uint32

preprocess function #

func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc)

progedit function #

func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc)

rconv function #

func rconv(r int) string

regoff method #

func (c *ctxt5) regoff(a *obj.Addr) int32

rewriteToUseGot method #

Rewrite p, if necessary, to access global data via the global offset table.

func (c *ctxt5) rewriteToUseGot(p *obj.Prog)

rlconv function #

func rlconv(list int64) string

span5 function #

func span5(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc)

stacksplit method #

func (c *ctxt5) stacksplit(p *obj.Prog, framesize int32) *obj.Prog

Generated with Arrow