2022-10-19 20:16:13 +00:00
|
|
|
#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':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_Generic;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S1':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_601;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S3':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_603;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S#':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_603e;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S4':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_604;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S%':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_604e;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'S7':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_750;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
case 'SA':
|
2023-01-11 22:29:53 +00:00
|
|
|
pBackEnd.processor = schedule_ppc_default = PrefCPU_Altivec;
|
2022-10-19 20:16:13 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TargetDisplayOptimizationOptions(Handle txt) {
|
2023-01-11 22:29:53 +00:00
|
|
|
PrefCPU p;
|
|
|
|
|
2022-10-19 20:16:13 +00:00
|
|
|
if (!pBackEnd.schedule) {
|
|
|
|
HPrintF(txt, "\t- no instruction scheduling\n");
|
|
|
|
} else {
|
|
|
|
HPrintF(txt, "\t- schedule for %s\n",
|
2023-01-11 22:29:53 +00:00
|
|
|
!(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" :
|
2022-10-19 20:16:13 +00:00
|
|
|
"???"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-11 22:29:53 +00:00
|
|
|
void TargetSetPragmaOptimizationsToUnspecified(void) {
|
2022-10-19 20:16:13 +00:00
|
|
|
}
|