[Compbench-devel] CompBenchmarks++/libcompbenchmarks/share/KB/common common.xml, NONE, 1.1
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-03-13 17:41:43
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/common In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29761 Added Files: common.xml Log Message: First import. --- NEW FILE: common.xml --- <?xml version="1.0" ?> <cel> <!-- GLOBALS --> <!-- Array for storing current compiler options in CEL --> <cel-array-def> <cel-str>kb-options</cel-str> </cel-array-def> <cel-var-set> <cel-str>kb-option-mainoptimization</cel-str> <cel-str>0</cel-str> </cel-var-set> <!-- Set to 1 if an option is inhibiting binary size optimizations --> <cel-var-set> <cel-str>kb-option-size-optimizations-invaliding</cel-str> <cel-str>0</cel-str> </cel-var-set> <!-- Convenience function to reset stored options --> <!-- and start options' evaluation on another compiler or option set --> <cel-function-def> <cel-str>kb-common-option-reset</cel-str> <cel-var-set> <cel-str>kb-option-size-optimizations-invaliding</cel-str> <cel-str>0</cel-str> </cel-var-set> <cel-var-set> <cel-str>kb-option-mainoptimization</cel-str> <cel-str>0</cel-str> </cel-var-set> <cel-array-undef> <cel-str>kb-options</cel-str> </cel-array-undef> <cel-array-def> <cel-str>kb-options</cel-str> </cel-array-def> </cel-function-def> <!-- Common call to try adding a new option is current option set --> <!-- The TOS item is the value while the BOS refers to the --> <!-- variable name used to store the variable globaly. --> <!-- This function is useful just to keep track of option in --> <!-- some identified CEL variables --> <!-- If the corresponding CEL variable is not initialised, --> <!-- option is pushed to kb-options and 1 is returned --> <cel-function-def> <cel-str>kb-common-option-apply</cel-str> <cel-var-set> <cel-str>value</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>option-var</cel-str> <cel-stack-pop/> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> <cel-str>0</cel-str> </cel-cmp-eq> <!-- CEL variable not set; set it to value, and push value --> <!-- in options --> <cel-block> <cel-array-add> <cel-str>kb-options</cel-str> <cel-var-get><cel-str>value</cel-str></cel-var-get> </cel-array-add> <cel-var-set> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> </cel-var-set> </cel-block> <!-- CEL variable previously set : return error message --> <cel-block> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> </cel-cmp-eq> <cel-str-concat> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-str-sp/> <cel-str>has already been set</cel-str> </cel-str-concat> <cel-str-concat> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-str-sp/> <cel-str>is incompatible with</cel-str> <cel-str-sp/> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> </cel-str-concat> </cel-cond-if> </cel-block> </cel-cond-if> </cel-function-def> <!-- Returns 1 if the passed compiler version matches the minimum --> <!-- version given in 2d argument --> <cel-function-def> <cel-str>kb-common-option-version-is-compatible</cel-str> <cel-var-set> <cel-str>compiler-min-version</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>compiler-version</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>return</cel-str> <cel-str>1</cel-str> </cel-var-set> <cel-cond-if> <cel-logic-not> <cel-cmp-ae> <cel-var-get> <cel-str>compiler-min-version</cel-str> </cel-var-get> <cel-var-get> <cel-str>compiler-version</cel-str> </cel-var-get> </cel-cmp-ae> </cel-logic-not> <cel-var-set> <cel-str>return</cel-str> <cel-str>g++ or gcc >= 2.95.0 needed</cel-str> </cel-var-set> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> </cel> |