# HG changeset patch # User David du Colombier <0intro@gmail.com> # Date 1332924095 -7200 # Node ID 37ca23c2c31d9b8bffc6651ac9e6bfc04d412990 # Parent 07315b1847057217a064979ab04706695d5ee66a nix: sync with plan 9 R=nixiedev, nemo CC=nix-dev http://codereview.appspot.com/5902050 Committer: Francisco J Ballesteros diff -r 07315b184705 -r 37ca23c2c31d sys/src/9/kw/trap.c --- a/sys/src/9/kw/trap.c Sat Mar 24 15:26:59 2012 +0100 +++ b/sys/src/9/kw/trap.c Wed Mar 28 10:41:35 2012 +0200 @@ -214,6 +214,7 @@ iprint("spurious irq%s interrupt: %8.8lux\n", irq.name, ibits); s = splfhi(); *irq.irq &= ibits; + *irq.irqmask &= ~ibits; splx(s); } } @@ -479,16 +480,22 @@ break; case PsrMund: /* undefined instruction */ if(user){ - /* look for floating point instructions to interpret */ - x = spllo(); - rv = fpiarm(ureg); - splx(x); - if(rv == 0){ - ldrexvalid = 0; - snprint(buf, sizeof buf, - "undefined instruction: pc %#lux", - ureg->pc); + if(seg(up, ureg->pc, 0) != nil && + *(u32int*)ureg->pc == 0xD1200070){ + snprint(buf, sizeof buf, "sys: breakpoint"); postnote(up, 1, buf, NDebug); + }else{ + /* look for floating point instructions to interpret */ + x = spllo(); + rv = fpiarm(ureg); + splx(x); + if(rv == 0){ + ldrexvalid = 0; + snprint(buf, sizeof buf, + "undefined instruction: pc %#lux", + ureg->pc); + postnote(up, 1, buf, NDebug); + } } }else{ iprint("undefined instruction: pc %#lux inst %#ux\n", diff -r 07315b184705 -r 37ca23c2c31d sys/src/9/omap/trap.c --- a/sys/src/9/omap/trap.c Sat Mar 24 15:26:59 2012 +0100 +++ b/sys/src/9/omap/trap.c Wed Mar 28 10:41:35 2012 +0200 @@ -573,16 +573,22 @@ break; case PsrMund: /* undefined instruction */ if(user){ - /* look for floating point instructions to interpret */ - x = spllo(); - rv = fpiarm(ureg); - splx(x); - if(rv == 0){ - ldrexvalid = 0; - snprint(buf, sizeof buf, - "undefined instruction: pc %#lux\n", - ureg->pc); + if(seg(up, ureg->pc, 0) != nil && + *(u32int*)ureg->pc == 0xD1200070){ + snprint(buf, sizeof buf, "sys: breakpoint"); postnote(up, 1, buf, NDebug); + }else{ + /* look for floating point instructions to interpret */ + x = spllo(); + rv = fpiarm(ureg); + splx(x); + if(rv == 0){ + ldrexvalid = 0; + snprint(buf, sizeof buf, + "undefined instruction: pc %#lux\n", + ureg->pc); + postnote(up, 1, buf, NDebug); + } } }else{ if (ureg->pc & 3) { diff -r 07315b184705 -r 37ca23c2c31d sys/src/libc/arm/vlrt.c --- a/sys/src/libc/arm/vlrt.c Sat Mar 24 15:26:59 2012 +0100 +++ b/sys/src/libc/arm/vlrt.c Wed Mar 28 10:41:35 2012 +0200 @@ -15,7 +15,7 @@ void abort(void); -/* needed by profiler (notably ../port/profile.c); can't be profiled */ +/* needed by profiler; can't be profiled */ #pragma profile off void @@ -128,8 +128,8 @@ return _v2d(x); } - -#pragma profile off /* needed by profiler; can't be profiled */ +/* too many of these are also needed by profiler; leave them out */ +#pragma profile off static void dodiv(Vlong num, Vlong den, Vlong *q, Vlong *r) @@ -203,8 +203,6 @@ dodiv(n, d, q, 0); } -#pragma profile on - void _modvu(Vlong *r, Vlong n, Vlong d) { @@ -217,8 +215,6 @@ dodiv(n, d, 0, r); } -#pragma profile off /* needed by profiler; can't be profiled */ - static void vneg(Vlong *v) { @@ -252,9 +248,6 @@ vneg(q); } -#pragma profile on - - void _modv(Vlong *r, Vlong n, Vlong d) { @@ -512,7 +505,6 @@ ret->hi = t >> 31; } -#pragma profile off /* needed by profiler; can't be profiled */ void _ul2v(Vlong *ret, ulong ul) @@ -524,8 +516,6 @@ ret->hi = 0; } -#pragma profile on - void _si2v(Vlong *ret, int si) { @@ -618,8 +608,6 @@ return rv.lo & 0xffff; } -#pragma profile off /* needed by profiler; can't be profiled */ - long _v2sl(Vlong rv) { @@ -634,8 +622,6 @@ return rv.lo; } -#pragma profile on - long _v2si(Vlong rv) { @@ -662,16 +648,12 @@ return lv.lo == rv.lo && lv.hi == rv.hi; } -#pragma profile off /* needed by profiler; can't be profiled */ - int _nev(Vlong lv, Vlong rv) { return lv.lo != rv.lo || lv.hi != rv.hi; } -#pragma profile on - int _ltv(Vlong lv, Vlong rv) {