sbv-0.9.13: SBVUnitTest/GoldFiles/fib2.gold
== BEGIN: "Makefile" ================
# Makefile for fib2. Automatically generated by SBV. Do not edit!
CC=gcc
CCFLAGS=-Wall -O3 -DNDEBUG -fomit-frame-pointer
all: fib2_driver
fib2.o: fib2.c fib2.h
${CC} ${CCFLAGS} -c fib2.c -o fib2.o
fib2_driver.o: fib2_driver.c
${CC} ${CCFLAGS} -c fib2_driver.c -o fib2_driver.o
fib2_driver: fib2.o fib2_driver.o
${CC} ${CCFLAGS} fib2.o fib2_driver.o -o fib2_driver
clean:
rm -f fib2_driver.o fib2.o
veryclean: clean
rm -f fib2_driver
== END: "Makefile" ==================
== BEGIN: "fib2.h" ================
/* Header file for fib2. Automatically generated by SBV. Do not edit! */
#ifndef __fib2__HEADER_INCLUDED__
#define __fib2__HEADER_INCLUDED__
#include <inttypes.h>
#include <stdint.h>
/* Unsigned bit-vectors */
typedef uint8_t SBool ;
typedef uint8_t SWord8 ;
typedef uint16_t SWord16;
typedef uint32_t SWord32;
typedef uint64_t SWord64;
/* Signed bit-vectors */
typedef int8_t SInt8 ;
typedef int16_t SInt16;
typedef int32_t SInt32;
typedef int64_t SInt64;
/* Entry point prototype: */
SWord32 fib2(const SWord32 n);
#endif /* __fib2__HEADER_INCLUDED__ */
== END: "fib2.h" ==================
== BEGIN: "fib2_driver.c" ================
/* Example driver program for fib2. */
/* Automatically generated by SBV. Edit as you see fit! */
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include "fib2.h"
int main(void)
{
const SWord32 out0 = fib2(0x00000014UL);
printf("fib2(0x00000014UL) = 0x%08"PRIx32"UL\n", out0);
return 0;
}
== END: "fib2_driver.c" ==================
== BEGIN: "fib2.c" ================
/* File: "fib2.c". Automatically generated by SBV. Do not edit! */
#include <inttypes.h>
#include <stdint.h>
#include "fib2.h"
SWord32 fib2(const SWord32 n)
{
const SWord32 s0 = n;
static const SWord32 table0[] = {
0x00000000UL, 0x00000001UL, 0x00000001UL, 0x00000002UL,
0x00000003UL, 0x00000005UL, 0x00000008UL, 0x0000000dUL,
0x00000015UL, 0x00000022UL, 0x00000037UL, 0x00000059UL,
0x00000090UL, 0x000000e9UL, 0x00000179UL, 0x00000262UL,
0x000003dbUL, 0x0000063dUL, 0x00000a18UL, 0x00001055UL,
0x00001a6dUL, 0x00002ac2UL, 0x0000452fUL, 0x00006ff1UL,
0x0000b520UL, 0x00012511UL, 0x0001da31UL, 0x0002ff42UL,
0x0004d973UL, 0x0007d8b5UL, 0x000cb228UL, 0x00148addUL,
0x00213d05UL, 0x0035c7e2UL, 0x005704e7UL, 0x008cccc9UL,
0x00e3d1b0UL, 0x01709e79UL, 0x02547029UL, 0x03c50ea2UL,
0x06197ecbUL, 0x09de8d6dUL, 0x0ff80c38UL, 0x19d699a5UL,
0x29cea5ddUL, 0x43a53f82UL, 0x6d73e55fUL, 0xb11924e1UL,
0x1e8d0a40UL, 0xcfa62f21UL, 0xee333961UL, 0xbdd96882UL,
0xac0ca1e3UL, 0x69e60a65UL, 0x15f2ac48UL, 0x7fd8b6adUL,
0x95cb62f5UL, 0x15a419a2UL, 0xab6f7c97UL, 0xc1139639UL,
0x6c8312d0UL, 0x2d96a909UL, 0x9a19bbd9UL, 0xc7b064e2UL,
0x61ca20bbUL
};
const SWord32 s65 = s0 >= 65 ? 0x00000000UL : table0[s0];
return s65;
}
== END: "fib2.c" ==================