VM build problem: sqInt?

John M McIntosh johnmci at smalltalkconsulting.com
Sun Sep 3 19:43:09 UTC 2006


I compared the VMMaker 3.8b6 squeakmap version of interp.c to my  
interp.c to ensure I've not missed something
and I'll note I updated gnuifer.cs to gunifer.7.cs to remove some  
register defines so that we get

sqInt interpret(void) {
#ifdef FOO_REG
     register struct foo * foo FOO_REG = &fum;
#endif
     sqInt localReturnValue;
     sqInt localReturnContext;
     sqInt localHomeContext;
     char* localSP;
     char* localIP;
     sqInt currentBytecode;
     JUMP_TABLE;
	browserPluginInitialiseIfNeeded();


in the past we had register keywords as

     register char* localSP SP_REG;
     register char* localIP IP_REG;
     register sqInt currentBytecode CB_REG;

But that confused the mac intel gcc compiler so that it produced ugly  
poorly performing code.
The current mac power pc version of gcc 3.3 does the right thing,  
however we still have to hint
with the   register struct foo * foo FOO_REG = &fum; otherwise it  
does the wrong thing.

Some would argue that register is obsolete and ignored, but I think  
your milage varies depending on
which compiler is being abused.

The check is compare the 3.8.12b5u official VM tinybenchmarks  
(multiple iterations) against a VM you
have built to see if the numbers are close or identical... If not  
well we get to explore why.

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list