Commit 65a4795f by Iain Sandoe Committed by Iain Sandoe

[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  <iain@sandoe.co.uk>

	* config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard
	against out of range max skip or log values.

From-SVN: r277307
parent a4edda8c
2019-10-23 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard
against out of range max skip or log values.
2019-10-22 Giuliano Belinassi <giuliano.belinassi@usp.br> 2019-10-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
* cgraph.c (dump_graphviz): Change name to dump_name * cgraph.c (dump_graphviz): Change name to dump_name
...@@ -329,9 +329,9 @@ ...@@ -329,9 +329,9 @@
/* This is supported in cctools 465 and later. The macro test /* This is supported in cctools 465 and later. The macro test
above prevents using it in earlier build environments. */ above prevents using it in earlier build environments. */
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ #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)); \ fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else \ else \
fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment