~ubuntu-branches/ubuntu/trusty/mit-scheme/trusty-proposed

« back to all changes in this revision

Viewing changes to src/microcode/cmpint.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-05-09 10:57:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070509105757-p8focimovgqxaaed
Tags: 7.7.90+20070205-1ubuntu1
* Merge from debian unstable, remaining changes:
  * Bootstrapping done via supplied binary package. See log entry for
    7.7.90+20060906-3ubuntu1 for details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*-C-*-
2
2
 
3
 
$Id: cmpint.c,v 1.104 2006/01/29 06:37:30 cph Exp $
 
3
$Id: cmpint.c,v 1.108 2007/02/04 21:55:45 riastradh Exp $
4
4
 
5
 
Copyright 1989,1990,1991,1992,1993,1994 Massachusetts Institute of Technology
6
 
Copyright 1995,1996,2000,2001,2002,2003 Massachusetts Institute of Technology
7
 
Copyright 2004,2006 Massachusetts Institute of Technology
 
5
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
 
6
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 
7
    2006, 2007 Massachusetts Institute of Technology
8
8
 
9
9
This file is part of MIT/GNU Scheme.
10
10
 
20
20
 
21
21
You should have received a copy of the GNU General Public License
22
22
along with MIT/GNU Scheme; if not, write to the Free Software
23
 
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
24
24
USA.
25
25
 
26
26
*/
240
240
 
241
241
#define ENTER_SCHEME(ep) return (C_to_interface ((PTR) (ep)))
242
242
 
243
 
#else /* CMPINT_USE_STRUCS */
 
243
#else /* not CMPINT_USE_STRUCS */
244
244
 
245
245
typedef instruction * utility_result;
246
246
 
256
256
 
257
257
#define RETURN_TO_C(code) do                                            \
258
258
{                                                                       \
259
 
  (*DSU_result) = interface_to_C_hook;                                  \
 
259
  (*DSU_result) = ((instruction *) interface_to_C_hook);                \
260
260
  C_return_value = (code);                                              \
261
261
  return;                                                               \
262
262
} while (0)
263
263
 
264
264
#define RETURN_TO_SCHEME(ep) do                                         \
265
265
{                                                                       \
266
 
  (*DSU_result) = (ep);                                                 \
 
266
  (*DSU_result) = ((instruction *) (ep));                               \
267
267
  return;                                                               \
268
268
} while (0)
269
269
 
839
839
  RETURN_TO_C (PRIM_DONE);
840
840
}
841
841
 
 
842
static void EXFUN
 
843
  (compiler_interrupt_common, (utility_result *, SCHEME_ADDR, SCHEME_OBJECT));
 
844
 
 
845
#define COMPILER_INTERRUPT_COMMON(a1, a2) do                            \
 
846
{                                                                       \
 
847
  compiler_interrupt_common (DSU_result, (a1), (a2));                   \
 
848
  return;                                                               \
 
849
} while (0)
 
850
 
842
851
#if (COMPILER_PROCESSOR_TYPE != COMPILER_IA32_TYPE)
843
852
 
844
853
#define INVOKE_RETURN_ADDRESS()                                 \
846
855
 
847
856
#else /* COMPILER_IA32_TYPE */
848
857
 
849
 
static void EXFUN
850
 
  (compiler_interrupt_common, (utility_result *, SCHEME_ADDR, SCHEME_OBJECT));
851
 
 
852
 
#define COMPILER_INTERRUPT_COMMON(a1, a2) do                            \
853
 
{                                                                       \
854
 
  compiler_interrupt_common (DSU_result, (a1), (a2));                   \
855
 
  return;                                                               \
856
 
} while (0)
857
 
 
858
858
#define INVOKE_RETURN_ADDRESS() do                                      \
859
859
{                                                                       \
860
860
  if (((long) (ADDR_TO_SCHEME_ADDR (Free)))                             \
1817
1817
C_TO_SCHEME long                                                        \
1818
1818
DEFUN_VOID (restart)                                                    \
1819
1819
{                                                                       \
1820
 
  SCHEME_OBJECT name = exp_register;                                    \
 
1820
  SCHEME_OBJECT name = (STACK_POP ());                                  \
1821
1821
  SCHEME_OBJECT environment = (STACK_POP ());                           \
1822
1822
  long code = (c_lookup (environment, name, (&val_register)));          \
1823
1823
  if (code == PRIM_DONE)                                                \