diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2009-07-31 15:41:43 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-07-31 15:41:43 +0200 |
commit | e61c65627303b0e086a5347df3cb0d7e658e3a97 (patch) | |
tree | 90ce7b9684aba7ae0426990b26cc358479567f35 /gcc/config/i386 | |
parent | ea2002ba74c91a555992984a01398529e4c2ed17 (diff) | |
download | gcc-e61c65627303b0e086a5347df3cb0d7e658e3a97.zip gcc-e61c65627303b0e086a5347df3cb0d7e658e3a97.tar.gz gcc-e61c65627303b0e086a5347df3cb0d7e658e3a97.tar.bz2 |
bsd.h (ASM_BYTE): New define.
* config/i386/bsd.h (ASM_BYTE): New define.
* config/i386/darwin.h (ASM_BYTE): Rename from ASM_BYTE_OP.
* config/i386/att.h (ASM_BYTE): New define. Use ASM_BYTE instead of
.byte. Use fputs or putc instead of fprintf where appropriate.
* config/i386/i386-interix.h: Use ASM_BYTE instead of .byte. Use
fputs or putc instead of fprintf where appropriate.
* config/i386/i386elf.h: Ditto.
* config/i386/sysv4.h: Ditto.
* config/i386/i386.c (TARGET_ASM_BYTE_OP): New define.
* config/i386/i386.md (x86_sahf_1): Use ASM_BYTE instead of .byte.
(*tls_global_dynamic_64): Ditto.
From-SVN: r150315
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/att.h | 3 | ||||
-rw-r--r-- | gcc/config/i386/bsd.h | 1 | ||||
-rw-r--r-- | gcc/config/i386/darwin.h | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386-interix.h | 12 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 3 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/config/i386/i386elf.h | 6 | ||||
-rw-r--r-- | gcc/config/i386/sysv4.h | 14 |
8 files changed, 25 insertions, 20 deletions
diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h index 6586ddd..3061690 100644 --- a/gcc/config/i386/att.h +++ b/gcc/config/i386/att.h @@ -31,6 +31,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Assembler pseudos to introduce constants of various size. */ +#define ASM_BYTE "\t.byte\t" #define ASM_SHORT "\t.value\t" #define ASM_LONG "\t.long\t" #define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */ @@ -43,7 +44,7 @@ do \ { size_t i = 0, limit = (SIZE); \ while (i < limit) \ { if (i%10 == 0) { if (i!=0) putc ('\n', (FILE)); \ - fputs ("\t.byte\t", (FILE)); } \ + fputs (ASM_BYTE, (FILE)); } \ else putc (',', (FILE)); \ fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \ putc ('\n', (FILE)); \ diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h index 229777a..e408ccd 100644 --- a/gcc/config/i386/bsd.h +++ b/gcc/config/i386/bsd.h @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see /* Assembler pseudos to introduce constants of various size. */ +#define ASM_BYTE "\t.byte\t" #define ASM_SHORT "\t.word\t" #define ASM_LONG "\t.long\t" #define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 039f52f..eb9ee70 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -189,7 +189,7 @@ extern void darwin_x86_file_end (void); /* Assembler pseudos to introduce constants of various size. */ -#define ASM_BYTE_OP "\t.byte\t" +#define ASM_BYTE "\t.byte\t" #define ASM_SHORT "\t.word\t" #define ASM_LONG "\t.long\t" #define ASM_QUAD "\t.quad\t" diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 380b46c..060b82c 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -209,7 +209,7 @@ along with GCC; see the file COPYING3. If not see else \ { \ if (bytes_in_chunk == 0) \ - fprintf ((FILE), "\t.byte\t"); \ + fputs (ASM_BYTE, (FILE)); \ else \ fputc (',', (FILE)); \ fprintf ((FILE), "0x%02x", *_ascii_bytes); \ @@ -217,7 +217,7 @@ along with GCC; see the file COPYING3. If not see } \ } \ if (bytes_in_chunk > 0) \ - fprintf ((FILE), "\n"); \ + fputc ('\n', (FILE)); \ } \ while (0) @@ -277,11 +277,11 @@ do { \ #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ do \ { \ - fprintf ((FILE), "%s", SET_ASM_OP); \ + fputs (SET_ASM_OP, (FILE)); \ assemble_name (FILE, LABEL1); \ - fprintf (FILE, ","); \ + fputc (',', (FILE)); \ assemble_name (FILE, LABEL2); \ - fprintf (FILE, "\n"); \ + fputc ('\n', (FILE)); \ } \ while (0) @@ -359,4 +359,4 @@ extern void i386_pe_unique_section (tree, int); #define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \ (TYPE_MODE (TYPE) == BLKmode \ - || (AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes (TYPE) > 8 ))
\ No newline at end of file + || (AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes (TYPE) > 8 )) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 042ff44..73b2690 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -30491,6 +30491,9 @@ ix86_enum_va_list (int idx, const char **pname, tree *ptree) #undef TARGET_ASM_CLOSE_PAREN #define TARGET_ASM_CLOSE_PAREN "" +#undef TARGET_ASM_BYTE_OP +#define TARGET_ASM_BYTE_OP ASM_BYTE + #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP ASM_SHORT #undef TARGET_ASM_ALIGNED_SI_OP diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index f50bcc19..3d832f1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1555,7 +1555,7 @@ #ifdef HAVE_AS_IX86_SAHF return "sahf"; #else - return ".byte\t0x9e"; + return ASM_BYTE "0x9e"; #endif } [(set_attr "length" "1") @@ -16473,7 +16473,7 @@ (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")] UNSPEC_TLS_GD)] "TARGET_64BIT" - { return ".byte\t0x66\n\tlea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\n" ASM_SHORT "0x6666\n\trex64\n\tcall\t%P2"; } + { return ASM_BYTE "0x66\n\tlea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\n" ASM_SHORT "0x6666\n\trex64\n\tcall\t%P2"; } [(set_attr "type" "multi") (set_attr "length" "16")]) diff --git a/gcc/config/i386/i386elf.h b/gcc/config/i386/i386elf.h index ba53749..44cf681 100644 --- a/gcc/config/i386/i386elf.h +++ b/gcc/config/i386/i386elf.h @@ -63,7 +63,7 @@ along with GCC; see the file COPYING3. If not see const unsigned char *limit = _ascii_bytes + (LENGTH); \ unsigned bytes_in_chunk = 0; \ for (; _ascii_bytes < limit; _ascii_bytes++) \ - { \ + { \ const unsigned char *p; \ if (bytes_in_chunk >= 64) \ { \ @@ -85,7 +85,7 @@ along with GCC; see the file COPYING3. If not see else \ { \ if (bytes_in_chunk == 0) \ - fprintf ((FILE), "\t.byte\t"); \ + fputs (ASM_BYTE, (FILE)); \ else \ fputc (',', (FILE)); \ fprintf ((FILE), "0x%02x", *_ascii_bytes); \ @@ -93,7 +93,7 @@ along with GCC; see the file COPYING3. If not see } \ } \ if (bytes_in_chunk > 0) \ - fprintf ((FILE), "\n"); \ + fputc ('\n', (FILE)); \ } \ while (0) diff --git a/gcc/config/i386/sysv4.h b/gcc/config/i386/sysv4.h index bedac7a..63c0cbc 100644 --- a/gcc/config/i386/sysv4.h +++ b/gcc/config/i386/sysv4.h @@ -55,7 +55,7 @@ along with GCC; see the file COPYING3. If not see const unsigned char *limit = _ascii_bytes + (LENGTH); \ unsigned bytes_in_chunk = 0; \ for (; _ascii_bytes < limit; _ascii_bytes++) \ - { \ + { \ const unsigned char *p; \ if (bytes_in_chunk >= 64) \ { \ @@ -77,7 +77,7 @@ along with GCC; see the file COPYING3. If not see else \ { \ if (bytes_in_chunk == 0) \ - fprintf ((FILE), "\t.byte\t"); \ + fputs (ASM_BYTE, (FILE)); \ else \ fputc (',', (FILE)); \ fprintf ((FILE), "0x%02x", *_ascii_bytes); \ @@ -85,7 +85,7 @@ along with GCC; see the file COPYING3. If not see } \ } \ if (bytes_in_chunk > 0) \ - fprintf ((FILE), "\n"); \ + fputc ('\n', (FILE)); \ } \ while (0) @@ -103,10 +103,10 @@ along with GCC; see the file COPYING3. If not see do { \ if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \ { \ - fputs (ASM_LONG, FILE); \ - assemble_name (FILE, XSTR (ADDR, 0)); \ - fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \ - goto DONE; \ + fputs (ASM_LONG, (FILE)); \ + assemble_name (FILE, XSTR (ADDR, 0)); \ + fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), (FILE)); \ + goto DONE; \ } \ } while (0) |