From: iains Date: Wed, 23 Oct 2019 05:39:32 +0000 (+0000) Subject: [Darwin, PPC] Check for out of range asm values. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3249bf94c3cbd835c45933206d7ec86584c9c6a3;p=thirdparty%2Fgcc.git [Darwin, PPC] Check for out of range asm values. There are some cases in which the value for the max skip to a p2align directive can be negative. The older assembler just ignores these cases where newer tools produce an error. To preserve behaviour, we avoid emitting out of range values. gcc/ChangeLog: 2019-10-23 Iain Sandoe * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard against out of range max skip or log values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277307 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f3450eea6178..8ec312d7470c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-23 Iain Sandoe + + * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard + against out of range max skip or log values. + 2019-10-22 Giuliano Belinassi * cgraph.c (dump_graphviz): Change name to dump_name diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 1081967bd61f..d1a096f3f1c2 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -329,9 +329,9 @@ /* This is supported in cctools 465 and later. The macro test above prevents using it in earlier build environments. */ #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ - if ((LOG) != 0) \ + if ((LOG) > 0) \ { \ - if ((MAX_SKIP) == 0) \ + if ((MAX_SKIP) <= 0) \ fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ else \ fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \