Accelerator Manual Data Alignment Addendum Abstract This document is for application programmers familiar with HP NonStop servers and the HP NonStop Kernel operating system. It documents the data alignment requirements of all TNS compilers and the Accelerator. It also describes misalignment diagnostic tools added in G06.17. Product Version NonStop Kernel G06.17 Subsystem Control Facility G06.17 Supported Release Version Updates (RVUs) This document supports G06.
Document History Part Number Product Version 524963-001 NonStop Kernel G06.17 Subsystem Control Facility G06.
Accelerator Manual Data Alignment Addendum Glossary Index Tables What’s New in This Guide iii Guide Information iii New and Changed Information About This Guide v Audience v Related Reading v Your Comments Invited Abbreviations vi iii vi 1. Introduction 2. Misalignment Tracing Facility 3. Misalignment Handling 4. Misalignments in TNS and Accelerated Modes Glossary Index Tables Table 3-1.
Contents Accelerator Manual Data Alignment Addendum— 524963-001 ii
What’s New in This Guide Guide Information Accelerator Manual Data Alignment Addendum Abstract This document is for application programmers familiar with HP NonStop servers and the HP NonStop Kernel operating system. It documents the data alignment requirements of all TNS compilers and the Accelerator. It also describes misalignment diagnostic tools added in G06.17. Product Version NonStop Kernel G06.17 Subsystem Control Facility G06.17 Supported Release Version Updates (RVUs) This document supports G06.
What’s New in This Guide New and Changed Information Accelerator Manual Data Alignment Addendum— 524963-001 iv
About This Guide • • • • Audience on page v Related Reading on page v Your Comments Invited on page vi Abbreviations on page vi Audience This guide is intended for application programmers who are familiar with the following HP NonStop systems products: • • • NonStop servers NonStop Kernel operating system Accelerator Related Reading Manual Description Accelerator Manual Explains how to improve the performance of TNS programs running on NonStop Series/RISC systems.
Your Comments Invited About This Guide Your Comments Invited After using this guide, please take a moment to send us your comments. You can do this by: • • • Completing a Contact NonStop Publications form online at http://nonstop.compaq.com/view.asp?FOID=20. Faxing or mailing the form called the Reader Comment Card, which is included as a separate file in Total Information Manager (TIM) collections and located at the back of printed manuals. Our fax number and mailing address are included on the form.
1 Introduction On TNS systems, a word is 16 bits. The TNS instruction set includes data access instructions that use 32-bit byte addresses that must be even-byte aligned (that is, aligned 0 modulo 2) for correct operation. This requirement remains even after the Accelerator translates TNS code into RISC code. In TNS mode and accelerated mode, addresses that are odd-byte aligned (that is, aligned 1 modulo 2) are called misaligned.
Introduction Accelerator Manual Data Alignment Addendum— 524963-001 1 -2
2 Misalignment Tracing Facility The misalignment tracing facility is enabled or disabled on a system-wide basis (that is, for all processors in the node). By default, it is enabled (set to ON). It can be disabled (set to OFF) only by the persons who configure the system, by means of the Subsystem Control Facility (SCF) attribute MISALIGNLOG. Instructions are in the SCF Reference Manual for the Kernel Subsystem. Note.
Misalignment Tracing Facility For more information about EMS events or the EMS log, see the EMS Manual.
3 Misalignment Handling Misalignment handling is determined by the following SCF attributes, which are set system-wide (that is, for all processors in the node) by the persons who configure the system: • • • MISALIGNLOG TNSMISALIGN NATIVEATOMICMISALIGN (applies only to programs running in TNS/R native mode, and therefore, does not apply to the Accelerator) MISALIGNLOG enables or disables the tracing facility (see Section 2, Misalignment Tracing Facility).
Misalignment Handling The method that you choose does not apply to every misaligned address, only to those that would have been rounded down in RVUs prior to G06.17. Note. ROUND and NOROUND misalignment handling are both intended as temporary solutions, not as a substitute for changing your program to ensure that it has only aligned addresses.
4 Misalignments in TNS and Accelerated Modes TNS compilers catch most violations of programming rules for their languages; however, some coding errors, particularly misuses of pointers and addresses, can produce erroneous TNS object code without compile-time or run-time warnings. When erroneous TNS object code executes, its misbehavior depends on its execution environment (TNS mode or accelerated mode, or execution on TNS CISC systems).
Misalignments in TNS and Accelerated Modes The varying behaviors and symptoms that misalignment errors cause can be confusing, for the following reasons: • • • • A source program can produce erroneous TNS object code that seems to execute correctly until you change the source program in an apparently innocent way. The program might behave differently in TNS mode than it does in accelerated mode. (Neither mode is better at avoiding alignment problems.
Glossary aligned. In TNS/R native mode, a data item is aligned if its address is a multiple of its size; for example, a 4-byte data item is aligned if its byte address is a multiple of 4. misaligned. In TNS mode and accelerated mode, an erroneous address that is odd-byte aligned; in TNS/R native mode, an inefficient address that is not aligned. signal.
trap Glossary Accelerator Manual Data Alignment Addendum— 524963-001 Glossary- 2
Index A N Address misalignment causes of 1-1, 4-1 handling 3-1/3-2 symptoms of 4-2 tracing facility for 2-1 NATIVEATOMICMISALIGN attribute (SCF) 3-1 NOROUND misalignment handling method 3-1/3-2 D Production systems 3-1 Data misalignment See Address misalignment Debugger 4-2 Default misalignment handling method 3-1/3-2 R E S EMS 2-1 Event Management Service 2-1 Execution environment 4-1 Execution mode 4-1 SCF user interface misalignment handling and 3-1 misalignment tracing facility and 2-1 SIGILL
T Index Accelerator Manual Data Alignment Addendum— 524963-001 Index -2