Ignore:
Timestamp:
Sep 20, 2011, 2:19:03 AM (9 years ago)
Author:
rme
Message:

New functions in x86-utils.[ch], moved, more-or-less,
from xlbt.c.

Use them in x86-exceptions.c, in particular in
create_exception_callback_frame().

Move the definitions of the RECOVER_FN_xxx constants
from x86-exceptions.h to the appropriate x86-constants{32,64}.h
files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-utils.h

    r14990 r14991  
     1/*
     2   Copyright (C) 2011 Clozure Associates
     3   This file is part of Clozure CL. 
     4
     5   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
     6   License , known as the LLGPL and distributed with Clozure CL as the
     7   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
     8   which is distributed with Clozure CL as the file "LGPL".  Where these
     9   conflict, the preamble takes precedence. 
     10
     11   Clozure CL is referenced in the preamble as the "LIBRARY."
     12
     13   The LLGPL is also available online at
     14   http://opensource.franz.com/preamble.html
     15*/
     16
     17#ifndef X86_UTILS_H
     18#define X86_UTILS_H
     19
     20extern LispObj tra_function(LispObj tra);
     21extern int tra_offset(LispObj tra);
     22
     23static inline LispObj
     24function_to_function_vector(LispObj f)
     25{
     26#ifdef X8664
     27  return f - fulltag_function + fulltag_misc;
     28#else
     29  return f;
     30#endif
     31}
     32
     33static inline int
     34tra_p(LispObj thing)
     35{
     36#ifdef X8664
     37  return tag_of(thing) == tag_tra;
     38#else
     39  return fulltag_of(thing) == fulltag_tra;
     40#endif
     41}
     42
     43static inline int
     44functionp(LispObj f)
     45{
     46#ifdef X8664
     47  return fulltag_of(f) == fulltag_function;
     48#else
     49  return fulltag_of(f) == fulltag_misc &&
     50    header_subtag(header_of(f)) == subtag_function;
     51#endif
     52}
     53
     54#endif
Note: See TracChangeset for help on using the changeset viewer.