Specifications
5 SUPPORTED H8/300 FEATURES
5.1 Overview
This chapter explains in detail how Bound-T models H8/300 instructions, registers and status
flags. We will first describe the extent of support in general terms, with exceptions listed later.
Note that in addition to the specific limitations for the H8/300, Bound-T also has generic
limitations as described in the Bound-T User Guide [1] and Reference Manual [2]. For
reference, these are briefly listed in section 5.1.
General support level
In general, when Bound-T is analysing a target program for the H8/300, it can decode and
correctly time all instructions, with minor approximations except for the effects of memory
access time.
Bound-T can construct the control-flow graphs and call-graphs for all instructions, assuming
that the program obeys one of the supported procedure calling protocosl listed in chapter 6
and does not change the enabled/disabled state of the on-chip RAM memory while executing
code from this part of the address space. Note that there are generic limitations on the analysis
of jumps and calls that use a dynamically computed target address or a dynamically computed
return address.
When analysing loops to find the loop-counter variables, Bound-T is able to track all the
computations that use unsigned integer values (8 or 16 bit) and additions and subtractions.
However, sequences of 8-bit or 16-bit operations that use carry/borrow bits to build up
arithmetic wider operands are not tracked in general. For example, a 16-bit addition could be
built from an 8-bit ADD.B followed by an 8-bit-with-carry ADDX. Bound-T understands such a
combination only in some special cases as explained in section 5.3.
Bound-T correctly detects when tracked integer computation is overridden by other
computations in the same registers, such as multiplication, division, bit-wise boolean
operations or single-bit operations. Note that there are generic limitations on the analysis of
pointers to counter variables.
Signed integer arithmetic is not completely supported (because of the complexity of the mixed
8/16-bit register set). However, signed arithmetic should be correctly analysed if the loop-
counter values stay in the non-negative range: 0 to 127 for 8-bit counters and 0 to 32 767 for
16-bit counters. See also the option -bcc=signed in section 2.2.
Although arithmetic is usually considered unsigned, Bound-T interprets immediate operands as
signed two's complement numbers, to model decreasing loop counters.
In summary, for a program written in a compiled language such as Ada or C, with a compiler
that uses one of the supported procedure calling standards, and under the restriction that loop
counters are unsigned or use only the non-negative range of a signed intgers, it is unlikely that
the Bound-T user will meet with any constraints or limitations that are specific to the H8/300
target system.
Before detailing the exceptions to the general support, some terminology needs to be defined
concerning the levels of support.
Reminder of generic limitations
To help the reader understand which limitations are specific to the H8/300 architecture, the
following compact list of the generic limitations of Bound-T is presented. See the User Manual
for a full description of the generic limitations.
20 Supported H8/300 Features Bound-T for H8/300