Lesser used PowerPC instructions

We've been looking recently at some object code from an Ada compiler for the PowerPC e500v2 core. As part of this, we examined the distribution of instruction mnemonics in the code generated by this particular use of the compiler on a suite of example programs. The split by type of instruction is roughly as follows: Interestingly, there aren't as many compare operations as we might otherwise expect. This is because xor tends to be used for this instead.
Read More

What are the implications of multi-core devices on code coverage?

The use of code coverage (also called structural coverage analysis or SCA) when testing safety-critical systems is widely established. For example, in the aerospace domain, the DO-178B/C guidance requires specific types of coverage testing to be carried out. The depth of coverage testing required depends on the system's safety level, with the most critical requiring the use of modified condition/decision coverage (MC/DC).
Read More

Interesting microcontroller features: the PowerPC ISEL instruction

PowerPC (Performance Optimization With Enhanced RISC - Performance Computing) or PPC is totally unrelated to the Intel x86-based PC that most of us know. The Power PC is a RISC instruction set architecture created by the 1991 Apple-IBM-Motorola alliance, known as AIM PowerPC. This becomes instantly obvious to anyone examining the assembly level language. It is, at first sight, somewhat quirky; most assembler programmers can swiftly move from one CPU to another fairly rapidly, the PPC however requires a little more effort.
Read More

Ada, C, rem and mod

Ada has two similar operators, rem and mod. rem is a mathematical remainder in the sense of the remainder of an integer division: (x rem y) + (x div y)*y == x The mod operator, on the other hand, is designed to satisfy a cyclic property across the number line: ∃ n : x mod y + y * n == x (in other words, there is a value of n such that x mod y + y*n == x) To visualize the differences between these operations, look at the below graphs:
Read More