Commit de0d762a authored by Russ Cox's avatar Russ Cox

accept CALL $(constant) to call absolute PC

R=ken
OCL=34845
CL=34845
parent 11e313ae
......@@ -285,6 +285,7 @@ rom:
}
| reg
| omem
| imm
rim:
rem
......
......@@ -193,6 +193,7 @@ enum
Z_rp,
Zbr,
Zcall,
Zcallcon,
Zib_,
Zib_rp,
Zibo_m,
......
......@@ -260,7 +260,8 @@ uchar yloop[] =
uchar ycall[] =
{
Ynone, Yml, Zo_m, 2,
Ynone, Ybr, Zcall, 1,
Ynone, Ybr, Zcall, 0,
Ynone, Yi32, Zcallcon, 1,
0
};
uchar yjmp[] =
......
......@@ -1109,6 +1109,15 @@ found:
}
break;
case Zcallcon:
v = p->to.offset - p->pc - 5;
*andptr++ = op;
*andptr++ = v;
*andptr++ = v>>8;
*andptr++ = v>>16;
*andptr++ = v>>24;
break;
case Zjmp:
q = p->pcond;
if(q) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment