There is nothing in the arm architecture that

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ndent in order to allow a machine to use its most efficient size. The dialect of the 'C' language defined by the American National Standards Institute (ANSI), and therefore known as 'ANSI standard C' or simply 'ANSI C', defines the following basic data types: Signed and unsigned characters of at least eight bits. Signed and unsigned short integers of at least 16 bits. Signed and unsigned integers of at least 16 bits. Signed and unsigned long integers of at least 32 bits. Floating-point, double and long double floating-point numbers. Enumerated types. Bitfields. The ARM C compiler adopts the minimum sizes for each of these types except the standard integer, where it uses 32-bit values since this is the most frequently used data type and the ARM supports 32-bit operations more efficiently than 16-bit operations. Enumerated types (where variables have one value out of a specified set of possible values) are implemented as the smallest integer type with the necessary range of values. Bitfield types (sets of Boolean variables) are implemented within integers; several may share one integer, with the first declared holding the lowest bit position, but may not straddle word boundaries. High-level languages ANSI C basic data types ANSI C derived data types In addition, the ANSI C standard defines derived data types: Arrays of several objects of the same type. Functions which return an object of a given type. Structures containing a sequence of objects of various types. Pointers (which are usually machine addresses) to objects of a given type. 158 Architectural Support for High-Level Languages Unions which allow objects of different types to occupy the same space at different times. ARM pointers are 32 bits long (the size of ARM native addresses) and resemble unsigned integers, though note that they obey different arithmetic rules. The ARM C compiler aligns characters on byte boundaries (that is, at the next available address), short integers at even addresses and all other types on word boundaries. A structure always starts on a word boundary with the first-named component, then subsequent compo...
View Full Document

This document was uploaded on 10/30/2011 for the course CSE 378 380 at SUNY Buffalo.

Ask a homework question - tutors are online