RE: [PATCH]Microblaze: Modified trap instruction

2020-04-05 Thread Nagaraju Mekala
> -Original Message-
> From: Jeff Law 
> Sent: Sunday, April 5, 2020 9:36 PM
> To: Michael Eager ; Nagaraju Mekala
> ; gcc-patches@gcc.gnu.org
> Cc: Sadanand Mutyala 
> Subject: Re: [PATCH]Microblaze: Modified trap instruction
> 
> On Sat, 2020-04-04 at 11:15 -0700, Michael Eager wrote:
> > OK to apply.
Thank you.
> >
> > On 4/4/20 1:59 AM, Nagaraju Mekala wrote:
> > > Hello All,
> > >
> > >  There is a bug in trap instruction generation.
> > >  Instead of "bri 0" instruction "brki r0, -1" was used, corrected it 
> > > now.
> > >
> > >  ChangeLog:
> > >  2020-04-04 Nagaraju Mekala 
> > >
> > >  * gcc/config/microblaze/microblaze.md
> > >  (trap): update in the pattern
> > >  * gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
> > >  (dg-final): update in the scan-assembler instruction
> I fixed up nits in the ChangeLog and committed the patch on Nagaraju's
> behalf.
Thank you.
- Nagaraju
>
> jeff
> > >



Re: [PATCH]Microblaze: Modified trap instruction

2020-04-05 Thread Jeff Law via Gcc-patches
On Sat, 2020-04-04 at 11:15 -0700, Michael Eager wrote:
> OK to apply.
> 
> On 4/4/20 1:59 AM, Nagaraju Mekala wrote:
> > Hello All,
> > 
> >  There is a bug in trap instruction generation.
> >  Instead of "bri 0" instruction "brki r0, -1" was used, corrected it 
> > now.
> >  
> >  ChangeLog:
> >  2020-04-04 Nagaraju Mekala 
> >  
> >  * gcc/config/microblaze/microblaze.md
> >  (trap): update in the pattern
> >  * gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
> >  (dg-final): update in the scan-assembler instruction
I fixed up nits in the ChangeLog and committed the patch on Nagaraju's behalf.

jeff
> > 



Re: [PATCH]Microblaze: Modified trap instruction

2020-04-04 Thread Michael Eager

OK to apply.

On 4/4/20 1:59 AM, Nagaraju Mekala wrote:

Hello All,

 There is a bug in trap instruction generation.
 Instead of "bri 0" instruction "brki r0, -1" was used, corrected it now.
 
 ChangeLog:

 2020-04-04 Nagaraju Mekala 
 
 * gcc/config/microblaze/microblaze.md

 (trap): update in the pattern
 * gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
 (dg-final): update in the scan-assembler instruction
 
 Signed-off-by :Nagaraju Mekala 


diff --git a/gcc/config/microblaze/microblaze.md 
b/gcc/config/microblaze/microblaze.md
index 1970cc6..7049acd 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -2303,7 +2303,7 @@
  (define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
""
-  "brki\tr0,-1"
+  "bri\t0"
   [(set_attr "type" "trap")]
  )
  
diff --git a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c

index fdcde1f..580b4db 100644
--- a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
+++ b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
@@ -5,4 +5,4 @@ void trap ()
__builtin_trap ();
  }
  
-/* { dg-final { scan-assembler "brki\tr0,-1" } } */

\ No newline at end of file
+/* { dg-final { scan-assembler "bri\t0" } } */

Attached is the patch.

Thanks
Nagaraju



--
Michael Eagerea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306


[PATCH]Microblaze: Modified trap instruction

2020-04-04 Thread Nagaraju Mekala
Hello All,

There is a bug in trap instruction generation.
Instead of "bri 0" instruction "brki r0, -1" was used, corrected it now.

ChangeLog:
2020-04-04 Nagaraju Mekala 

* gcc/config/microblaze/microblaze.md
(trap): update in the pattern
* gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
(dg-final): update in the scan-assembler instruction

Signed-off-by :Nagaraju Mekala 

diff --git a/gcc/config/microblaze/microblaze.md 
b/gcc/config/microblaze/microblaze.md
index 1970cc6..7049acd 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -2303,7 +2303,7 @@
 (define_insn "trap"
   [(trap_if (const_int 1) (const_int 0))]
   ""
-  "brki\tr0,-1"
+  "bri\t0"
  [(set_attr "type" "trap")]
 )
 
diff --git a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c 
b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
index fdcde1f..580b4db 100644
--- a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
+++ b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
@@ -5,4 +5,4 @@ void trap ()
   __builtin_trap ();
 }
 
-/* { dg-final { scan-assembler "brki\tr0,-1" } } */
\ No newline at end of file
+/* { dg-final { scan-assembler "bri\t0" } } */

Attached is the patch.

Thanks
Nagaraju


0001-Patch-Microblaze-Modified-trap-instruction.patch
Description: 0001-Patch-Microblaze-Modified-trap-instruction.patch