From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Stephan Linz Date: Sat, 3 Dec 2011 20:53:55 +0100 Message-Id: <1322942035-2202-1-git-send-email-linz@li-pro.net> Subject: [ptxdist] [PATCH] [Machine.make] keep r31 reserved on Microblaze Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: m.olbrich@pengutronix.de The Microblaze register r31 holds current-give me pointer to task, generated code should never refer to it. In common cases that is not a problem. For debugging purposes it is better to keep unused. Signed-off-by: Stephan Linz --- rules/pre/Machine.make | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rules/pre/Machine.make b/rules/pre/Machine.make index c0419c3..694b0c7 100644 --- a/rules/pre/Machine.make +++ b/rules/pre/Machine.make @@ -53,7 +53,7 @@ ifdef PTXCONF_ARCH_MICROBLAZE CPUFLAGS-$(PTXCONF_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare ifdef PTXCONF_HAS_HARDFLOAT - # XILINX_MICROBLAZE0_USE_FPU can be 0 (NONE), 1 (BASIC), or 2 (EXTENDED) + # XILINX_MICROBLAZE0_USE_FPU can be 0 (NONE), 1 (BASIC), or 2 (EXTENDED) CPUFLAGS-$(PTXCONF_XILINX_MICROBLAZE0_USE_FPU) += -mhard-float CPUFLAGS-$(subst 1,,$(PTXCONF_XILINX_MICROBLAZE0_USE_FPU)) += -mxl-float-convert CPUFLAGS-$(subst 1,,$(PTXCONF_XILINX_MICROBLAZE0_USE_FPU)) += -mxl-float-sqrt @@ -61,7 +61,9 @@ ifdef PTXCONF_ARCH_MICROBLAZE CPUFLAGS-1 += -mcpu=v$(CPU_VER) - CPUFLAGS := $(CPUFLAGS-1) $(CPUFLAGS-2) + # r31 holds current-give me pointer to task, + # generated code should never refer to it + CPUFLAGS := -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) PTXCONF_TARGET_EXTRA_CFLAGS += $(CPUFLAGS) PTXCONF_TARGET_EXTRA_CXXFLAGS += $(CPUFLAGS) -- 1.7.0.4 -- ptxdist mailing list ptxdist@pengutronix.de