Index: /branches/working-0711/ccl/lisp-kernel/x86-constants32.h
===================================================================
--- /branches/working-0711/ccl/lisp-kernel/x86-constants32.h	(revision 12987)
+++ /branches/working-0711/ccl/lisp-kernel/x86-constants32.h	(revision 12988)
@@ -74,4 +74,5 @@
 #define Inargs Itemp1
 #define Ixfn Itemp1
+#define Ifp Iebp
 
 /* MMX register offsets from where mm0 is found in uc_mcontext.fs */
@@ -424,5 +425,5 @@
   LispObj save2;
   LispObj save3;
-  LispObj *save_ebp;		/* EBP when in foreign code */
+  LispObj *save_fp;		/* EBP when in foreign code */
   u32_t lisp_mxcsr;
   u32_t foreign_mxcsr;
Index: /branches/working-0711/ccl/lisp-kernel/x86-constants64.h
===================================================================
--- /branches/working-0711/ccl/lisp-kernel/x86-constants64.h	(revision 12987)
+++ /branches/working-0711/ccl/lisp-kernel/x86-constants64.h	(revision 12988)
@@ -109,4 +109,5 @@
 #define Inargs Iimm2
 #define Ixfn Itemp1
+#define Ifp Irbp
 
 
@@ -484,5 +485,5 @@
   } single_float_convert;
   struct tcr* linear;
-  LispObj *save_rbp;            /* RBP when in foreign code */
+  LispObj *save_fp;            /* RBP when in foreign code */
   u32_t lisp_mxcsr;
   u32_t foreign_mxcsr;
Index: /branches/working-0711/ccl/lisp-kernel/x86-exceptions.c
===================================================================
--- /branches/working-0711/ccl/lisp-kernel/x86-exceptions.c	(revision 12987)
+++ /branches/working-0711/ccl/lisp-kernel/x86-exceptions.c	(revision 12988)
@@ -480,11 +480,6 @@
   push_on_lisp_stack(xp,nominal_function);
   push_on_lisp_stack(xp,0);
-#ifdef X8664
-  push_on_lisp_stack(xp,xpGPR(xp,Irbp));
-  xpGPR(xp,Irbp) = xpGPR(xp,Isp);
-#else
-  push_on_lisp_stack(xp,xpGPR(xp,Iebp));
-  xpGPR(xp,Iebp) = xpGPR(xp,Isp);
-#endif
+  push_on_lisp_stack(xp,xpGPR(xp,Ifp));
+  xpGPR(xp,Ifp) = xpGPR(xp,Isp);
   return xpGPR(xp,Isp);
 }
@@ -597,8 +592,5 @@
 
   /* Put the active stack pointers where .SPcallback expects them */
-#ifdef X8664
-  tcr->save_vsp = (LispObj *) xpGPR(xp, Isp);
-  tcr->save_rbp = (LispObj *) xpGPR(xp, Irbp);
-#else
+#ifdef X8632
   tcr->node_regs_mask = X8632_DEFAULT_NODE_REGS_MASK;
 
@@ -609,8 +601,7 @@
   *--vsp = tcr->next_method_context;
   xpGPR(xp, Isp) = (LispObj)vsp;
-
+#endif
   tcr->save_vsp = (LispObj *)xpGPR(xp, Isp);
-  tcr->save_ebp = (LispObj *)xpGPR(xp, Iebp);
-#endif
+  tcr->save_fp = (LispObj *)xpGPR(xp, Ifp);
 
   /* Call back.  The caller of this function may have modified stack/frame
@@ -643,18 +634,10 @@
   LispObj *save_vsp = (LispObj *)xpGPR(xp,Isp),
     word_beyond_vsp = save_vsp[-1],
-#ifdef X8664
-    save_rbp = xpGPR(xp,Irbp),
-#else
-    save_ebp = xpGPR(xp,Iebp),
-#endif
+    save_fp = xpGPR(xp,Ifp),
     xcf = create_exception_callback_frame(xp, tcr);
   int save_errno = errno;
 
   callback_to_lisp(tcr, nrs_CMAIN.vcell,xp, xcf, 0, 0, 0, 0);
-#ifdef X8664
-  xpGPR(xp,Irbp) = save_rbp;
-#else
-  xpGPR(xp,Iebp) = save_ebp;
-#endif
+  xpGPR(xp,Ifp) = save_fp;
   xpGPR(xp,Isp) = (LispObj)save_vsp;
   save_vsp[-1] = word_beyond_vsp;
@@ -668,10 +651,6 @@
   unsigned char op0 = program_counter[0], op1 = program_counter[1];
   LispObj rpc, errdisp = nrs_ERRDISP.vcell,
-    save_vsp = xpGPR(xp,Isp), xcf0;
-#ifdef X8664
-  LispObj save_rbp = xpGPR(xp,Irbp);
-#else
-  LispObj save_ebp = xpGPR(xp,Iebp);
-#endif
+    save_vsp = xpGPR(xp,Isp), xcf0,
+    save_fp = xpGPR(xp,Ifp);
   int skip;
 
@@ -703,9 +682,5 @@
       skip = 0;
     }
-#ifdef X8664
-    xpGPR(xp,Irbp) = save_rbp;
-#else
-    xpGPR(xp,Iebp) = save_ebp;
-#endif
+    xpGPR(xp,Ifp) = save_fp;
     xpGPR(xp,Isp) = save_vsp;
     if ((op0 == 0xcd) && (op1 == 0xc7)) {
@@ -721,9 +696,5 @@
       */
       LispObj *vsp =(LispObj *)save_vsp, ra = *vsp;
-#ifdef X8664
-      int nargs = (xpGPR(xp, Inargs) & 0xffff)>>fixnumshift;
-#else
       int nargs = xpGPR(xp, Inargs)>>fixnumshift;
-#endif
 
 #ifdef X8664
@@ -793,9 +764,5 @@
   lisp_protection_kind which = prot_area->why;
   Boolean on_TSP = (which == kTSPsoftguard);
-#ifdef X8664
-  LispObj save_rbp = xpGPR(xp,Irbp);
-#else
-  LispObj save_ebp = xpGPR(xp,Iebp);
-#endif
+  LispObj save_fp = xpGPR(xp,Ifp);
   LispObj save_vsp = xpGPR(xp,Isp), 
     xcf,
@@ -816,10 +783,6 @@
     unprotect_area(soft);
     xcf = create_exception_callback_frame(xp, tcr);
-    skip = callback_to_lisp(tcr, nrs_CMAIN.vcell, xp, xcf, SIGSEGV, on_TSP, 0, 0);
-#ifdef X8664
-    xpGPR(xp,Irbp) = save_rbp;
-#else
-    xpGPR(xp,Iebp) = save_ebp;
-#endif
+    skip = callback_to_lisp(tcr, cmain, xp, xcf, SIGSEGV, on_TSP, 0, 0);
+    xpGPR(xp,Ifp) = save_fp;
     xpGPR(xp,Isp) = save_vsp;
     xpPC(xp) += skip;
@@ -833,9 +796,5 @@
 {
 #ifdef DARWIN
-#ifdef X8664
   return (UC_MCONTEXT(xp)->__es.__err & 0x2) != 0;
-#else
-  return (xp->uc_mcontext->__es.__err & 0x2) != 0;
-#endif
 #endif
 #if defined(LINUX) || defined(SOLARIS)
@@ -907,10 +866,6 @@
   int code,skip;
   LispObj  xcf, cmain = nrs_CMAIN.vcell,
-    save_vsp = xpGPR(xp,Isp);
-#ifdef X8664
-  LispObj save_rbp = xpGPR(xp,Irbp);
-#else
-  LispObj save_ebp = xpGPR(xp,Iebp);
-#endif
+    save_vsp = xpGPR(xp,Isp),
+    save_fp = xpGPR(xp,Ifp);
 #ifdef WINDOWS
   code = info->ExceptionCode;
@@ -924,9 +879,5 @@
     skip = callback_to_lisp(tcr, cmain, xp, xcf, SIGFPE, code, 0, 0);
     xpPC(xp) += skip;
-#ifdef X8664
-    xpGPR(xp,Irbp) = save_rbp;
-#else
-    xpGPR(xp,Iebp) = save_ebp;
-#endif
+    xpGPR(xp,Ifp) = save_fp;
     xpGPR(xp,Isp) = save_vsp;
     return true;
@@ -1441,5 +1392,5 @@
 {
   ExceptionInformation *xp;
-  LispObj *bp;
+  LispObj *fp;
 
   if (tcr->pending_exception_context)
@@ -1451,17 +1402,9 @@
   }
   if (xp) {
-#ifdef X8664
-    bp = (LispObj *) xpGPR(xp, Irbp);
-#else
-    bp = (LispObj *) xpGPR(xp, Iebp);
-#endif
+    fp = (LispObj *)xpGPR(xp, Ifp);
   } else {
-#ifdef X8664
-    bp = tcr->save_rbp;
-#else
-    bp = tcr->save_ebp;
-#endif
-  }
-  return bp;
+    fp = tcr->save_fp;
+  }
+  return fp;
 }
 
@@ -1662,9 +1605,5 @@
         (tcr->unwinding != 0) ||
         ! stack_pointer_on_vstack_p(xpGPR(context,Isp), tcr) ||
-#ifdef X8664
-        ! stack_pointer_on_vstack_p(xpGPR(context,Irbp), tcr)) {
-#else
-        ! stack_pointer_on_vstack_p(xpGPR(context,Iebp), tcr)) {
-#endif
+        ! stack_pointer_on_vstack_p(xpGPR(context,Ifp), tcr)) {
       tcr->interrupt_pending = (((natural) 1)<< (nbits_in_word - ((natural)1)));
     } else {
Index: /branches/working-0711/ccl/lisp-kernel/xlbt.c
===================================================================
--- /branches/working-0711/ccl/lisp-kernel/xlbt.c	(revision 12987)
+++ /branches/working-0711/ccl/lisp-kernel/xlbt.c	(revision 12988)
@@ -138,30 +138,24 @@
 
 void
-plbt_sp(LispObj currentRBP)
+plbt_sp(LispObj current_fp)
 {
   area *vs_area, *cs_area;
-  
-{
-    TCR *tcr = (TCR *)get_tcr(true);
-    char *ilevel = interrupt_level_description(tcr);
-    vs_area = tcr->vs_area;
-    cs_area = tcr->cs_area;
-    if ((((LispObj) ptr_to_lispobj(vs_area->low)) > currentRBP) ||
-        (((LispObj) ptr_to_lispobj(vs_area->high)) < currentRBP)) {
-#ifdef X8664
-      currentRBP = (LispObj) (tcr->save_rbp);
-#else
-      currentRBP = (LispObj) (tcr->save_ebp);
-#endif
-    }
-    if ((((LispObj) ptr_to_lispobj(vs_area->low)) > currentRBP) ||
-        (((LispObj) ptr_to_lispobj(vs_area->high)) < currentRBP)) {
-      Dprintf("\nFramepointer [#x%lX] in unknown area.", currentRBP);
-    } else {
-      fprintf(dbgout, "current thread: tcr = 0x%lx, native thread ID = 0x%lx, interrupts %s\n", tcr, tcr->native_thread_id, ilevel);
-      walk_stack_frames((lisp_frame *) ptr_from_lispobj(currentRBP), (lisp_frame *) (vs_area->high));
-      /*      walk_other_areas();*/
-    }
-  } 
+  TCR *tcr = (TCR *)get_tcr(true);
+  char *ilevel = interrupt_level_description(tcr);
+
+  vs_area = tcr->vs_area;
+  cs_area = tcr->cs_area;
+  if ((((LispObj) ptr_to_lispobj(vs_area->low)) > current_fp) ||
+      (((LispObj) ptr_to_lispobj(vs_area->high)) < current_fp)) {
+    current_fp = (LispObj) (tcr->save_fp);
+  }
+  if ((((LispObj) ptr_to_lispobj(vs_area->low)) > current_fp) ||
+      (((LispObj) ptr_to_lispobj(vs_area->high)) < current_fp)) {
+    Dprintf("\nFrame pointer [#x" LISP "] in unknown area.", current_fp);
+  } else {
+    fprintf(dbgout, "current thread: tcr = 0x" LISP ", native thread ID = 0x" LISP ", interrupts %s\n", tcr, tcr->native_thread_id, ilevel);
+    walk_stack_frames((lisp_frame *) ptr_from_lispobj(current_fp), (lisp_frame *) (vs_area->high));
+    /*      walk_other_areas();*/
+  }
 }
 
