[m-dev.] diff: fix MR_GRADE_OPT

Simon Taylor stayl at cs.mu.OZ.AU
Fri Oct 13 16:53:41 AEDT 2000



Estimated hours taken: 0.2

runtime/mercury_grade.h:
	Fix MR_GRADE_OPT for high-level C code grades.


Index: mercury_grade.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_grade.h,v
retrieving revision 1.27
diff -u -u -r1.27 mercury_grade.h
--- mercury_grade.h	2000/03/24 10:27:47	1.27
+++ mercury_grade.h	2000/10/13 05:43:25
@@ -218,26 +218,43 @@
 ** Here we do the same thing as above, but this time we build up a string
 ** containing the options to pass to the compiler to select this grade.
 */
+#ifdef MR_HIGHLEVEL_CODE
 
-#ifdef USE_ASM_LABELS
-  #define MR_GRADE_OPT_PART_1	"asm_"
-#else
-  #define MR_GRADE_OPT_PART_1	""
-#endif
-
-#ifdef USE_GCC_NONLOCAL_GOTOS
-  #ifdef USE_GCC_GLOBAL_REGISTERS
-    #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "fast"
+  #ifdef MR_HIGHLEVEL_DATA
+    #define MR_GRADE_OPT_PART_1		"hl"
   #else
-    #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "jump"
+    #define MR_GRADE_OPT_PART_1		"hlc"
   #endif
-#else
-  #ifdef USE_GCC_GLOBAL_REGISTERS
-    #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "reg"
+
+  #ifdef MR_USE_GCC_NESTED_FUNCTIONS
+    #define MR_GRADE_OPT_PART_2		MR_GRADE_OPT_PART_1  "_nest"
+  #else
+    #define MR_GRADE_OPT_PART_2		MR_GRADE_OPT_PART_1
+  #endif
+
+#else /* ! MR_HIGHLEVEL_CODE */
+
+  #ifdef USE_ASM_LABELS
+    #define MR_GRADE_OPT_PART_1		"asm_"
   #else
-    #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "none"
+    #define MR_GRADE_OPT_PART_1		""
   #endif
-#endif
+
+  #ifdef USE_GCC_NONLOCAL_GOTOS
+    #ifdef USE_GCC_GLOBAL_REGISTERS
+      #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "fast"
+    #else
+      #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "jump"
+    #endif
+  #else
+    #ifdef USE_GCC_GLOBAL_REGISTERS
+      #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "reg"
+    #else
+      #define MR_GRADE_OPT_PART_2	MR_GRADE_OPT_PART_1 "none"
+    #endif
+  #endif
+
+#endif /* ! MR_HIGHLEVEL_CODE */
 
 #ifdef MR_THREAD_SAFE
   #define MR_GRADE_OPT_PART_3	MR_GRADE_OPT_PART_2 ".par"
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list