diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-11 22:29:53 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-11 22:29:53 +0000 |
commit | 0bec4f557a96e1a40437cf5af20cc78a5eec8a63 (patch) | |
tree | c1e05ec804c43aa5a8f5f21b0ed02d0587d29563 /unsorted/TargetOptimizer-ppc-mach.c | |
parent | aec1b8dddc68ecb8288ec6132932e4c7b4bca09f (diff) | |
download | MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.tar.gz MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.zip |
getting closer
Diffstat (limited to 'unsorted/TargetOptimizer-ppc-mach.c')
-rw-r--r-- | unsorted/TargetOptimizer-ppc-mach.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/unsorted/TargetOptimizer-ppc-mach.c b/unsorted/TargetOptimizer-ppc-mach.c index 10fe33e..6c86356 100644 --- a/unsorted/TargetOptimizer-ppc-mach.c +++ b/unsorted/TargetOptimizer-ppc-mach.c @@ -17,28 +17,28 @@ int TargetSetOptFlags(short val, Boolean set) { pBackEnd.processor = schedule_ppc_default; break; case 'SG': - pBackEnd.processor = schedule_ppc_default = 0; + pBackEnd.processor = schedule_ppc_default = PrefCPU_Generic; break; case 'S1': - pBackEnd.processor = schedule_ppc_default = 1; + pBackEnd.processor = schedule_ppc_default = PrefCPU_601; break; case 'S3': - pBackEnd.processor = schedule_ppc_default = 2; + pBackEnd.processor = schedule_ppc_default = PrefCPU_603; break; case 'S#': - pBackEnd.processor = schedule_ppc_default = 3; + pBackEnd.processor = schedule_ppc_default = PrefCPU_603e; break; case 'S4': - pBackEnd.processor = schedule_ppc_default = 4; + pBackEnd.processor = schedule_ppc_default = PrefCPU_604; break; case 'S%': - pBackEnd.processor = schedule_ppc_default = 5; + pBackEnd.processor = schedule_ppc_default = PrefCPU_604e; break; case 'S7': - pBackEnd.processor = schedule_ppc_default = 6; + pBackEnd.processor = schedule_ppc_default = PrefCPU_750; break; case 'SA': - pBackEnd.processor = schedule_ppc_default = 7; + pBackEnd.processor = schedule_ppc_default = PrefCPU_Altivec; break; default: return 0; @@ -48,22 +48,24 @@ int TargetSetOptFlags(short val, Boolean set) { } void TargetDisplayOptimizationOptions(Handle txt) { + PrefCPU p; + 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" : + !(p = (PrefCPU) pBackEnd.processor) ? "generic PPC" : + (p == PrefCPU_601) ? "601" : + (p == PrefCPU_603) ? "603" : + (p == PrefCPU_603e) ? "603e" : + (p == PrefCPU_604) ? "604" : + (p == PrefCPU_604e) ? "604e" : + (p == PrefCPU_750) ? "750" : + (p == PrefCPU_Altivec) ? "Altivec" : "???" ); } } -void TargetSetPragmaOptimizationsToUnspecified() { +void TargetSetPragmaOptimizationsToUnspecified(void) { } |