To create COM binary executables for both Sim286 and Sim386, we use the Borland 4.5 C compiler to produce 8086 assembly code. The 8086 assembly code is assembled using Wolfware Assembler, or WASM[9], to create an executable COM file. To create ELF binary executables for Sim386, we use the gcc C compiler version 2.7.2.3 with O2 optimizations.
The test programs listed in column one of the table in Figure 4.1 include a program to compute Fibonacci numbers, fibbk; a program that uses Gaussian elimination without pivoting, gauss[10]; an insertion sort, isort; the first Livermore loop, livermore[5]; matrix multiplication, matmult[10]; a program to transform a matrix into Hermite normal form, normal[10]; the sieve of Erosthothenes, sieve; a program that uses tiling to optimize data cache references, tiling[2]; and a program to perform matrix transposition, transpose.
![]() |
Our experiments indicate that for COM file input, Sim286 is, on average, 2.06 percent faster than Sim386 when using the test suite of nine programs. Additional logic is included in Sim386 to check for operand size during processing. Sim386 now includes an additional check for 32-bit operands; this check is not a part of Sim286.
The table in Figure 4.1 also indicates that six of the nine programs slow down for ELF binary input and the three others are faster. For example, gauss, matmult, normal, sieve, tiling and transpose slow down when ELF binary input is used. Of these six programs. sieve uses a one-dimensional array and the other five programs use two-dimensional arrays. When performing array computations the SIB byte is used heavily by the gcc compiler. Sim386, in determining the additional addressing modes provided by the SIB byte, requires more time when simulated in software but is more efficient when executed in hardware. Thus, for the test suite, those programs that make heavy use of array computations are slower when they accept ELF binary input.