mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Stephan Linz <linz@li-pro.net>
To: ptxdist@pengutronix.de
Cc: m.olbrich@pengutronix.de
Subject: [ptxdist] [PATCH] [Machine.make] keep r31 reserved on Microblaze
Date: Sat,  3 Dec 2011 20:53:55 +0100	[thread overview]
Message-ID: <1322942035-2202-1-git-send-email-linz@li-pro.net> (raw)

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

                 reply	other threads:[~2011-12-03 19:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322942035-2202-1-git-send-email-linz@li-pro.net \
    --to=linz@li-pro.net \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox