Changes between Version 25 and Version 26 of PortToIA-32


Ignore:
Timestamp:
Mar 24, 2008, 7:05:33 PM (11 years ago)
Author:
rme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PortToIA-32

    v25 v26  
    4848{{{
    4949eax      imm0
    50 ecx      nargs, temp0
    51 edx      imm1
    52 ebx      fn
     50ecx      temp0
     51edx      temp1, nargs
     52ebx      arg_z
    5353esp      stack pointer
    5454ebp      frame pointer
    55 esi      arg_z
    56 edi      arg_y
     55esi      arg_y
     56edi      fn
    5757}}}
    5858
     
    8989I think that having imm0=nargs would work fairly well, since we're usually either validating/defaulting based on nargs or doing tag/bounds checking, but rarely if ever need to do both at the same time.
    9090
     91==== Comment by rme ====
     92It turns out that there's a bit of a wrinkle in using imm0 as nargs, and that wrinkle is funcall.
     93Funcall needs to use an imm reg for tag checking, and if our only imm reg contains nargs,
     94well, that's going to be a problem.  We'll use temp1 for nargs instead.
     95
     96Another possibility might be a minor design change:  make CALL-ARGUMENTS-LIMIT smaller,
     97and use %ah for nargs, which would leave %al free for tag checking.
     98
     99free for tag checking.  This
    91100== Threads ==
    92101We don't have the {{{__thread}}} storage class on Darwin, so we will
     
    245254Evaluating
    246255{{{
    247 (cross-xload-level-0 :darwinx8632 t)
     256(cross-xload-level-0 :darwinx8632 :force)
    248257}}}
    249258will create a boot image in x86-boot32.image.
     259
     260To cross-compile the rest of the lisp, evaluate:
     261{{{
     262(cross-compile-ccl :darwinx8632 t)
     263}}}
     264
     265Note that several files will not compile yet;  just pick the "skip this file"
     266restart and carry on for now.
    250267
    251268To build an IA-32 lisp kernel:
     
    255272}}}
    256273
     274
    257275The current state of the port is that it will map in the boot image and
    258 run %toplevel-function% before dying in the %fasload form (because syscalls don't work yet).
     276start fasloading files.  It'll die at l1-utils.dx32fsl.
    259277
    260278To run the IA-32 lisp (from the lisp-kernel/darwinx8632 directory):
     
    269287This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .. done
    270288
    271 Breakpoint 1 at 0xac79: file ../lisp-debug.c, line 892.
    272 (gdb) b start_lisp
    273 Breakpoint 2 at 0x5c61: file {standard input}, line 61.
    274 (gdb) run ../../x86-boot32.image
    275 Starting program: /Users/rme/openmcl/ccl/dx86cl ../../x86-boot32.image
     289(gdb) run ../../x86-boot32.image
     290Starting program: /Users/rme/ccl/dx86cl x86-boot32.image
    276291Reading symbols for shared libraries +. done
    277 
    278 Breakpoint 2, start_lisp () at {standard input}:66
    279 66      {standard input}: No such file or directory.
    280         in {standard input}
    281 1: x/i $pc  0x5c61 <start_lisp+6>:      mov    0x8(%ebp),%ebx
    282 (gdb)
     292obtaining Mach exception lock in exception thread
     293Setting up exception handling for 0x100450
     294Set up exception context for 0x100450 at 0x342f80
     295obtaining Mach exception lock in exception thread
     296doing pseudo_sigreturn for 0x100450
     297did pseudo_sigreturn for 0x100450
     298;Loading level-1.dx32fsl
     299;Loading ./l1-fasls/l1-cl-package.dx32fsl
     300obtaining Mach exception lock in exception thread
     301Setting up exception handling for 0x100450
     302Set up exception context for 0x100450 at 0x342e60
     303obtaining Mach exception lock in exception thread
     304doing pseudo_sigreturn for 0x100450
     305did pseudo_sigreturn for 0x100450
     306;Loading ./l1-fasls/l1-utils.dx32fsl
     307
     308[and it chokes...]
    283309}}}
    284310