[m-rev.] diff: tag on cell to be reused is unknown
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Mar 16 06:08:58 AEDT 2001
On 13-Mar-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> compiler/builtin_ops.m:
> Add the unary builtin operator strip_tag.
>
> compiler/bytecode.m:
> compiler/c_util.m:
> compiler/java_util.m:
> compiler/llds.m:
> compiler/mlds_to_il.m:
> compiler/opt_debug.m:
> bytecode/mb_disasm.c:
> bytecode/mb_exec.c:
> Handle the strip_tag operator.
You missed one -- mlds_to_gcc.m.
I'm currently testing the fix below; if it works, I'll commit it.
----------
Estimated hours taken: 0.25
Branches: main
compiler/mlds_to_gcc.m:
Add code to handle the new `strip_tag' operator.
Workspace: /mnt/hg/home/hg/fjh/gcc-cvs/gcc/mercury
Index: compiler/mlds_to_gcc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_gcc.m,v
retrieving revision 1.35
diff -u -d -r1.35 mlds_to_gcc.m
--- compiler/mlds_to_gcc.m 2001/03/05 03:35:25 1.35
+++ compiler/mlds_to_gcc.m 2001/03/15 19:04:16
@@ -3206,6 +3206,13 @@
gcc__build_int(TagBits, TagBitsExpr),
gcc__build_binop(gcc__rshift_expr, 'MR_intptr_t',
Arg, TagBitsExpr, Expr).
+build_unop_expr(strip_tag, Arg, Expr) -->
+ globals__io_lookup_int_option(num_tag_bits, TagBits),
+ gcc__build_int((1 << TagBits) - 1, Mask),
+ gcc__build_binop(gcc__bit_not_expr, 'MR_intptr_t',
+ Mask, InvertedMask),
+ gcc__build_binop(gcc__bit_and_expr, 'MR_intptr_t',
+ Arg, InvertedMask, Expr).
build_unop_expr(hash_string, Arg, Expr) -->
gcc__build_func_addr_expr(gcc__hash_string_func_decl,
HashStringFuncExpr),
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list