sbv-14.8: SBVTestSuite/GoldFiles/cgUninterpret.gold
== BEGIN: "Makefile" ================
# Makefile for tstShiftLeft. Automatically generated by SBV. Do not edit!
# include any user-defined .mk file in the current directory.
-include *.mk
CC?=gcc
CCFLAGS?=-Wall -O3 -DNDEBUG -fomit-frame-pointer
all: tstShiftLeft_driver
tstShiftLeft.o: tstShiftLeft.c tstShiftLeft.h
${CC} ${CCFLAGS} -c $< -o $@
tstShiftLeft_driver.o: tstShiftLeft_driver.c tstShiftLeft.h
${CC} ${CCFLAGS} -c $< -o $@
tstShiftLeft_driver: tstShiftLeft.o tstShiftLeft_driver.o
${CC} ${CCFLAGS} $^ -o $@ ${LDFLAGS}
clean:
rm -f *.o
veryclean: clean
rm -f tstShiftLeft_driver
== END: "Makefile" ==================
== BEGIN: "tstShiftLeft.h" ================
/* Header file for tstShiftLeft. Automatically generated by SBV. Do not edit! */
#ifndef SBV_GENERATED_tstShiftLeft_HEADER_INCLUDED
#define SBV_GENERATED_tstShiftLeft_HEADER_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
/* Floating-point calling convention:
* Enter generated code in FE_TONEAREST (round-to-nearest, ties-to-even).
* Callbacks must preserve this mode before returning or re-entering.
* Generated code does not check or change the hardware rounding mode.
* Custom builds must disable implicit FP contraction, including at LTO link time.
*/
/* The boolean type */
typedef bool SBool;
/* The float type */
typedef float SFloat;
/* The double type */
typedef double SDouble;
/* Unsigned bit-vectors */
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 tstShiftLeft(const SWord32 *vs);
#endif /* SBV_GENERATED_tstShiftLeft_HEADER_INCLUDED */
== END: "tstShiftLeft.h" ==================
== BEGIN: "tstShiftLeft_driver.c" ================
/* Example driver program for tstShiftLeft. */
/* Automatically generated by SBV. Edit as you see fit! */
#include <stdio.h>
#include "tstShiftLeft.h"
int main(void)
{
const SWord32 sbv_driver_input_0[3] = {
0x00000001UL, 0x00000002UL, 0x00000003UL
};
printf("Contents of input array vs:\n");
int sbv_driver_input_0_ctr;
for(sbv_driver_input_0_ctr = 0; sbv_driver_input_0_ctr < 3 ; ++sbv_driver_input_0_ctr)
{ printf(" vs[%1d] = ", sbv_driver_input_0_ctr);
printf("0x%08"PRIx32"UL", sbv_driver_input_0[sbv_driver_input_0_ctr]);
printf("\n");
}
const SWord32 sbv_result = tstShiftLeft(sbv_driver_input_0);
printf("tstShiftLeft(vs) = 0x%08"PRIx32"UL\n", sbv_result);
return 0;
}
== END: "tstShiftLeft_driver.c" ==================
== BEGIN: "tstShiftLeft.c" ================
/* File: "tstShiftLeft.c". Automatically generated by SBV. Do not edit! */
#include "tstShiftLeft.h"
/* User specified custom code for "SBV_SHIFTLEFT" */
#define SBV_SHIFTLEFT(x, y) ((x) << (y))
/* Exact bit-vector runtime. All arithmetic is modulo the declared width. */
#ifndef SBV_CGEN_UNUSED
#if defined(__GNUC__) || defined(__clang__)
#define SBV_CGEN_UNUSED __attribute__((unused))
#else
#define SBV_CGEN_UNUSED
#endif
#endif
static inline SBV_CGEN_UNUSED SWord32 sbv_bv_u32_add(SWord32 a, SWord32 b)
{
const SWord32 bits = (SWord32) ((((uint64_t) (SWord32) a) + ((uint64_t) (SWord32) b)) & UINT64_C(0x00000000ffffffff));
return (SWord32) bits;
}
SWord32 tstShiftLeft(const SWord32 *sbv_input_0)
{
const SWord32 s0 = sbv_input_0[0];
const SWord32 s1 = sbv_input_0[1];
const SWord32 s2 = sbv_input_0[2];
SWord32 s3;
SWord32 s4;
SWord32 s5;
s3 = /* Uninterpreted function */ SBV_SHIFTLEFT(s0, s2);
s4 = /* Uninterpreted function */ SBV_SHIFTLEFT(s1, s2);
s5 = sbv_bv_u32_add(s3, s4);
return s5;
}
== END: "tstShiftLeft.c" ==================