vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit f4345db91461707012297438a20f38172a3df319
parent 9a5cac608776a5424ad0f8487e7de1223085ef1a
Author: rminnich@gmail.com <none@none>
Date:   Mon, 24 Jan 2011 08:59:49 -0800

everything is 64bit

Diffstat:
src/9vx/gccmagic/cmpswap.c | 9++++++++-
src/Makefrag | 6+++---
2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/9vx/gccmagic/cmpswap.c b/src/9vx/gccmagic/cmpswap.c @@ -1,5 +1,12 @@ int oscmpswap(long* addr, long oldval, long newval) { - return __sync_bool_compare_and_swap(addr, oldval, newval); + bool res; + print("oscmpswap: addr %p, *addr %ld, oldval %ld, newval %ld\n", + addr, *addr, oldval, newval); + res = __sync_bool_compare_and_swap(addr, oldval, newval); + print("oscmpswap: result %d\n", res); + if (res) + return 1; + return 0; } diff --git a/src/Makefrag b/src/Makefrag @@ -1,7 +1,7 @@ # Main top-level makefile fragment for the vx32 virtual machine. # Compiler flags common to both host and VX32 environment files. -COMMON_CFLAGS = -g -O2 -MD -std=gnu99 -I. -fno-stack-protector $(CFLAGS) +COMMON_CFLAGS = -m32 -g -O2 -MD -std=gnu99 -I. -fno-stack-protector $(CFLAGS) -DARCH=i386 COMMON_LDFLAGS = -g -L. $(LDFLAGS) ifeq ($(OS),darwin) @@ -10,9 +10,9 @@ ifeq ($(OS),darwin) endif # Host environment compiler options -HOST_CC := $(CC) -fno-inline +HOST_CC := $(CC) -fno-inline -arch i386 -m32 -DARCH=i386 ifeq ($(OS),darwin) - HOST_CC := $(HOST_CC) -D_XOPEN_SOURCE -arch i386 -m32 -DARCH=i386 + HOST_CC := $(HOST_CC) -D_XOPEN_SOURCE endif HOST_LD := $(LD) -arch i386 HOST_AR := $(AR)