source: rtems-tools/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt @ 3e187ba

5
Last change on this file since 3e187ba was 3e187ba, checked in by Cillian O'Donnell <cpodonnell8@…>, on 04/25/18 at 20:33:58

covoar: Add symbol set reader and ELF data parser to covoar.

Add ability to organize symbol sets of libraries in INI file
and then read them with covoar and load the symbols directly from the
libraries.

rtems-tools/../testing: Add configuration files for coverage analysis.

A number of covoar options are not required and are defaulted.

Co-author: Krzysztof Miesowicz <krzysztof.miesowicz@…>
Co-author: Vijay Kumar Banerjee <vijaykumar9597@…>
Co-author: Chris Johns <chrisj@…>

  • Property mode set to 100644
File size: 1.9 KB
Line 
1The SPARC assembly is often hard to understand because a single
2instruction will show up as not executed.  The instructions before
3and after it will be marked as executed.  The instruction before
4the one not executed should be a "bxx,a" instruction which means
5that the instruction following the branch instruction is executed
6ONLY if the branch is taken.  Otherwise it is "annulled" or skipped.
7
8So when you see these cases, it means the branch was NOT taken.
9
10===================================================================
11Subject: <offlist> annul slot explanation
12From: Jiri Gaisler <jiri@gaisler.com>
13Date: Wed, 3 Jun 2009 14:57:48 -0500
14To: Joel Sherrill <Joel.Sherrill@OARcorp.com>
15
16
17Joel Sherrill wrote:
18> > Hi,
19> >
20> > I am trying to look at more coverage cases and
21> > wanted to make sure I am reading things correctly.
22> >
23> > The code in question is:
24> >
25> >
26> >      if ( the_thread->current_priority > interested_priority )
27> > 200fd00:    d8 00 e0 14     ld  [ %g3 + 0x14 ], %o4
28> > 200fd04:    80 a3 00 04     cmp  %o4, %g4
29> > 200fd08:    38 80 00 1c     bgu,a   200fd78 <killinfo+0x224>
30> > 200fd0c:    98 10 00 04     mov  %g4,
31> > %o4                                            <== NOT EXECUTED
32> >
33> >      /*
34> >       *  If this thread is not interested, then go on to the next thread.
35> >       */
36> >
37> >      api = the_thread->API_Extensions[ THREAD_API_POSIX ];
38> > 200fd10:    d4 00 e1 6c     ld  [ %g3 + 0x16c ], %o2
39> >
40> > Am I correct in interpreting this as meaning 0x200fd0c
41> > is not executed because the bgu,a is never taken. And it
42> > is not executed as part of falling through.
43
44Yes, this is correct. The branch delay slot is only executed
45when the branch is taken.
46
47Jiri.
48
49> >
50> > So in this case we need a test where the "if" condition
51> > is true if I am reading things correctly.
52> >
53> > Thanks.  There are a number of these 4 byte cases which
54> > are probably easy to hit if I read the code correctly.
55> >
56> >
Note: See TracBrowser for help on using the repository browser.