This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch,Microblaze]: Added Break Handler Support


On 05/14/14 02:24, Ajit Kumar Agarwal wrote:
Based on the Feedback, Resubmitting the Updated Patch.

[Patch, MicroBlaze] Add break Handler Support

Added Break Handler support to incorporate the hardware and software break. The Break Handler routine
will be generating the rtbd instruction. At the call point where the software breaks are generated with
the instruction brki with register operand as r16.

I made the following changes:

Your patch:
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 815d6b5..c368c70 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -1945,9 +1945,12 @@
  (define_insn "*<optab>"
    [(any_return)]
    ""
-  {
-    if (microblaze_is_interrupt_variant ())
-        return "rtid\tr14, 0\;%#";
+  {
+    if (microblaze_is_break_handler ())
+        return "rtbd\tr16, 8\;%#";
+    else if (microblaze_is_interrupt_variant ()
+             && (!microblaze_is_break_handler()))

Replaced with:
-  {
-    if (microblaze_is_interrupt_variant ())
-        return "rtid\tr14, 0\;%#";
+  {
+    if (microblaze_is_break_handler ())
+        return "rtbd\tr16, 8\;%#";
+    else if (microblaze_is_interrupt_variant ())
+        return "rtid\tr14, 0\;%#";

Your patch:
@@ -1962,9 +1965,12 @@
    [(any_return)
     (use (match_operand:SI 0 "register_operand" ""))]
    ""
-  {	
-    if (microblaze_is_interrupt_variant ())
-        return "rtid\tr14,0 \;%#";
+  {
+    if (microblaze_is_break_handler ())
+        return "rtbd\tr16,8\;%#";
+    else if (microblaze_is_interrupt_variant ()
+             && (!microblaze_is_break_handler()))
+        return "rtid\tr14,0 \;%#";

Replaced with
-  {	
-    if (microblaze_is_interrupt_variant ())
-        return "rtid\tr14,0 \;%#";
+  {
+    if (microblaze_is_break_handler ())
+        return "rtbd\tr16,8\;%#";
+    else if (microblaze_is_interrupt_variant ())
+        return "rtid\tr14,0 \;%#";

Please remove trailing white space in future patches.

The code in the "call_internal" pattern does not follow GNU indent
conventions.  If you are modifying code which does not follow these
conventions, please bring it up to date, rather than repeating the
indent violations.

Committed revision 210559.

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]