# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../squeak/64bit-vm.diff # Copyright (C) 2007 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- ../../Cross/vm/sqMemoryAccess.h_orig 2007-05-27 10:45:08.000000000 +0200 +++ ../../Cross/vm/sqMemoryAccess.h 2007-05-27 10:46:10.000000000 +0200 @@ -82,7 +82,7 @@ static inline sqInt longAtPointerput(char *ptr, sqInt val) { return (sqInt)(*((sqInt *)ptr)= (sqInt)val); } static inline sqInt oopAtPointer(char *ptr) { return (sqInt)(*((sqInt *)ptr)); } static inline sqInt oopAtPointerput(char *ptr, sqInt val) { return (sqInt)(*((sqInt *)ptr)= (sqInt)val); } - static inline char *pointerForOop(sqInt oop) { return sqMemoryBase + oop; } + static inline char *pointerForOop(usqInt oop) { return sqMemoryBase + oop; } static inline sqInt oopForPointer(char *ptr) { return (sqInt)(ptr - sqMemoryBase); } static inline sqInt byteAt(sqInt oop) { return byteAtPointer(pointerForOop(oop)); } static inline sqInt byteAtput(sqInt oop, int val) { return byteAtPointerput(pointerForOop(oop), val); } @@ -106,8 +106,8 @@ # define longAtPointerput(ptr, val) ((sqInt)(*((sqInt *)(ptr))= (sqInt)(val))) # define oopAtPointer(ptr) (sqInt)(*((sqInt *)ptr)) # define oopAtPointerput(ptr, val) (sqInt)(*((sqInt *)ptr)= (sqInt)val) -# define pointerForOop(oop) ((char *)(sqMemoryBase + (oop))) -# define oopForPointer(ptr) ((sqInt)(ptr)) +# define pointerForOop(oop) ((char *)(sqMemoryBase + ((usqInt)(oop)))) +# define oopForPointer(ptr) ((sqInt)(((char *)(ptr)) - (sqMemoryBase))) # define byteAt(oop) byteAtPointer(pointerForOop(oop)) # define byteAtput(oop, val) byteAtPointerput(pointerForOop(oop), (val)) # define shortAt(oop) shortAtPointer(pointerForOop(oop)) --- ../../unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c_orig 2007-05-29 13:35:16.000000000 +0200 +++ ../../unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c 2007-05-29 13:36:45.000000000 +0200 @@ -178,7 +178,7 @@ static sqInt netAddressToInt(unsigned char * ptrToByteArray) { sqInt sz; - sz = interpreterProxy->byteSizeOf(((sqInt)(long)(ptrToByteArray) - 4)); + sz = interpreterProxy->byteSizeOf(((usqInt)(long)((char *)ptrToByteArray - sqMemoryBase ) - 4)); if (!(sz == 4)) { return interpreterProxy->primitiveFail(); } @@ -315,7 +315,7 @@ return null; } if (!(interpreterProxy->failed())) { - sz = interpreterProxy->byteSizeOf(((sqInt)(long)(name) - 4)); + sz = interpreterProxy->byteSizeOf(((usqInt)(long)((char *)name - sqMemoryBase ) - 4)); sqResolverStartNameLookup(name, sz); } if (interpreterProxy->failed()) {