cache abstra machine register in threaded mode.

This commit is contained in:
Vítor Santos Costa
2011-03-07 16:02:55 +00:00
parent 9c3041f1e3
commit 90d93fdbdd
93 changed files with 3686 additions and 3024 deletions

View File

@@ -23,18 +23,21 @@ typedef unsigned long bitmap;
static inline choiceptr
offset_to_cptr(Int node)
{
CACHE_REGS
return (choiceptr)(LCL0+node);
}
static inline Int
cptr_to_offset(choiceptr node)
{
CACHE_REGS
return (Int)((CELL *)node-LCL0);
}
static inline choiceptr
offset_to_cptr_with_null(Int node)
{
CACHE_REGS
if (node == 0L) return NULL;
return (choiceptr)(LCL0+node);
}
@@ -42,6 +45,7 @@ offset_to_cptr_with_null(Int node)
static inline Int
cptr_to_offset_with_null(choiceptr node)
{
CACHE_REGS
if (node == NULL) return 0L;
return (Int)((CELL *)node-LCL0);
}