From f792cb549e8273ce1a1fc8cabc6308dd59654411 Mon Sep 17 00:00:00 2001 From: sater Date: Sat, 19 May 1984 11:38:48 +0000 Subject: [PATCH] added rcsid removed sign extension bug in large constants --- mach/proto/cg/compute.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mach/proto/cg/compute.c b/mach/proto/cg/compute.c index d5addb656..9981708dc 100644 --- a/mach/proto/cg/compute.c +++ b/mach/proto/cg/compute.c @@ -1,3 +1,7 @@ +#ifndef NORCSID +static char rcsid[] = "$Header$"; +#endif + #include "assert.h" #include "param.h" #include "tables.h" @@ -157,7 +161,7 @@ result_t compute(node) node_p node; { return(dollar[node->ex_lnode-1]); case EX_CON: result.e_typ = EV_INT; - result.e_v.e_con = ((long) node->ex_rnode << 16) | node->ex_lnode; + result.e_v.e_con = ((long) node->ex_rnode << 16) | ((long)node->ex_lnode&0xffff); return(result); case EX_REG: result.e_typ = EV_REG;