Main Content

Custom Processor Details

Specify the sizes of fundamental data types and underlying types of standard typedefs for a custom processor

Since R2023b

Description

This page describes an option in the Polyspace Platform (Polyspace Test) user interface. For the equivalent option in the standard Polyspace® user interface, see Generic target options.

For a custom processor, specify the size of fundamental data types, signedness of char, alignment of structures, and underlying types of wchar_t, size_t, and ptrdiff_t.

Set Option

User interface (Polyspace Platform, desktop products only): To add a custom processor:

  1. Open the configuration settings by clicking the Configuration button on the toolstrip.

  2. Locate the Processor field in the Target & Compiler node of the Build tab.

  3. Click toothed gear button near the option to open the Manage Processors window.

  4. In the Manage Processors window, click Add a processor. Select Custom as the manufacturer.

  5. Set a processor name and click Add.

  6. Click edit button to open the Edit Processor window.

  7. Specify custom processor details in the window.

Command line: To specify a custom target in the command line, use options such as Target processor type (-target) or -custom-target.

Why Use This Option

Use this option to define custom processors with specific alignment, word length, and endianness. If Polyspace does not support a specific processor, you can design your required processor using this option.

Settings

This table lists the properties of a processor that you can specify.

SpecificationValue

Size of char in bits

You enter a numerical values in text boxes. Example of value include 8,16,32,64.
Plain char is signed

  • char types are signed.

  • char types are unsigned.

Size of shortYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of intYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of longYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of long longYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of floatYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of doubleYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of long doubleYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
Size of pointerYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64.
AlignmentThis field represent the maximum alignment of integer types. Example values include 32 or 64.
Minimum alignment of structuresStructures are stored in memory in blocks. The size of these blocks is the alignment of the structure. This option specifies the minimum value of alignment for variables of type struct or union. You enter a numerical value in a text box. Example of value include 4, 8.
Native word sizeYou enter a numerical values in text boxes. Example of value include 8,16, 32, or 64. This value indicates the number of bits that the processor can process at a time.
Byte OrderingSpecify the endianness of the custom processor. From the drop down menu, select one of Unspecified, Little endian, or Big endian.
Type of wchar_t

Specify the underlying type for wchar_t. From the drop down menu, select one of:

  • defined by compiler

  • signed short

  • unsigned short

  • signed int

  • unsigned int

  • signed long

  • unsigned long

You define the bit length of these types in the same window.

Underlying type of enum

Specify the underlying type for enum. From the drop down menu, select one of:

  • defined by compiler — Polyspace uses signed int as the underlying type of enums for all compilers except gnu, clang and tasking.

    For the gnu and clang compilers, Polyspace uses the first type that can hold all of the enumerator values from this list: unsigned int, signed int, unsigned long, signed long, unsigned long long and signed long long.

    For the tasking compiler, Polyspace uses the first type that can hold all of the enumerator values from this list: char, unsigned char, short, unsigned short, int, and unsigned int.

  • auto-signed-first — Polyspace uses the first type that can hold all of the enumerator values from this list: signed char, unsigned char, signed short, unsigned short, signed int, unsigned int, signed long, unsigned long, signed long long, and unsigned long long.

  • auto-unsigned-first — Polyspace uses the first type that can hold all of the enumerator values from this list:

    • For positive enumerator values: unsigned char, unsigned short, unsigned int, unsigned long, and unsigned long long.

    • For negative enumerator values: signed char, signed short, signed int, signed long, and signed long long.

Type of size_t

Specify the underlying type for size_t. From the drop down menu, select one of:

  • defined by compiler

  • unsigned char

  • unsigned short

  • unsigned int

  • unsigned long

  • unsigned long long

You define the bit length of these types in the same window.

In the command line, use the option (-size-t-type-is):

polyspace-bug-finder -size-t-type-is unsigned-long

Type of ptrdiff_t

Specify the underlying type for ptrdiff_t. From the drop down menu, select one of:

  • defined by compiler

  • signed char

  • short

  • int

  • long

  • long long

You define the bit length of these types in the same window.

Support long longIf the custom processor, supports the type long long, select this checkbox. Otherwise, keep the check box empty.

Version History

Introduced in R2023b