## machcode-pwrpc32-g.codemade.pkg
#
# This file generated at 2015-12-06:08:43:06 by
#
#
src/lib/compiler/back/low/tools/arch/make-sourcecode-for-machcode-xxx-package.pkg#
# from the architecture description file
#
# src/lib/compiler/back/low/pwrpc32/pwrpc32.architecture-description
#
# Edits to this file will be LOST on next system rebuild.
# Compiled by:
#
src/lib/compiler/back/low/pwrpc32/backend-pwrpc32.lib# We are invoked from:
#
#
src/lib/compiler/back/low/main/pwrpc32/backend-lowhalf-pwrpc32.pkgstipulate
package lbl = codelabel; # codelabel is from
src/lib/compiler/back/low/code/codelabel.pkg package nt = note; # note is from
src/lib/src/note.pkg package rkj = registerkinds_junk; # registerkinds_junk is from
src/lib/compiler/back/low/code/registerkinds-junk.pkgherein
# Treecode_Form is from
src/lib/compiler/back/low/treecode/treecode-form.api generic package machcode_pwrpc32_g (
#
tcf: Treecode_Form
)
: (weak) Machcode_Pwrpc32
{
# Machcode_Pwrpc32 is from
src/lib/compiler/back/low/pwrpc32/code/machcode-pwrpc32.codemade.api # Export to client packages:
#
package tcf = tcf;
package rgn = tcf::rgn; # "rgn" == "region".
package lac = tcf::lac; # "lac" == "late_constant".
package rgk = registerkinds_pwrpc32; # registerkinds_pwrpc32 is from
src/lib/compiler/back/low/pwrpc32/code/registerkinds-pwrpc32.codemade.pkg
Gpr = Int;
Fpr = Int;
Ccr = Int;
Crf = Int;
Spr = XER
| LR
| CTR
;
Operand = REG_OP rkj::Codetemp_Info
| IMMED_OP Int
| LABEL_OP tcf::Label_Expression
;
Addressing_Mode = (rkj::Codetemp_Info, Operand);
Effective_Address = DIRECT rkj::Codetemp_Info
| FDIRECT rkj::Codetemp_Info
| DISPLACE { base: rkj::Codetemp_Info,
disp: tcf::Label_Expression,
ramregion: rgn::Ramregion
}
;
Load = LBZ
| LBZE
| LHZ
| LHZE
| LHA
| LHAE
| LWZ
| LWZE
| LDE
| LBZU
| LHZU
| LHAU
| LWZU
| LDZU
;
Store = STB
| STBE
| STH
| STHE
| STW
| STWE
| STDE
| STBU
| STHU
| STWU
| STDU
;
Fload = LFS
| LFSE
| LFD
| LFDE
| LFSU
| LFDU
;
Fstore = STFS
| STFSE
| STFD
| STFDE
| STFSU
| STFDU
;
Cmp = CMP
| CMPL
;
Fcmp = FCMPO
| FCMPU
;
Unary = NEG
| EXTSB
| EXTSH
| EXTSW
| CNTLZW
| CNTLZD
;
Funary = FMR
| FNEG
| FABS
| FNABS
| FSQRT
| FSQRTS
| FRSP
| FCTIW
| FCTIWZ
| FCTID
| FCTIDZ
| FCFID
;
Farith = FADD
| FSUB
| FMUL
| FDIV
| FADDS
| FSUBS
| FMULS
| FDIVS
;
Farith3 = FMADD
| FMADDS
| FMSUB
| FMSUBS
| FNMADD
| FNMADDS
| FNMSUB
| FNMSUBS
| FSEL
;
Bo = TRUE
| FALSE
| ALWAYS
| COUNTER { eq_zero: Bool,
cond: Null_Or( Bool )
}
;
Arith = ADD
| SUBF
| MULLW
| MULLD
| MULHW
| MULHWU
| DIVW
| DIVD
| DIVWU
| DIVDU
| AND
| OR
| XOR
| NAND
| NOR
| EQV
| ANDC
| ORC
| SLW
| SLD
| SRW
| SRD
| SRAW
| SRAD
;
Arithi = ADDI
| ADDIS
| SUBFIC
| MULLI
| ANDI_RC
| ANDIS_RC
| ORI
| ORIS
| XORI
| XORIS
| SRAWI
| SRADI
;
Rotate = RLWNM
| RLDCL
| RLDCR
;
Rotatei = RLWINM
| RLWIMI
| RLDICL
| RLDICR
| RLDIC
| RLDIMI
;
Ccarith = CRAND
| CROR
| CRXOR
| CRNAND
| CRNOR
| CREQV
| CRANDC
| CRORC
;
Bit = LT
| GT
| EQ
| SO
| FL
| FG
| FE
| FU
| FX
| FEX
| VX
| OX
;
Xerbit = SO64
| OV64
| CA64
| SO32
| OV32
| CA32
;
Cr_Bit = ((rkj::Codetemp_Info), Bit);
Base_Op = LL { ld: Load,
rt: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
d: Operand,
ramregion: rgn::Ramregion
}
| LF { ld: Fload,
ft: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
d: Operand,
ramregion: rgn::Ramregion
}
| ST { st: Store,
rs: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
d: Operand,
ramregion: rgn::Ramregion
}
| STF { st: Fstore,
fs: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
d: Operand,
ramregion: rgn::Ramregion
}
| UNARY { oper: Unary,
rt: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
rc: Bool,
oe: Bool
}
| ARITH { oper: Arith,
rt: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
rb: rkj::Codetemp_Info,
rc: Bool,
oe: Bool
}
| ARITHI { oper: Arithi,
rt: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
im: Operand
}
| ROTATE { oper: Rotate,
ra: rkj::Codetemp_Info,
rs: rkj::Codetemp_Info,
sh: rkj::Codetemp_Info,
mb: Int,
me: Null_Or( Int )
}
| ROTATEI { oper: Rotatei,
ra: rkj::Codetemp_Info,
rs: rkj::Codetemp_Info,
sh: Operand,
mb: Int,
me: Null_Or( Int )
}
| COMPARE { cmp: Cmp,
l: Bool,
bf: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
rb: Operand
}
| FCOMPARE { cmp: Fcmp,
bf: rkj::Codetemp_Info,
fa: rkj::Codetemp_Info,
fb: rkj::Codetemp_Info
}
| FUNARY { oper: Funary,
ft: rkj::Codetemp_Info,
fb: rkj::Codetemp_Info,
rc: Bool
}
| FARITH { oper: Farith,
ft: rkj::Codetemp_Info,
fa: rkj::Codetemp_Info,
fb: rkj::Codetemp_Info,
rc: Bool
}
| FARITH3 { oper: Farith3,
ft: rkj::Codetemp_Info,
fa: rkj::Codetemp_Info,
fb: rkj::Codetemp_Info,
fc: rkj::Codetemp_Info,
rc: Bool
}
| CCARITH { oper: Ccarith,
bt: Cr_Bit,
ba: Cr_Bit,
bb: Cr_Bit
}
| MCRF { bf: rkj::Codetemp_Info,
bfa: rkj::Codetemp_Info
}
| MTSPR { rs: rkj::Codetemp_Info,
spr: rkj::Codetemp_Info
}
| MFSPR { rt: rkj::Codetemp_Info,
spr: rkj::Codetemp_Info
}
| LWARX { rt: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
rb: rkj::Codetemp_Info
}
| STWCX { rs: rkj::Codetemp_Info,
ra: rkj::Codetemp_Info,
rb: rkj::Codetemp_Info
}
| TW { to: Int,
ra: rkj::Codetemp_Info,
si: Operand
}
| TD { to: Int,
ra: rkj::Codetemp_Info,
si: Operand
}
| BC { bo: Bo,
bf: rkj::Codetemp_Info,
bit: Bit,
address: Operand,
lk: Bool,
fall: Operand
}
| BCLR { bo: Bo,
bf: rkj::Codetemp_Info,
bit: Bit,
lk: Bool,
labels: List( lbl::Codelabel )
}
| BB { address: Operand,
lk: Bool
}
| CALL { def: rgk::Codetemplists,
uses: rgk::Codetemplists,
cuts_to: List( lbl::Codelabel ),
ramregion: rgn::Ramregion
}
| SOURCE { }
| SINK { }
| PHI { }
;
Machine_Op
= LIVE { regs: rgk::Codetemplists, spilled: rgk::Codetemplists }
| DEAD { regs: rgk::Codetemplists, spilled: rgk::Codetemplists }
#
| COPY { kind: rkj::Registerkind,
size_in_bits: Int,
dst: List( rkj::Codetemp_Info ),
src: List( rkj::Codetemp_Info ),
tmp: Null_Or( Effective_Address ) # NULL if
|dst| == |src| == 1
}
#
| NOTE { op: Machine_Op,
note: nt::Note
}
#
| BASE_OP Base_Op
;
ll = BASE_OP o LL;
lf = BASE_OP o LF;
st = BASE_OP o ST;
stf = BASE_OP o STF;
unary = BASE_OP o UNARY;
arith = BASE_OP o ARITH;
arithi = BASE_OP o ARITHI;
rotate = BASE_OP o ROTATE;
rotatei = BASE_OP o ROTATEI;
compare = BASE_OP o COMPARE;
fcompare = BASE_OP o FCOMPARE;
funary = BASE_OP o FUNARY;
farith = BASE_OP o FARITH;
farith3 = BASE_OP o FARITH3;
ccarith = BASE_OP o CCARITH;
mcrf = BASE_OP o MCRF;
mtspr = BASE_OP o MTSPR;
mfspr = BASE_OP o MFSPR;
lwarx = BASE_OP o LWARX;
stwcx = BASE_OP o STWCX;
tw = BASE_OP o TW;
td = BASE_OP o TD;
bc = BASE_OP o BC;
bclr = BASE_OP o BCLR;
bb = BASE_OP o BB;
call = BASE_OP o CALL;
source = BASE_OP o SOURCE;
sink = BASE_OP o SINK;
phi = BASE_OP o PHI;
};
end;