技术文章 - CS253748
在地址子句中使用变量或常量时的不同阐述
已修改: 23-Jun-2022
适用于
- ApexAda 4.4 to 5.0
- For example, if an object used to specify or compute the address is declared as a variable and assigned a numeric literal, like one of these:
- A1 : Interfaces.Unsigned_32 := 16#80000000#;
- A_static : constant := 16#80000000#;
the generated elaboration code may be a combination of byte, halfword, and word store instructions. The exact elaboration code depends on the structure of the record and its components.
- Changing the declaration to a constant, like one of these:
- A3 : constant Interfaces.Unsigned_32 := 16#80000000#;
- A4 : constant := 16#80000000#;
- A_static : constant := 16#80000000#;
may generate a series of halfword store instructions for the same record type.
说明
- 在 ApexAda 中为记录类型声明地址子句时,如果使用变量而不是常量指定或计算地址,则可能会生成不同的详细说明代码。
- 这可能会导致详细说明或运行时问题,例如,如果地址子句用于读取或写入内存映射硬件,或者不允许字节寻址的内存设备。
这是文章 253748 的 PDF 版本,可能已过期。最新版本 CS253748