mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] [Machine.make] keep r31 reserved on Microblaze
@ 2011-12-03 19:53 Stephan Linz
  0 siblings, 0 replies; only message in thread
From: Stephan Linz @ 2011-12-03 19:53 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich

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 <linz@li-pro.net>
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-03 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-03 19:53 [ptxdist] [PATCH] [Machine.make] keep r31 reserved on Microblaze Stephan Linz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox