[Vm-dev] NoDbgRegParms test case results
gettimothy
gettimothy at zoho.com
Tue Mar 31 22:33:41 UTC 2015
Hi all.
I implemented a simple test case to test my theory that my platform does not support the regparms(0) function attribute and my theory is bunk. bleah.
I modified this autotools tutorial's source files at
http://www.gnu.org/software/automake/manual/html_node/Creating-amhello.html
to mimic the __attribute__((regparms(0))) behavior in cog.
I could not recreate the error under any compination of PRODUCTION and #if #else conditions.
I am at a loss at the moment (and sick with a cold) so I will have to revisit this later.
CMakeVMMakerSqueak dev is blocked by this issue.
I added a test.h file to the src directory that looks like this:
bash-4.2$ cat test.h
#undef NoDbgRegParms
#define PRODUCTION 1
#if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms)
# define NoDbgRegParms __attribute__ ((regparm(0)))
#else
# define NoDbgRegParms __attribute__ ((deprecated))
#endif
int plus (int a, int b) NoDbgRegParms;
and modified the main.c .
bash-4.2$ cat src/main.c
#include <config.h>
#include <stdio.h>
#include "test.h"
int main(void){
int p;
puts("Hello World!");
puts ("This is " PACKAGE_STRING ".");
p=plus(3,3);
printf("%d\n",p);
return 0;
}
int plus (int a, int b) {
return a + b;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150331/6baef29d/attachment.htm
More information about the Vm-dev
mailing list