Generate Universal Unique Identifier (GENUUID)
|Op Code (Hex)||Operand 1|
|011D||UUID return template|
|Bound Program Access|
This instruction generates a universal unique identifier and returns it in the template provided. The UUID is unique as an identifier across all time and space and is based on the Open Systems Foundation (OSF) Distributed Computing Environments (DCE) version 1 UUID specification described in the DCE's "Architecture Environment Specification/Distributed Computing: for Remote Procedure Calls", Appendix A. The version 1 UUID does not exactly match the specification. For example, the format of the time does not match the specification. See Standard Time Format for additional information on the format of the time in the returned version 1 UUID. The version 4 UUID is randomly generated and is consistent with the Internet Engineering Task Force (IETF) specification as described in the RFC 4122 documentation.
The template identified by operand 1 must be 16 byte aligned. The 16 byte Universal Unique Identifier (UUID) is returned in the UUID return template.
The UUID return template (operand 1) has the following format:
The first 4 bytes of the template identify the total number of bytes provided for use by the instruction. The value is supplied as input to the instruction and is not modified by the instruction. A value of less than 32 causes a template size invalid (hex 3802) exception to be signaled.
The second 4 bytes of the template identify the total number of bytes available to be returned. This value is output. The value is the size of the template.
The version specifies which version of the UUID is to be generated. If the value 0 or 1 is specified then a version 1 DCE UUID will be generated. If the value 4 is specified then a version 4 RFC 4122 UUID will be generated. All other values are unsupported and specifying an unsupported value will cause a template value invalid (hex 3801) exception to be signaled.
The reserved field must be set to zeros or a template value invalid (hex 3801) exception will be signaled.
The returned UUID field contains the generated UUID corresponding to the version specifed.
Note: There are certain restrictions on the UUID that should be remembered:
- Operations on the UUID should be limited to:
- Equality comparison (equal or not equal)
- Lexical ordering - UUIDs can be ordered based on the most significant byte that differs between the compared UUIDs.
- String conversion - based on the DCE architecture string representation of a UUID.
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 08 Argument/Parameter
- 0801 Parameter Reference Violation
- 20 Machine Support
- 2002 Machine Check
- 2003 Function Check
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 2402 Pointer Type Invalid
- 32 Scalar Specification
- 3201 Scalar Type Invalid
- 38 Template Specification
- 3801 Template Value Invalid
- 3802 Template Size Invalid
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation
- 4402 Literal Values Cannot Be Changed