diff options
author | Kai Tietz <ktietz@gcc.gnu.org> | 2010-06-01 10:13:24 +0200 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2010-06-01 10:13:24 +0200 |
commit | 42ad7bc8a55944289250a2a6949df6c404806d66 (patch) | |
tree | 9df02c532f4e75c73bb1f5187502ab7024be2597 /gcc/config | |
parent | d7581cea4362de4ddf7ab69639833d2e593f4e38 (diff) | |
download | gcc-42ad7bc8a55944289250a2a6949df6c404806d66.zip gcc-42ad7bc8a55944289250a2a6949df6c404806d66.tar.gz gcc-42ad7bc8a55944289250a2a6949df6c404806d66.tar.bz2 |
2010-06-01 Kai Tietz
* config/i386.c (ix86_output_addr_vec_elt): Make LPREFIX
argument for fprintf.
(ix86_output_addr_diff_elt): Likewise.
(x86_function_profiler): Likewise.
* config/cygming.h (LOCAL_LABEL_PREFIX): Fix
for x64 no-underscore.
(LPREFIX): Likewise.
(ASM_GENERATE_INTERNAL_LABEL): Likewise.
From-SVN: r160093
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/cygming.h | 12 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 24 |
2 files changed, 24 insertions, 12 deletions
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index 999cb6e..7c35e2e 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -42,6 +42,18 @@ along with GCC; see the file COPYING3. If not see #if ! defined (USE_MINGW64_LEADING_UNDERSCORES) #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX (TARGET_64BIT ? "" : "_") + +#undef LOCAL_LABEL_PREFIX +#define LOCAL_LABEL_PREFIX (TARGET_64BIT ? "." : "") + +#undef ASM_GENERATE_INTERNAL_LABEL +#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ + sprintf ((BUF), "%s%s%ld", LOCAL_LABEL_PREFIX, \ + (PREFIX), (long)(NUMBER)) + +#undef LPREFIX +#define LPREFIX (TARGET_64BIT ? ".L" : "L") + #endif #undef DBX_REGISTER_NUMBER diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 76dace5..de4fa72 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13015,7 +13015,7 @@ ix86_output_addr_vec_elt (FILE *file, int value) gcc_assert (!TARGET_64BIT); #endif - fprintf (file, "%s" LPREFIX "%d\n", directive, value); + fprintf (file, "%s%s%d\n", directive, LPREFIX, value); } void @@ -13031,21 +13031,21 @@ ix86_output_addr_diff_elt (FILE *file, int value, int rel) #endif /* We can't use @GOTOFF for text labels on VxWorks; see gotoff_operand. */ if (TARGET_64BIT || TARGET_VXWORKS_RTP) - fprintf (file, "%s" LPREFIX "%d-" LPREFIX "%d\n", - directive, value, rel); + fprintf (file, "%s%s%d-%s%d\n", + directive, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) - fprintf (file, ASM_LONG LPREFIX "%d@GOTOFF\n", value); + fprintf (file, ASM_LONG "%s%d@GOTOFF\n", LPREFIX, value); #if TARGET_MACHO else if (TARGET_MACHO) { - fprintf (file, ASM_LONG LPREFIX "%d-", value); + fprintf (file, ASM_LONG "%s%d-", LPREFIX, value); machopic_output_function_base_name (file); putc ('\n', file); } #endif else - asm_fprintf (file, ASM_LONG "%U%s+[.-" LPREFIX "%d]\n", - GOT_SYMBOL_NAME, value); + asm_fprintf (file, ASM_LONG "%U%s+[.-%s%d]\n", + GOT_SYMBOL_NAME, LPREFIX, value); } /* Generate either "mov $0, reg" or "xor reg, reg", as appropriate @@ -26628,7 +26628,7 @@ x86_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) if (TARGET_64BIT) { #ifndef NO_PROFILE_COUNTERS - fprintf (file, "\tleaq\t" LPREFIX "P%d(%%rip),%%r11\n", labelno); + fprintf (file, "\tleaq\t%sP%d(%%rip),%%r11\n", LPREFIX, labelno); #endif if (DEFAULT_ABI == SYSV_ABI && flag_pic) @@ -26639,16 +26639,16 @@ x86_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) else if (flag_pic) { #ifndef NO_PROFILE_COUNTERS - fprintf (file, "\tleal\t" LPREFIX "P%d@GOTOFF(%%ebx),%%" PROFILE_COUNT_REGISTER "\n", - labelno); + fprintf (file, "\tleal\t%sP%d@GOTOFF(%%ebx),%%" PROFILE_COUNT_REGISTER "\n", + LPREFIX, labelno); #endif fputs ("\tcall\t*" MCOUNT_NAME "@GOT(%ebx)\n", file); } else { #ifndef NO_PROFILE_COUNTERS - fprintf (file, "\tmovl\t$" LPREFIX "P%d,%%" PROFILE_COUNT_REGISTER "\n", - labelno); + fprintf (file, "\tmovl\t$%sP%d,%%" PROFILE_COUNT_REGISTER "\n", + LPREFIX, labelno); #endif fputs ("\tcall\t" MCOUNT_NAME "\n", file); } |