Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 422 → Rev 423

/SPARTAN/trunk/Makefile.config
8,6 → 8,9
# If this is yes, then the native compiler will be used instead of cross compiler
NATIVE_COMPILER=no
 
# If this is yes, strong CPU ordering is assumed
STRONG_ORDERING=no
 
# Support for symetric multiprocessors
SMP=__SMP__
 
/SPARTAN/trunk/build.ia32
2,9 → 2,20
 
COMPILER=""
 
if [ "$1" == "native" ];
then
COMPILER="NATIVE_COMPILER=yes";
fi;
while [ "$#" -gt 0 ]; do
case "$1" in
native)
COMPILER="$COMPILER NATIVE_COMPILER=yes"
;;
strong)
COMPILER="$COMPILER STRONG_ORDERING=yes"
;;
*)
echo "Supported arguments: native strong"
exit 1
;;
esac
shift
done
 
make all ARCH=ia32 $COMPILER
/SPARTAN/trunk/arch/ia32/include/barrier.h
43,8 → 43,18
#define CS_ENTER_BARRIER() __asm__ volatile ("" ::: "memory")
#define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory")
 
#ifdef __STRONG_ORDERING__
 
#define memory_barrier()
#define read_barrier()
#define write_barrier()
 
#else
 
#define memory_barrier() __asm__ volatile ("mfence\n" ::: "memory")
#define read_barrier() __asm__ volatile ("sfence\n" ::: "memory")
#define write_barrier() __asm__ volatile ("lfence\n" ::: "memory")
 
#endif
 
#endif
/SPARTAN/trunk/arch/ia32/Makefile.inc
22,12 → 22,16
 
DEFS:=-DARCH=$(ARCH) -DFPU_LAZY
 
ifeq (${STRONG_ORDERING},yes)
DEFS+=-D__STRONG_ORDERING__
endif
 
ifdef SMP
DEFS+=-D$(SMP)
DEFS+=-D$(SMP)
endif
 
ifdef HT
DEFS+=-D$(HT)
DEFS+=-D$(HT)
endif
 
CPPFLAGS=$(DEFS) -nostdinc -Iinclude/