diff options
Diffstat (limited to 'src/synth/elab-memtype.adb')
-rw-r--r-- | src/synth/elab-memtype.adb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/synth/elab-memtype.adb b/src/synth/elab-memtype.adb index 8a9babd3d..91e38a900 100644 --- a/src/synth/elab-memtype.adb +++ b/src/synth/elab-memtype.adb @@ -122,4 +122,21 @@ package body Elab.Memtype is return V; end Read_Fp64; + procedure Write_Ptr (Mem : Memory_Ptr; Val : Memory_Ptr) + is + V : Memory_Ptr; + for V'Address use To_Address (Mem); + pragma Import (Ada, V); + begin + V := Val; + end Write_Ptr; + + function Read_Ptr (Mem : Memory_Ptr) return Memory_Ptr + is + V : Memory_Ptr; + for V'Address use To_Address (Mem); + pragma Import (Ada, V); + begin + return V; + end Read_Ptr; end Elab.Memtype; |