packages feed

sbv-14.8: SBVTestSuite/GoldFiles/selChecked.gold

== BEGIN: "Makefile" ================
# Makefile for selChecked. 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: selChecked_driver

selChecked.o: selChecked.c selChecked.h
	${CC} ${CCFLAGS} -c $< -o $@

selChecked_driver.o: selChecked_driver.c selChecked.h
	${CC} ${CCFLAGS} -c $< -o $@

selChecked_driver: selChecked.o selChecked_driver.o
	${CC} ${CCFLAGS} $^ -o $@ ${LDFLAGS}

clean:
	rm -f *.o

veryclean: clean
	rm -f selChecked_driver
== END: "Makefile" ==================
== BEGIN: "selChecked.h" ================
/* Header file for selChecked. Automatically generated by SBV. Do not edit! */

#ifndef SBV_GENERATED_selChecked_HEADER_INCLUDED
#define SBV_GENERATED_selChecked_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: */
SWord8 selChecked(const SWord8 x);

#endif /* SBV_GENERATED_selChecked_HEADER_INCLUDED */
== END: "selChecked.h" ==================
== BEGIN: "selChecked_driver.c" ================
/* Example driver program for selChecked. */
/* Automatically generated by SBV. Edit as you see fit! */

#include <stdio.h>
#include "selChecked.h"

int main(void)
{
  const SWord8 sbv_result = selChecked(65);

  printf("selChecked(65) = %"PRIu8"\n", sbv_result);

  return 0;
}
== END: "selChecked_driver.c" ==================
== BEGIN: "selChecked.c" ================
/* File: "selChecked.c". Automatically generated by SBV. Do not edit! */

#include "selChecked.h"

/* 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 SWord8 sbv_bv_u8_add(SWord8 a, SWord8 b)
{
  const SWord8 bits = (SWord8) ((((uint64_t) (SWord8) a) + ((uint64_t) (SWord8) b)) & UINT64_C(0x00000000000000ff));
  return (SWord8) bits;
}


SWord8 selChecked(const SWord8 sbv_input_0)
{
  const SWord8 s0 = sbv_input_0;
  const SWord8 s3 = sbv_bv_u8_add(s0, 2);
        SWord8 s5;
  const SWord8 table0[] = {
       1, s3
  };
  s5 = s0 >= 2 ? 3 : table0[s0];

  return s5;
}
== END: "selChecked.c" ==================