tinitialize - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 98bfdd28674d3c75aa349fd36eb55d238ce6bb30
(DIR) parent 9eda38e51f278aeceefd73bea6835eb929c00328
(HTM) Author: rsc <devnull@localhost>
Date: Mon, 6 Feb 2006 19:28:25 +0000
initialize
Diffstat:
M src/libmach/loc.c | 7 +++++++
1 file changed, 7 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/libmach/loc.c b/src/libmach/loc.c
t@@ -187,11 +187,14 @@ lput8(Map *map, Regs *regs, Loc loc, u64int u)
return -1;
}
+static Loc zl;
+
Loc
locaddr(ulong addr)
{
Loc l;
+ l = zl;
l.type = LADDR;
l.addr = addr;
return l;
t@@ -202,6 +205,7 @@ locindir(char *reg, long offset)
{
Loc l;
+ l = zl;
l.type = LOFFSET;
l.reg = reg;
l.offset = offset;
t@@ -214,6 +218,7 @@ locconst(ulong con)
{
Loc l;
+ l = zl;
l.type = LCONST;
l.addr = con;
return l;
t@@ -224,6 +229,7 @@ locnone(void)
{
Loc l;
+ l = zl;
l.type = LNONE;
return l;
}
t@@ -233,6 +239,7 @@ locreg(char *reg)
{
Loc l;
+ l = zl;
l.type = LREG;
l.reg = reg;
return l;