1、 Reference numberISO/IEC TR 18037:2008(E)ISO/IEC 2008 TECHNICAL REPORT ISO/IECTR18037Second edition2008-06-15Programming languages C Extensions to support embedded processors Langages de programmation C Extensions pour supporter les processeurs intgrs ISO/IEC TR 18037:2008(E)PDF disclaimer This PDF
2、file may contain embedded typefaces.In accordance with Adobes licensing policy,this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing.In downloading this file,parties accept therein the r
3、esponsibility of not infringing Adobes licensing policy.The ISO Central Secretariat accepts no liability in this area.Adobe is a trademark of Adobe Systems Incorporated.Details of the software products used to create this PDF file can be found in the General Info relative to the file;the PDF-creatio
4、n parameters were optimized for printing.Every care has been taken to ensure that the file is suitable for use by ISO member bodies.In the unlikely event that a problem relating to it is found,please inform the Central Secretariat at the address given below.COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2008
5、All rights reserved.Unless otherwise specified,no part of this publication may be reproduced or utilized in any form or by any means,electronic or mechanical,including photocopying and microfilm,without permission in writing from either ISO at the address below or ISOs member body in the country of
6、the requester.ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel.+41 22 749 01 11 Fax +41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org Published in Switzerland ii ISO/IEC 2008 All rights reserved ISO/IEC TR 18037:2008(E)ISO/IEC 2008 All rights reserved iiiContents Page 1 SCOPE.1 2 NO
7、RMATIVE REFERENCES.1 3 CONFORMANCE.1 4 FIXED-POINT ARITHMETIC.2 4.1 Overview and principles of the fixed-point data types.2 4.1.1 The data types.2 4.1.2 Spelling of the new keywords.3 4.1.3 Rounding and Overflow.4 4.1.4 Type conversion,usual arithmetic conversions.5 4.1.5 Fixed-point constants.6 4.1
8、.6 Operations involving fixed-point types.7 4.1.7 Fixed-point functions.9 4.1.8 Fixed-point definitions .11 4.1.9 Formatted I/O functions for fixed-point arguments.11 4.2 Detailed changes to ISO/IEC 9899:1999.12 5 NAMED ADDRESS SPACES AND NAMED-REGISTER STORAGE CLASSES.37 5.1 Overview and principles
9、 of named address spaces.37 5.1.1 Additional address spaces.37 5.1.2 Address-space type qualifiers.37 5.1.3 Address space nesting and rules for pointers.38 5.1.4 Standard library support.39 5.2 Overview and principles of named-register storage classes.39 5.2.1 Access to machine registers.39 5.2.2 Na
10、med-register storage-class specifiers.39 5.2.3 Ensuring correct side effects via objects allocated in registers.41 5.2.4 Relationship between named registers and I/O-register designators.41 5.3 Detailed changes to ISO/IEC 9899:1999.41 6 BASIC I/O HARDWARE ADDRESSING.49 6.1 Rationale.49 6.1.1 Basic S
11、tandardization Objectives.49 6.2 Terminology.49 6.3 Basic I/O Hardware addressing header.51 6.3.1 Standardization principles.51 6.3.2 The abstract model.52 ISO/IEC TR 18037:2008(E)iv ISO/IEC 2008 All rights reserved 6.4 Specifying I/O registers.54 6.4.1 I/O-register designators.54 6.4.2 Accesses to
12、individual I/O registers.54 6.4.3 I/O register buffers.55 6.4.4 I/O groups.56 6.4.5 Direct and indirect designators.56 6.4.6 Operations on I/O groups.57 6.5 Detailed changes to ISO/IEC 9899:1999.58 ANNEX A-FIXED-POINT ARITHMETIC.65 A.1 Fixed-point datatypes.65 A.1.1 Introduction.65 A.2 Number of dat
13、a bits in _Fract versus _Accum.68 A.3 Possible Data Type Implementations.69 A.4 Rounding and Overflow.70 A.5 Type conversions,usual arithmetic conversions.71 A.6 Operations involving fixed-point types.71 A.7 Exception for 1 and 1 Multiplication Results.72 A.8 Linguistic Variables and unsigned _Fract
14、:an example of unsigned fixed-point.73 ANNEX B-NAMED ADDRESS SPACES AND NAMED-REGISTER STORAGE CLASSES.74 B.1 Embedded systems extended memory support.74 B.1.1 Modifiers for named address spaces.74 B.1.2 Application-defined multiple address space support.75 B.1.3 I/O register definition for intrinsi
15、c or user defined address spaces.76 ANNEX C-IMPLEMENTING THE HEADER.78 C.1 General.78 C.1.1 Recommended steps.78 C.1.2 Compiler considerations.78 C.2 Overview of I/O Hardware Connection Options.79 C.2.1 Multi-Addressing and I/O Register Endianness.79 C.2.2 Address Interleaving.80 C.2.3 I/O Connectio
16、n Overview:.81 C.2.4 Generic buffer index.81 C.3 I/O-register designators for different I/O addressing methods.82 C.4 Atomic operation.83 C.5 Read-modify-write operations and multi-addressing cases.83 C.6 I/O initialization.84 C.7 Intrinsic Features for I/O Hardware Access.85 ISO/IEC TR 18037:2008(E)ISO/IEC 2008 All rights reserved vANNEX D-MIGRATION PATH FOR IMPLEMENTATIONS.86 D.1 Migration path for implementations.86 D.2 implementation based on C macros.86 D.2.1 The access specification method