Hi, > variables in the same routine. Unlike in e.g. gcc, there are no > annotations for assembly routines that they expect certain variables to > be in memory and/or registers, that the block may touch arbitrary memory > locations, etc. Hence, the compiler is as conservative as possible. This took me a while to understand, but what you're saying is that the issue is not so much about what registers might be modified (we could just say that if the annotation exists, it is assumed to be complete), but that the assembler code might try to take the address of a variable (possibly with indirections), which must therefore not be a regvar? That makes sense. Unfortunately...
> Afaik there are only two limitations: > * routines containing assembly blocks (including pure assembly routines) > cannot be inlined> * regular procedures that contain assembly blocks will > never use regvars Somehow I have a feeling that the fix for one would also fix the other... I'd add the manual RIP addressing that was mentioned on the bugtracker recently (OT: is -Cg supposed to work on platforms where it is not set by default?). For the original issue, since manually using assembler blocks makes things complicated, is there a way to "strongly suggest" to the compiler that a variable should become a regvar if the entire routine is pure Pascal? Something like the (purely decorative) {register} comments in /packages/pasjpeg/src/jdcolor.pas? -- Regards, Martok Ceterum censeo b32079 esse sanandam. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal