forked from OpenSmalltalk/opensmalltalk-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the processor simulator plugins to build on linux64ARMv8 [ci skip]
- Loading branch information
1 parent
cd21eb0
commit 40b4d2a
Showing
19 changed files
with
1,351 additions
and
713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
# Bochs x64 simulator for the BochsX64Alien plugin. | ||
# this sets up the x64 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 | ||
# $ ../../processors/IA32/bochs/makeem | ||
|
||
set echo | ||
# 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" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--enable-x86-64 \ | ||
--enable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
rm -f THIS_IS_A_* | ||
echo >THIS_IS_A_FAST_CONFIG | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/sh | ||
|
||
# Bochs x64 simulator for the BochsX64Alien plugin. | ||
# this sets up the x64 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.dbg | ||
# $ ../../processors/IA32/bochs/makeem | ||
|
||
set echo | ||
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS" | ||
CFLAGS="-pipe -O0 $CFLAGS" | ||
CFLAGS="-g3 $CFLAGS" | ||
CPPFLAGS="" | ||
CXXFLAGS="$CFLAGS" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--enable-x86-64 \ | ||
--enable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
rm -f THIS_IS_A_* | ||
echo >THIS_IS_A_DEBUG_CONFIG | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include ../../../processors/IA32/bochs/explorationx64/Makefile.64 | ||
|
||
CFLAGS+=-Wno-invalid-offsetof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
for t in *; do | ||
case $t in | ||
conf.COG*|makeclean|makeem) ;; | ||
*) rm -rf $t | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
test -f config.h || ./conf.COG | ||
exec ../../processors/IA32/bochs/makeem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
|
||
# 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 | ||
# $ ../../processors/IA32/bochs/makeem | ||
|
||
set echo | ||
# 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" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--disable-x86-64 \ | ||
--disable-pae \ | ||
--disable-large-pages \ | ||
--disable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
rm -f THIS_IS_A_* | ||
echo >THIS_IS_A_FAST_CONFIG | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
|
||
# 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 | ||
# $ ../../processors/IA32/bochs/makeem | ||
|
||
set echo | ||
# 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" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--disable-x86-64 \ | ||
--disable-pae \ | ||
--disable-large-pages \ | ||
--disable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
rm -f THIS_IS_A_* | ||
echo >THIS_IS_A_DEBUG_CONFIG | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../../../processors/IA32/bochs/exploration/Makefile.64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
for t in *; do | ||
case $t in | ||
conf.COG*|makeclean|makeem) ;; | ||
*) rm -rf $t | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
test -f config.h || ./conf.COG | ||
exec ../../processors/IA32/bochs/makeem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
rm -rf bfd gdb libiberty opcodes sim | ||
rm exploration/print*64 | ||
rm -i exploration/*.st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
S=../../../processors/ARM/gdb-8.3.1 | ||
export CFLAGS="-g -Os -m64 -DCOG=1 -DWORDS_BIGENDIAN=0" | ||
export CFLAGS="-g3 -O0 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0" | ||
CONFFLAGS='--target=arm-apple-darwin CC=clang CXX=clang++ --with-system-zlib=yes' | ||
mkdir -p bfd libiberty opcodes sim/common sim/arm | ||
for d in bfd libiberty opcodes; do | ||
(cd $d; $S/$d/configure COG=1 CFLAGS="$CFLAGS" $CONFFLAGS) | ||
done | ||
for d in sim/common sim/arm; do | ||
(cd $d; | ||
../$S/$d/configure COG=1 CFLAGS="$CFLAGS" $CONFFLAGS) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -e | ||
test -d bfd || ./conf.COG | ||
for d in bfd libiberty opcodes; do | ||
(cd ./$d; make SUBDIRS="" COG=1) | ||
done | ||
(cd ./sim/arm; make version.c; test -f version.c-tmp && mv version.c-tmp version.c; make COG=1 libsim.a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
rm -rf bfd gdb libiberty opcodes sim | ||
rm exploration/print*64 | ||
rm -i exploration/*.st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
S=../../../processors/ARM/gdb-8.3.1 | ||
export CFLAGS="-g -O2 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0" | ||
#export CFLAGS="-g3 -O0 -m64 -DCOG=1 -DWORDS_BIGENDIAN=0" | ||
CONFFLAGS='--target=aarch64-apple-darwin CC=clang CXX=clang++ --with-system-zlib=yes' | ||
mkdir -p bfd gdb libiberty opcodes sim/common sim/aarch64 | ||
for d in bfd gdb libiberty opcodes; do | ||
(cd $d; $S/$d/configure COG=1 CFLAGS="$CFLAGS" $CONFFLAGS) | ||
done | ||
for d in sim/common sim/aarch64; do | ||
(cd $d; | ||
../$S/$d/configure COG=1 CFLAGS="$CFLAGS" $CONFFLAGS \ | ||
--disable-sim-trace) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -e | ||
test -d bfd || ./conf.COG | ||
(cd ./bfd; make COG=1 bfdver.h targmatch.h libbfd.a) | ||
(cd ./libiberty; make COG=1 libiberty.a) | ||
(cd ./opcodes; make COG=1 libopcodes.a) | ||
(cd ./sim/aarch64; make version.c; test -f version.c-tmp && mv version.c-tmp version.c; make COG=1 libsim.a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*/ | ||
|
||
#include <sys/types.h> | ||
#include <stdint.h> | ||
|
||
#define NoError 0 | ||
#define ExecutionError 1 | ||
|
Oops, something went wrong.