Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3163
Browse files Browse the repository at this point in the history
Spur CoInterpreter: use primitiveMetadataTable in CoInterpreter and
primitiveAccessorDepthTable in StackInterpreter.  There's no need to waste the
space in the StackInterpreter and its easier to read the depths from the depth
table in interp.c than decode the depth+metadata table in cointerp.c.

Slang: ...and fix the regression in cogit.h's contents.

MacOS ARMv8 builds, get the Bochs simulator support libs to build.  The ARM
gdb ones nearly do, but something (a subconfigure?) still fails.
  • Loading branch information
eliotmiranda committed Feb 20, 2022
1 parent f464b49 commit 136c2f9
Show file tree
Hide file tree
Showing 52 changed files with 679 additions and 4,227 deletions.
6 changes: 3 additions & 3 deletions building/macos64ARMv8/bochsx64/conf.COG
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Bochs x64 simulator for the BochsX64Alien plugin.
# this sets up the x64 compile for Cog on Mac OS X. Disable as much inessential
Expand All @@ -9,14 +9,14 @@
# $ ../../../processors/IA32/bochs/makeem

set echo
CFLAGS="--target=aarch64 -mcpu=apple-a12 $CFLAGS"
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS"
CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions $CFLAGS"
CFLAGS="-g $CFLAGS"
CPPFLAGS=""
CXXFLAGS="$CFLAGS"
CC=clang

export CC
export CFLAGS
export CPATH
export CPPFLAGS
Expand Down
5 changes: 3 additions & 2 deletions building/macos64ARMv8/bochsx64/conf.COG.dbg
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Bochs x64 simulator for the BochsX64Alien plugin.
# this sets up the x64 compile for Cog on Mac OS X. Disable as much inessential
Expand All @@ -9,13 +9,14 @@
# $ ../../../processors/IA32/bochs/makeem

set echo
CFLAGS="--target=aarch64 -mcpu=apple-a12 $CFLAGS"
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS"
CFLAGS="-pipe -O0 $CFLAGS"
CFLAGS="-g3 $CFLAGS"
CPPFLAGS=""
CXXFLAGS="$CFLAGS"
CC=clang

export CC
export CFLAGS
export CPATH
export CPPFLAGS
Expand Down
6 changes: 3 additions & 3 deletions building/macos64ARMv8/bochsx86/conf.COG
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Bochs x86 simulator for the BochsIA32Alien plugin.
# this sets up the x86 compile for Cog on Mac OS X. Disable as much inessential
Expand All @@ -9,14 +9,14 @@
# $ ../../../processors/IA32/bochs/makeem

set echo
CFLAGS="--target=aarch64 -mcpu=apple-a12 $CFLAGS"
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS"
CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions $CFLAGS"
CFLAGS="-g $CFLAGS"
CPPFLAGS=""
CXXFLAGS="$CFLAGS"
CC=clang

export CC
export CFLAGS
export CPATH
export CPPFLAGS
Expand Down
8 changes: 4 additions & 4 deletions building/macos64ARMv8/bochsx86/conf.COG.dbg
@@ -1,22 +1,22 @@
#!/bin/sh
#!/bin/bash

# Bochs x86 simulator for the BochsIA32Alien plugin.
# this sets up the x86 compile for Cog on Mac OS X. Disable as much inessential
# stuff as possible leaving only the cpu/fpu & memory interface

# build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using
# $ ./conf.COG
# $ ./conf.COG.dbg
# $ ../../../processors/IA32/bochs/makeem

set echo
CFLAGS="--target=aarch64 -mcpu=apple-a12 $CFLAGS"
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS"
CFLAGS="-pipe -O0 $CFLAGS"
CFLAGS="-g3 $CFLAGS"
CPPFLAGS=""
CXXFLAGS="$CFLAGS"
CC=clang

export CC
export CFLAGS
export CPATH
export CPPFLAGS
Expand Down
2 changes: 1 addition & 1 deletion building/macos64ARMv8/gdbarm32/conf.COG
@@ -1,6 +1,6 @@
#!/bin/sh
S=../../../../processors/ARM/gdb-8.3.1
TARGET="--target=aarch64 -mcpu=apple-a12"
TARGET="--target=arm64"
export CFLAGS="$TARGET -g -Os -m64 -DCOG=1 -DWORDS_BIGENDIAN=0"
export CFLAGS="$TARGET -g3 -O0 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0 -I../../../../../platforms/Cross/plugins/GdbARMPlugin"
CONFFLAGS='--target=arm-apple-darwin CC=clang CXX=clang++ --with-system-zlib=yes'
Expand Down
2 changes: 1 addition & 1 deletion building/macos64ARMv8/gdbarm64/conf.COG
@@ -1,6 +1,6 @@
#!/bin/sh
S=../../../../processors/ARM/gdb-8.3.1
TARGET="--target=aarch64 -mcpu=apple-a12"
TARGET="--target=arm64"
export CFLAGS="$TARGET -g -O2 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0"
#export CFLAGS="$TARGET -g3 -O0 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0"
CONFFLAGS='--target=aarch64-apple-darwin CC=clang CXX=clang++ --with-system-zlib=yes'
Expand Down

0 comments on commit 136c2f9

Please sign in to comment.