Ignore:
Timestamp:
Feb 15, 2013, 7:24:29 AM (7 years ago)
Author:
gb
Message:

Propagate recent trunk changes.

Location:
release/1.9/source/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/1.9/source/lisp-kernel

  • release/1.9/source/lisp-kernel/x86-exceptions.c

    r15572 r15706  
    15061506#endif
    15071507
     1508
     1509#ifdef FREEBSD
     1510typedef void *FPREGS;
     1511
     1512
     1513LispObj *
     1514copy_avx(ExceptionInformation *xp, LispObj *current, FPREGS *destptr)
     1515{
     1516  natural sp;
     1517
     1518  *destptr = (FPREGS)AVX_CONTEXT_PTR(xp);
     1519
     1520  if (AVX_CONTEXT_PRESENT(xp)) {
     1521    sp = (natural)current;
     1522    sp -= AVX_CONTEXT_SIZE(xp);
     1523    sp = truncate_to_power_of_2(sp,6);
     1524    memcpy((void *)sp,(void *)AVX_CONTEXT_PTR(xp),AVX_CONTEXT_SIZE(xp));
     1525    current = (LispObj *)sp;
     1526    *destptr = (FPREGS)current;
     1527  }
     1528  return current;
     1529}
     1530#endif
     1531
    15081532#ifdef DARWIN
    15091533LispObj *
     
    15521576#ifdef LINUX
    15531577  dest->uc_mcontext.fpregs = (fpregset_t)fp;
     1578#endif
     1579#ifdef FREEBSD
     1580  if (AVX_CONTEXT_PRESENT(context)) {
     1581    AVX_CONTEXT_PTR(context) = (natural)fp;
     1582  }
    15541583#endif
    15551584  dest->uc_stack.ss_sp = 0;
     
    16641693#ifdef LINUX
    16651694  foreign_rsp = copy_fpregs(context, foreign_rsp, &fpregs);
     1695#endif
     1696#ifdef FREEBSD
     1697  foreign_rsp = copy_avx(context, foreign_rsp, &fpregs);
    16661698#endif
    16671699#ifdef DARWIN
     
    23452377  stack.ss_size = SIGSTKSZ*8;
    23462378  stack.ss_flags = 0;
    2347 #ifdef SEPARATE_ALTSTACK
    23482379  stack.ss_sp = mmap(NULL,stack.ss_size, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_ANON|MAP_PRIVATE,-1,0);
    2349 #else
    2350   stack.ss_sp = a->low;
    2351   a->low += SIGSTKSZ*8;
    2352   mmap(stack.ss_sp,stack.ss_size, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_FIXED|MAP_ANON|MAP_PRIVATE,-1,0);
    2353 #endif
    23542380#ifdef LINUX
    23552381  /* The ucontext pushed on the altstack may not contain the (largish)
Note: See TracChangeset for help on using the changeset viewer.