Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Re: [MIPS] Fix handling of trap and breakpoint instructions
       [not found] <S20041689AbYDUAiN/20080421003813Z+6727@ftp.linux-mips.org>
@ 2008-04-21  1:07 ` Atsushi Nemoto
  2008-04-21  9:30   ` Ralf Baechle
  2008-04-21 15:47   ` David Daney
  0 siblings, 2 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2008-04-21  1:07 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

> Author: Ralf Baechle <ralf@linux-mips.org> Sun Apr 20 16:28:54 2008 +0100
> Commit: 5881bb0de64887a60f7f49922cf73a3b4d40fc01
> Gitweb: http://www.linux-mips.org/g/linux/5881bb0d
> Branch: master

You must drop left shift of this line too.

		if (bcode == (BRK_DIVZERO << 10))

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [MIPS] Fix handling of trap and breakpoint instructions
  2008-04-21  1:07 ` [MIPS] Fix handling of trap and breakpoint instructions Atsushi Nemoto
@ 2008-04-21  9:30   ` Ralf Baechle
  2008-04-21 15:47   ` David Daney
  1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2008-04-21  9:30 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips

On Mon, Apr 21, 2008 at 10:07:21AM +0900, Atsushi Nemoto wrote:

> > Author: Ralf Baechle <ralf@linux-mips.org> Sun Apr 20 16:28:54 2008 +0100
> > Commit: 5881bb0de64887a60f7f49922cf73a3b4d40fc01
> > Gitweb: http://www.linux-mips.org/g/linux/5881bb0d
> > Branch: master
> 
> You must drop left shift of this line too.
> 
> 		if (bcode == (BRK_DIVZERO << 10))

Sigh, damn code duplication.  Will fix and cleanup.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [MIPS] Fix handling of trap and breakpoint instructions
  2008-04-21  1:07 ` [MIPS] Fix handling of trap and breakpoint instructions Atsushi Nemoto
  2008-04-21  9:30   ` Ralf Baechle
@ 2008-04-21 15:47   ` David Daney
  2008-04-21 16:12     ` Ralf Baechle
  1 sibling, 1 reply; 4+ messages in thread
From: David Daney @ 2008-04-21 15:47 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips, ralf

Atsushi Nemoto wrote:
>> Author: Ralf Baechle <ralf@linux-mips.org> Sun Apr 20 16:28:54 2008 +0100
>> Commit: 5881bb0de64887a60f7f49922cf73a3b4d40fc01
>> Gitweb: http://www.linux-mips.org/g/linux/5881bb0d
>> Branch: master
> 
> You must drop left shift of this line too.
> 
> 		if (bcode == (BRK_DIVZERO << 10))
> 

Note that there has been some confusion about break codes in gas over 
the years.  Ancient versions (I am not sure which) generated different 
break codes than recent versions.

Before changing it make sure that you don't break existing user space code.

One problem (fixed around 2.4.25 or so) was the integer division by zero 
in user space would result in SIGTRAP instead of SIGFPE.   If you change 
the break code handling you should verify that you don't break this.

David Daney

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [MIPS] Fix handling of trap and breakpoint instructions
  2008-04-21 15:47   ` David Daney
@ 2008-04-21 16:12     ` Ralf Baechle
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2008-04-21 16:12 UTC (permalink / raw)
  To: David Daney; +Cc: Atsushi Nemoto, linux-mips

On Mon, Apr 21, 2008 at 08:47:52AM -0700, David Daney wrote:

> Note that there has been some confusion about break codes in gas over the 
> years.  Ancient versions (I am not sure which) generated different break 
> codes than recent versions.
>
> Before changing it make sure that you don't break existing user space code.
>
> One problem (fixed around 2.4.25 or so) was the integer division by zero in 
> user space would result in SIGTRAP instead of SIGFPE.   If you change the 
> break code handling you should verify that you don't break this.

Not quite correct.  Very old and recent binutils are bug compatible.  It's
middle age gcc which unfortunately fixed the bug creating a bug ;-)

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-21 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <S20041689AbYDUAiN/20080421003813Z+6727@ftp.linux-mips.org>
2008-04-21  1:07 ` [MIPS] Fix handling of trap and breakpoint instructions Atsushi Nemoto
2008-04-21  9:30   ` Ralf Baechle
2008-04-21 15:47   ` David Daney
2008-04-21 16:12     ` Ralf Baechle

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