From 8e87c176a78af64eccaa55879c31d878fe416d88 Mon Sep 17 00:00:00 2001 From: aoliva Date: Wed, 22 Aug 2018 03:48:00 +0000 Subject: [PATCH] rs6000 small data: add note on sdata2/r2 for gcc/ChangeLog * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add a comment about how uses of r2 for .sdata2 come about. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263760 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cff5160cdc..04542dc5ca8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-08-22 Alexandre Oliva + + * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add + a comment about how uses of r2 for .sdata2 come about. + 2018-08-22 Alexandre Oliva * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 97b922fa7f4..252d197a746 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20349,6 +20349,9 @@ rs6000_output_function_entry (FILE *file, const char *fname) /* Print an operand. Recognize special options, documented below. */ #if TARGET_ELF +/* Access to .sdata2 through r2 (see -msdata=eabi in invoke.texi) is + only introduced by the linker, when applying the sda21 + relocation. */ #define SMALL_DATA_RELOC ((rs6000_sdata == SDATA_EABI) ? "sda21" : "sdarel") #define SMALL_DATA_REG ((rs6000_sdata == SDATA_EABI) ? 0 : 13) #else -- 2.11.4.GIT