qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall
Date: Fri, 27 May 2016 09:21:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 05/27/2016 08:06 AM, Peter Maydell wrote:
@@ -31,6 +32,8 @@ safe_syscall_base:
          * does not list any ABI differences regarding stack alignment.)
          */
         push    %rbp
+        .cfi_def_cfa_offset 16
+        .cfi_offset rbp,-16

While this is correct, there are two other directives that make it easier to describe changes without having to compute globally correct constants. Here they would be:

        .cfi_adjust_cfa_offset 8

Add 8 to the offset, i.e. decrement the SP by 8.

        .cfi_rel_offset rbp, 0

Save rbp at the current top-of-stack.

The assembler will compute the absolute values from these relative values. Using them makes it easy to see from a narrow window of code that the annotations are correct.

Otherwise,

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]