1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
//! Raw `AssemblyProcessor` table representation.
//!
//! This module provides low-level access to `AssemblyProcessor` metadata table data through the
//! [`crate::metadata::tables::assemblyprocessor::raw::AssemblyProcessorRaw`] structure. The
//! `AssemblyProcessor` table contains CPU architecture targeting information for .NET assemblies,
//! though it is rarely used in modern applications.
//!
//! # Architecture
//!
//! Like [`crate::metadata::tables::assemblyos::AssemblyOsRaw`], `AssemblyProcessor` contains only primitive
//! values and requires no heap resolution, making the "raw" and "owned" representations
//! functionally identical. This simplifies the dual variant pattern used throughout the
//! metadata system.
//!
//! # Key Components
//!
//! - [`crate::metadata::tables::assemblyprocessor::raw::AssemblyProcessorRaw`] - Raw table row structure
//! - [`crate::metadata::tables::assemblyprocessor::AssemblyProcessorRc`] - Reference-counted owned representation
//! - [`crate::metadata::tables::types::RowReadable`] - Table parsing interface implementation
//!
//! # `AssemblyProcessor` Table Format
//!
//! The `AssemblyProcessor` table (0x21) contains CPU architecture targeting information:
//! - **Processor** (4 bytes): Processor architecture identifier
//!
//! # Historical Context
//!
//! This table was designed for early .NET Framework scenarios where assemblies might need
//! explicit CPU architecture declarations. Modern .NET applications typically use `AnyCPU`
//! compilation and rely on runtime JIT optimization for architecture-specific code generation.
//!
//! # Architecture Evolution
//!
//! - **Early .NET**: Explicit x86, x64, IA64 targeting in metadata
//! - **Framework Era**: Platform-specific compilation with runtime detection
//! - **Modern .NET**: `AnyCPU` with runtime JIT optimization and cross-platform support
//!
//! # Integration
//!
//! This module integrates with:
//! - [`crate::metadata::tables`] - Core metadata table infrastructure
//! - [`crate::metadata::token`] - Token representation for metadata references
//! - [`crate::file::io`] - Binary data reading utilities
//!
//! # References
//!
//! - [ECMA-335 II.22.4](https://ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf) - `AssemblyProcessor` table specification
use Arc;
use crate::;
/// Raw `AssemblyProcessor` table row representing CPU architecture targeting information
///
/// Contains processor architecture identification data for assemblies that specify explicit CPU targeting.
/// Like [`crate::metadata::tables::AssemblyOsRaw`], this structure contains only
/// primitive integer values and requires no heap resolution, making it immediately usable.
///
/// The `AssemblyProcessor` table (0x21) is optional and rarely present in modern .NET assemblies,
/// which typically use `AnyCPU` compilation and rely on runtime JIT optimization for architecture-specific
/// code generation rather than compile-time CPU targeting.
///
/// # Data Model
///
/// All fields contain direct integer values rather than heap indexes:
/// - No string heap references
/// - No blob heap references
/// - All data is self-contained within the table row
///
/// # Architecture Identifiers
///
/// While ECMA-335 doesn't specify exact processor constants, common values historically included:
/// - x86 architectures (32-bit Intel)
/// - x64 architectures (64-bit AMD/Intel)
/// - IA64 architectures (Intel Itanium, deprecated)
///
/// # Reference
/// - [ECMA-335 II.22.4](https://ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf) - `AssemblyProcessor` table specification