initialize
This commit is contained in:
parent
9eda38e51f
commit
98bfdd2867
1 changed files with 7 additions and 0 deletions
|
|
@ -187,11 +187,14 @@ lput8(Map *map, Regs *regs, Loc loc, u64int u)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Loc zl;
|
||||||
|
|
||||||
Loc
|
Loc
|
||||||
locaddr(ulong addr)
|
locaddr(ulong addr)
|
||||||
{
|
{
|
||||||
Loc l;
|
Loc l;
|
||||||
|
|
||||||
|
l = zl;
|
||||||
l.type = LADDR;
|
l.type = LADDR;
|
||||||
l.addr = addr;
|
l.addr = addr;
|
||||||
return l;
|
return l;
|
||||||
|
|
@ -202,6 +205,7 @@ locindir(char *reg, long offset)
|
||||||
{
|
{
|
||||||
Loc l;
|
Loc l;
|
||||||
|
|
||||||
|
l = zl;
|
||||||
l.type = LOFFSET;
|
l.type = LOFFSET;
|
||||||
l.reg = reg;
|
l.reg = reg;
|
||||||
l.offset = offset;
|
l.offset = offset;
|
||||||
|
|
@ -214,6 +218,7 @@ locconst(ulong con)
|
||||||
{
|
{
|
||||||
Loc l;
|
Loc l;
|
||||||
|
|
||||||
|
l = zl;
|
||||||
l.type = LCONST;
|
l.type = LCONST;
|
||||||
l.addr = con;
|
l.addr = con;
|
||||||
return l;
|
return l;
|
||||||
|
|
@ -224,6 +229,7 @@ locnone(void)
|
||||||
{
|
{
|
||||||
Loc l;
|
Loc l;
|
||||||
|
|
||||||
|
l = zl;
|
||||||
l.type = LNONE;
|
l.type = LNONE;
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
@ -233,6 +239,7 @@ locreg(char *reg)
|
||||||
{
|
{
|
||||||
Loc l;
|
Loc l;
|
||||||
|
|
||||||
|
l = zl;
|
||||||
l.type = LREG;
|
l.type = LREG;
|
||||||
l.reg = reg;
|
l.reg = reg;
|
||||||
return l;
|
return l;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue