spitbol / x64

SPITBOL x64 provides raw power and speed for non-numeric computation on the x86_64 architecture
GNU General Public License v3.0
256 stars 23 forks source link

ElCapitan #3

Closed apanos closed 1 year ago

apanos commented 8 years ago

I cannot get SPITBOL to compile on MacOSX using the elCapitan latest version 10.11.3

Efroymson commented 7 years ago

I got it building on Sierra with a couple of tweaks.

I had three errors. I solved errors 1 and 3 by making a couple changes in osx.asm. The new one is at the bottom of this message. For error 2 I had to tweak sbl.osx in line 179. 178 and 179 become:

of the internal name. thus, the function name 'osopen' becomes

_osopen. however, not all c compilers follow this convention.

Note that the problem was with the single quote marks that were

around _osopen. For some reason the assembler was reading them and thinking there was a huge quoted line, or something.

* osx.asm file below this line **

unix and osx use differnt conventions for defining a macro. This one is for os x.

.macro  syscall 
    popq    %rax            # save minimal return address
    movq    %rax,reg_pc(%rip)   
    call    syscall_init        # save registers
    movq    %rsp,compsp(%rip)   # save minimal stack
    movq    osisp(%rip),%rsp    # switch to osint stack
call    $0          # call target procedure
    call    syscall_exit        # save result, restore registers, switch back to minimal stack, and return
.endm

.macro  syscallf    
    popq    %rax            # save minimal return address
    movq    %rax,reg_pc(%rip)   
    call    syscallf_init       # save registers
    movq    %rsp,compsp(%rip)   # save minimal stack
    movq    osisp(%rip),%rsp    # switch to osint stack
pushfq              # save flag register    
movq    (%rsp),%rax
movq    %rax,trc_fl(%rip)
popq    %rax
call    $0
movq    trc_fl(%rip),%rax   # restore flag register
pushq   %rax
popfq               
    call    syscallf_exit       # save result, restore registers, switch back to minimal stack, and return
.endm
daveshields commented 7 years ago

Hi,

I am back in SPITBOL 'maintainer' mode. Let me know how I can help you close this problem.

Efroymson commented 7 years ago

blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I think I gave the info in a comment somewhere... if you can't find it, I can look it up again ...

Sent from my iPhone

On Monday, January 30, 2017, 19:27, dave shields notifications@github.com wrote:

Hi,

I am back in SPITBOL 'maintainer' mode. Let me know how I can help you close this problem.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Efroymson commented 7 years ago

Much easier to see now that I have this open in GitHub! As you can see, there was a problem with the quotes around _osopen in the spl.osx file.

The other problems were with osx.asm, and I attached a working version. I think the problem was with the call $0 lines, in unix.asm there is a different convention.

CheyenneWills commented 1 year ago

I'm not sure what the status of the original problem is.

I'm closing the issue.