diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2018-03-07 00:47:41 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2018-03-07 00:47:41 +0000 |
commit | 9250872b8dc52c59eacd4bcaab68561948459a4e (patch) | |
tree | b8ecd09dcd0d73f2123eacd96920b5f9750f3c7a | |
parent | 1d792a6d0ea784027892d8c82bb8f2d38406c187 (diff) | |
download | gcc-9250872b8dc52c59eacd4bcaab68561948459a4e.zip gcc-9250872b8dc52c59eacd4bcaab68561948459a4e.tar.gz gcc-9250872b8dc52c59eacd4bcaab68561948459a4e.tar.bz2 |
pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use sprint_ul.
* config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
sprint_ul.
(ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
(ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
* config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
From-SVN: r258312
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/pa/pa.h | 18 | ||||
-rw-r--r-- | gcc/config/pa/pa64-hpux.h | 14 |
3 files changed, 34 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cf95c7..0d07cdb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-03-06 John David Anglin <danglin@gcc.gnu.org> + + * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use + sprint_ul. + (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change. + (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. + * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above. + 2018-03-06 Jakub Jelinek <jakub@redhat.com> PR target/84710 diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 8717ae6..67b3c71 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1114,8 +1114,18 @@ do { \ PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */ -#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) +#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ + do \ + { \ + char *__p; \ + (LABEL)[0] = '*'; \ + (LABEL)[1] = (PREFIX)[0]; \ + (LABEL)[2] = '$'; \ + __p = stpcpy (&(LABEL)[3], &(PREFIX)[1]); \ + sprint_ul (__p, (unsigned long) (NUM)); \ + } \ + while (0) + /* Output the definition of a compiler-generated label named NAME. */ @@ -1154,14 +1164,14 @@ do { \ /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.word L$%04d\n", VALUE) + fprintf (FILE, "\t.word L$%d\n", VALUE) /* This is how to output an element of a case-vector that is relative. Since we always place jump tables in the text section, the difference is absolute and requires no relocation. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word L$%04d-L$%04d\n", VALUE, REL) + fprintf (FILE, "\t.word L$%d-L$%d\n", VALUE, REL) /* This is how to output an absolute case-vector. */ diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h index 8a94a3e..6f70767 100644 --- a/gcc/config/pa/pa64-hpux.h +++ b/gcc/config/pa/pa64-hpux.h @@ -245,8 +245,18 @@ do { \ /* We need to use the HP style for internal labels. */ #undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ - sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) +#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ + do \ + { \ + char *__p; \ + (LABEL)[0] = '*'; \ + (LABEL)[1] = (PREFIX)[0]; \ + (LABEL)[2] = '$'; \ + __p = stpcpy (&(LABEL)[3], &(PREFIX)[1]); \ + sprint_ul (__p, (unsigned long) (NUM)); \ + } \ + while (0) + #else /* USING_ELFOS_H */ |