diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index aac0671e..f60c2652 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 5.2.7 +* fixed AMD64 assembler Begin/End (saving callee saved registers) + ### 5.2.6 - [PixImage.SystemDrawing] removed System.Drawing.Common upper version constraint - [IO] BinaryReadingCoder: patch object reference after converter/proxy conversion (#77) diff --git a/src/Aardvark.Base.Runtime/Assembler/AMD64.fs b/src/Aardvark.Base.Runtime/Assembler/AMD64.fs index 98e41498..1d928a7d 100644 --- a/src/Aardvark.Base.Runtime/Assembler/AMD64.fs +++ b/src/Aardvark.Base.Runtime/Assembler/AMD64.fs @@ -278,7 +278,13 @@ module AMD64 = x.Mov(Register.Rbp, Register.Rsp, true) stackOffset <- stackOffset - 8 + for r in localConvention.calleeSaved do + x.Push r + member x.End() = + for i in localConvention.calleeSaved.Length - 1 .. -1 .. 0 do + x.Pop localConvention.calleeSaved.[i] + x.Leave() stackOffset <- stackOffset - 8