Added triple-quad load and store (used by the signal stuff).

--HG--
branch : dtrg-videocore
This commit is contained in:
David Given 2013-05-26 00:22:08 +01:00
parent e299cc3bcf
commit 308d41e083

View file

@ -72,6 +72,7 @@ TOKENS
GPROFFSET = { GPR reg; INT off; } 4 off "(" reg ")".
GPRGPR = { GPR reg1; GPR reg2; } 4 "(" reg1 "," reg2 ")".
GPRINC = { GPR reg; } 4 "(" reg ")++".
ADDCMPB_LL = { GPR rd; INT val; INT vs; ADDR dest; } 4 rd ",#" val ",#" vs "," dest.
/* Primitives */
@ -105,6 +106,7 @@ INSTRUCTIONS
add GPR:wo, GPR:ro, GPR+CONST:ro.
add GPR:rw, GPR+CONST:ro.
addcmpbge "addcmpb.ge" ADDCMPB_LL:rw.
adds2 GPR:rw, GPR+CONST:ro.
adds4 GPR:rw, GPR+CONST:ro.
adds8 GPR:rw, GPR+CONST:ro.
@ -150,6 +152,7 @@ INSTRUCTIONS
push GPR0+GPR6+GPR16+GPRFP:ro, GPRLR:ro.
sub GPR:wo, GPR:ro, CONST+GPR:ro.
sub GPR:rw, GPR+CONST:ro.
st GPR:ro, GPRINC:rw.
st GPR:ro, GPROFFSET+GPRGPR+LABEL:ro.
stb GPR:ro, GPROFFSET+GPRGPR+LABEL:ro.
sth GPR:ro, GPROFFSET+GPRGPR+LABEL:ro.
@ -556,7 +559,25 @@ PATTERNS
ld %b, {GPROFFSET, %b, 4}
yields %b %a
pat loi !nicesize($1) /* Load arbitrary size */
pat loi $1==3*QUAD /* Load triple-quad indirect */
with LABEL
uses REG, REG, REG
gen
lea %b, %1
ld %a, {GPROFFSET, %b, 0}
ld %b, {GPROFFSET, %b, 4}
ld %b, {GPROFFSET, %b, 8}
yields %c %b %a
with GPR
uses reusing %1, REG, REG, REG
gen
add %b, %1, GP
ld %a, {GPROFFSET, %b, 0}
ld %b, {GPROFFSET, %b, 4}
ld %c, {GPROFFSET, %b, 8}
yields %c %b %a
pat loi /* Load arbitrary size */
leaving
loc $1
los QUAD
@ -621,16 +642,30 @@ PATTERNS
st %2, {GPROFFSET, %a, 0}
st %3, {GPROFFSET, %a, 4}
pat sti $1==3*QUAD /* Load triple-quad indirect */
with LABEL GPR GPR GPR
uses REG
gen
lea %a, %1
st %2, {GPROFFSET, %a, 0}
st %3, {GPROFFSET, %a, 4}
st %4, {GPROFFSET, %a, 8}
with GPR GPR GPR GPR
uses reusing %1, REG=%1
gen
add %a, GP
st %2, {GPROFFSET, %a, 0}
st %3, {GPROFFSET, %a, 4}
st %4, {GPROFFSET, %a, 8}
pat sti /* Store arbitrary size */
leaving
loc $1
sts QUAD
pat sts /* Load arbitrary size */
with STACK
kills ALL
gen
bl {LABEL, ".sts"}
pat sts /* Store arbitrary size */
leaving
cal ".sts"