summaryrefslogtreecommitdiff
path: root/unsorted/TargetOptimizer-ppc-mach.c
diff options
context:
space:
mode:
Diffstat (limited to 'unsorted/TargetOptimizer-ppc-mach.c')
-rw-r--r--unsorted/TargetOptimizer-ppc-mach.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/unsorted/TargetOptimizer-ppc-mach.c b/unsorted/TargetOptimizer-ppc-mach.c
new file mode 100644
index 0000000..10fe33e
--- /dev/null
+++ b/unsorted/TargetOptimizer-ppc-mach.c
@@ -0,0 +1,69 @@
+#include "parser.h"
+
+char schedule_ppc_default;
+
+int TargetSetOptFlags(short val, Boolean set) {
+ switch (val) {
+ case 'Pe':
+ pBackEnd.peephole = set;
+ break;
+ case 'Sn':
+ pBackEnd.schedule = 0;
+ break;
+ case 'Sh':
+ pBackEnd.schedule = set;
+ break;
+ case 'S?':
+ pBackEnd.processor = schedule_ppc_default;
+ break;
+ case 'SG':
+ pBackEnd.processor = schedule_ppc_default = 0;
+ break;
+ case 'S1':
+ pBackEnd.processor = schedule_ppc_default = 1;
+ break;
+ case 'S3':
+ pBackEnd.processor = schedule_ppc_default = 2;
+ break;
+ case 'S#':
+ pBackEnd.processor = schedule_ppc_default = 3;
+ break;
+ case 'S4':
+ pBackEnd.processor = schedule_ppc_default = 4;
+ break;
+ case 'S%':
+ pBackEnd.processor = schedule_ppc_default = 5;
+ break;
+ case 'S7':
+ pBackEnd.processor = schedule_ppc_default = 6;
+ break;
+ case 'SA':
+ pBackEnd.processor = schedule_ppc_default = 7;
+ break;
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+void TargetDisplayOptimizationOptions(Handle txt) {
+ if (!pBackEnd.schedule) {
+ HPrintF(txt, "\t- no instruction scheduling\n");
+ } else {
+ HPrintF(txt, "\t- schedule for %s\n",
+ (pBackEnd.processor == 0) ? "generic PPC" :
+ (pBackEnd.processor == 1) ? "601" :
+ (pBackEnd.processor == 2) ? "603" :
+ (pBackEnd.processor == 3) ? "603e" :
+ (pBackEnd.processor == 4) ? "604" :
+ (pBackEnd.processor == 5) ? "604e" :
+ (pBackEnd.processor == 6) ? "750" :
+ (pBackEnd.processor == 7) ? "Altivec" :
+ "???"
+ );
+ }
+}
+
+void TargetSetPragmaOptimizationsToUnspecified() {
+}