- if (strcmp (TARGET_CPU, "mips") == 0)
- mips_isa = 1;
- else if (strcmp (TARGET_CPU, "r6000") == 0
- || strcmp (TARGET_CPU, "mips2") == 0)
- mips_isa = 2;
- else if (strcmp (TARGET_CPU, "mips64") == 0
- || strcmp (TARGET_CPU, "r4000") == 0
- || strcmp (TARGET_CPU, "mips3") == 0)
- mips_isa = 3;
+ const char *cpu;
+ char *a = NULL;
+
+ cpu = TARGET_CPU;
+ if (strcmp (cpu + (sizeof TARGET_CPU) - 3, "el") == 0)
+ {
+ a = xmalloc (sizeof TARGET_CPU);
+ strcpy (a, TARGET_CPU);
+ a[(sizeof TARGET_CPU) - 3] = '\0';
+ cpu = a;
+ }
+
+ if (strcmp (cpu, "mips") == 0)
+ {
+ mips_isa = 1;
+ mips_cpu = 3000;
+ }
+ else if (strcmp (cpu, "r6000") == 0
+ || strcmp (cpu, "mips2") == 0)
+ {
+ mips_isa = 2;
+ mips_cpu = 6000;
+ }
+ else if (strcmp (cpu, "mips64") == 0
+ || strcmp (cpu, "r4000") == 0
+ || strcmp (cpu, "mips3") == 0)
+ {
+ mips_isa = 3;
+ mips_cpu = 4000;
+ }
+ else if (strcmp (cpu, "r4400") == 0)
+ {
+ mips_isa = 3;
+ mips_cpu = 4400;
+ }
+ else if (strcmp (cpu, "mips64orion") == 0
+ || strcmp (cpu, "r4600") == 0)
+ {
+ mips_isa = 3;
+ mips_cpu = 4600;
+ }