--- gcc/config/mot3300.h 2018/04/24 17:51:34 1.1 +++ gcc/config/mot3300.h 2018/04/24 18:04:54 1.1.1.4 @@ -61,6 +61,10 @@ the Free Software Foundation, 675 Mass A #define TARGET_MEM_FUNCTIONS +/* size_t is unsigned int. */ + +#define SIZE_TYPE "unsigned int" + /* Every structure or union's size must be a multiple of 2 bytes. */ #define STRUCTURE_SIZE_BOUNDARY 16 @@ -188,14 +192,12 @@ the Free Software Foundation, 675 Mass A #undef ASM_APP_OFF #define ASM_APP_OFF "" -/* We like aligned sources, and maybe our as will like them. */ - #undef TEXT_SECTION_ASM_OP -#define TEXT_SECTION_ASM_OP "\ttext" +#define TEXT_SECTION_ASM_OP "text" #undef DATA_SECTION_ASM_OP -#define DATA_SECTION_ASM_OP "\tdata" +#define DATA_SECTION_ASM_OP "data" #undef ASCII_DATA_ASM_OP -#define ASCII_DATA_ASM_OP "\tbyte" +#define ASCII_DATA_ASM_OP "byte" /* The file command should always begin the output. */ @@ -280,12 +282,11 @@ output_file_directive ((FILE), main_inpu ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16)) #endif -/* This is how to output a command to make the user-level label named NAME +/* This is the command to make the user-level label named NAME defined for reference from other files. */ -#undef ASM_GLOBALIZE_LABEL -#define ASM_GLOBALIZE_LABEL(FILE,NAME) \ - do { fputs ("\tglobal ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) +#undef GLOBAL_ASM_OP +#define GLOBAL_ASM_OP "global" /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable named NAME. @@ -387,7 +388,7 @@ do { union { float f; long l;} tem; \ if (++sp < (LEN)) \ { if (lp > 60) \ { lp = 0; \ - fprintf ((FILE), "\n%s ", ASCII_DATA_ASM_OP); } \ + fprintf ((FILE), "\n\t%s ", ASCII_DATA_ASM_OP); } \ else \ putc (',', (FILE)); \ goto loop; } \ @@ -407,7 +408,7 @@ do { union { float f; long l;} tem; \ sp@, (sp) or (%sp) depending on the style of syntax. '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax). - '!' for the cc register (used in an `and to cc' insn). + '!' for the fpcr register (used in some float-to-fixed conversions). '$' for the letter `s' in an op code, but only on the 68040. '&' for the letter `d' in an op code, but only on the 68040. @@ -429,7 +430,7 @@ do { union { float f; long l;} tem; \ else if (CODE == '-') fprintf (FILE, "-(%%sp)"); \ else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ - else if (CODE == '!') fprintf (FILE, "%%cc"); \ + else if (CODE == '!') fprintf (FILE, "%%fpcr"); \ else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ else if (GET_CODE (X) == REG) \ @@ -631,6 +632,18 @@ do { union { float f; long l;} tem; \ fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n", \ XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM)) +#if 0 +/* At end of a switch table, define LD%n iff the symbol LI%n was defined. */ +#define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ +{ if (switch_table_difference_label_flag) \ + asm_fprintf (FILE, "\t%s %LLD%d,%LL%d-%LLI%d-2.b\n",\ + SET_ASM_OP, (NUM), (NUM), (NUM)) \ + switch_table_difference_label_flag = 0; } +#endif + +/* We have to define this to avoid errors. */ +int switch_table_difference_label_flag; + /* Translate some opcodes to fit the sysV68 assembler syntax. */ /* The opcodes fdmov and fsmov are guesses. */ @@ -643,6 +656,11 @@ do { union { float f; long l;} tem; \ while (*(PTR) != ' ') \ { putc (*(PTR), (FILE)); ++(PTR); } \ fprintf ((FILE), ".w"); } \ + else if ((PTR)[0] == 's') \ + { \ + if (!strncmp ((PTR), "swap", 4)) \ + { fprintf ((FILE), "swap.w"); (PTR) += 4; } \ + } \ else if ((PTR)[0] == 'f') \ { \ if (!strncmp ((PTR), "fmove", 5)) \ @@ -668,20 +686,20 @@ do { union { float f; long l;} tem; \ else if ((PTR)[0] == 'm' && (PTR)[1] == 'o' \ && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ - if ((PTR)[0] == 'q' || (PTR)[0] == 'a' || \ - (PTR)[0] == 'c') (PTR)++; } \ + if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ + || (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ - if ((PTR)[0] == 'q' || (PTR)[0] == 'i' || \ - (PTR)[0] == 'a') (PTR)++; } \ + if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ + || (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ - if ((PTR)[0] == 'a' || (PTR)[0] == 'i' || \ - (PTR)[0] == 'm') (PTR)++; } \ + if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ + || (PTR)[0] == 'm') (PTR)++; } \ /* JMP to switch label */ \ else if (!strncmp((PTR), (SWITCH_JUMP_MATCH), sizeof(SWITCH_JUMP_MATCH) - 1)) \ { while (*(PTR)++ != '('); \