Revision: 2908 Author: eliot Date: 2014-04-29 13:37:34 -0700 (Tue, 29 Apr 2014) Log Message: ----------- CogVM source as per VMMaker.oscog-djm.688
ARM32FFIPlugin: Change dummyFloatFunction to loadFloatRegs since it is a better name. Define this function elsewhere (platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c) so that the C optimizer cannot optimize it away. This fixes a problem when calling out to functions taking float parameters when compiling with optimization level > 0.
VMMaker image: Add an expression to the workspace to generate plugins.
Modified Paths: -------------- branches/Cog/image/Workspace.text branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/image/Workspace.text =================================================================== --- branches/Cog/image/Workspace.text 2014-04-28 23:40:49 UTC (rev 2907) +++ branches/Cog/image/Workspace.text 2014-04-29 20:37:34 UTC (rev 2908) @@ -9,3 +9,11 @@ To rebuild this image run buildsqueak45image.sh.
Read the class comments of StackInterpreterSimulator and CogVMSimulator for running the simulator, and/or look at the examples in the VM Simulation Workspace. + +This is useful for generating a set of plugins to the default directory: +(VMMaker + makerFor: StackInterpreter + and: nil with: #() + to: VMMaker sourceTree, '/src' + platformDir: VMMaker sourceTree, '/platforms' + including: #(ThreadedARMFFIPlugin)) generateExternalPlugins \ No newline at end of file
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Mon Apr 28 16:37:33 PDT 2014 + Tue Apr 29 13:35:14 PDT 2014
Modified: branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c =================================================================== --- branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c 2014-04-28 23:40:49 UTC (rev 2907) +++ branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c 2014-04-29 20:37:34 UTC (rev 2908) @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.686 uuid: ac4e60d6-a8f2-4bf4-bb5d-e21f243310fa + VMPluginCodeGenerator VMMaker.oscog-djm.688 uuid: 39f5e8fc-f8f0-43cc-89f4-eb61de29c7fb from - ThreadedARMFFIPlugin VMMaker.oscog-eem.686 uuid: ac4e60d6-a8f2-4bf4-bb5d-e21f243310fa + ThreadedARMFFIPlugin VMMaker.oscog-djm.688 uuid: 39f5e8fc-f8f0-43cc-89f4-eb61de29c7fb */ -static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.686 uuid: ac4e60d6-a8f2-4bf4-bb5d-e21f243310fa " __DATE__ ; +static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-djm.688 uuid: 39f5e8fc-f8f0-43cc-89f4-eb61de29c7fb " __DATE__ ;
@@ -208,7 +208,6 @@ /*** Function Prototypes ***/ static sqInt atomicTypeOf(sqInt typeSpec); static void cleanupCalloutState(CalloutState *calloutState); -static void dummyFloatFunctionwithwithwithwithwithwithwith(double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8); static sqInt externalFunctionHasStackSizeSlot(void); static sqInt ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize); static sqInt ffiArgByValuein(sqInt oop, CalloutState *calloutState); @@ -452,9 +451,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "ARM32FFIPlugin VMMaker.oscog-eem.686 (i)" + "ARM32FFIPlugin VMMaker.oscog-djm.688 (i)" #else - "ARM32FFIPlugin VMMaker.oscog-eem.686 (e)" + "ARM32FFIPlugin VMMaker.oscog-djm.688 (e)" #endif ;
@@ -486,11 +485,6 @@ } }
-static void -dummyFloatFunctionwithwithwithwithwithwithwith(double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8) -{ -} - static sqInt externalFunctionHasStackSizeSlot(void) { @@ -1555,6 +1549,7 @@ double floatRet; sqInt i; usqLong intRet; + extern void loadFloatRegs(double, double, double, double, double, double, double, double); sqInt myThreadIndex; sqInt oop; sqInt oop1; @@ -1584,7 +1579,7 @@ setsp((calloutState->argVector)); } if (((calloutState->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec = (calloutState->ffiRetHeader); @@ -1744,6 +1739,7 @@ sqInt i; sqInt i1; usqLong intRet; + extern void loadFloatRegs(double, double, double, double, double, double, double, double); sqInt myThreadIndex; sqInt oop; sqInt oop1; @@ -1961,7 +1957,7 @@ setsp((calloutState->argVector)); } if (((calloutState->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec = (calloutState->ffiRetHeader); @@ -3528,6 +3524,8 @@ sqInt i3; usqLong intRet; usqLong intRet1; + extern void loadFloatRegs(double, double, double, double, double, double, double, double); + extern void loadFloatRegs1(double, double, double, double, double, double, double, double); sqInt meth; sqInt myThreadIndex; sqInt myThreadIndex1; @@ -3797,7 +3795,7 @@ setsp((calloutState->argVector)); } if (((calloutState->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec = (calloutState->ffiRetHeader); @@ -4149,7 +4147,7 @@ setsp((calloutState1->argVector)); } if (((calloutState1->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState1->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState1->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec2 = (calloutState1->ffiRetHeader); @@ -4349,6 +4347,8 @@ sqInt i3; usqLong intRet; usqLong intRet1; + extern void loadFloatRegs(double, double, double, double, double, double, double, double); + extern void loadFloatRegs1(double, double, double, double, double, double, double, double); sqInt myThreadIndex; sqInt myThreadIndex1; sqInt nArgs; @@ -4620,7 +4620,7 @@ setsp((calloutState->argVector)); } if (((calloutState->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec = (calloutState->ffiRetHeader); @@ -4978,7 +4978,7 @@ setsp((calloutState1->argVector)); } if (((calloutState1->floatRegisterIndex)) > 0) { - dummyFloatFunctionwithwithwithwithwithwithwith((((double *) ((&(((calloutState1->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[14])))))[0]); + loadFloatRegs((((double *) ((&(((calloutState1->floatRegisters))[0])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[2])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[4])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[6])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[8])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[10])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[12])))))[0], (((double *) ((&(((calloutState1->floatRegisters))[14])))))[0]); } /* begin atomicTypeOf: */ typeSpec2 = (calloutState1->ffiRetHeader);
vm-dev@lists.squeakfoundation.org