This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Andreas Jaeger <aj@suse.de> writes:
> Jakub Jelinek <jakub@redhat.com> writes:
> [...]
>>> libc/sysdeps/x86_64/__longjmp.S
>
> What's the best way to handle the destroying of the registers with
> CFI? Should we just mark the registers with "cfi_undefined"?
I'm appending a proposed patch for __longjmp.S. Or can anybody
envision a better way doing this?
Andreas
2004-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/__longjmp.S: Add cfi directives.
============================================================
Index: sysdeps/x86_64/__longjmp.S
--- sysdeps/x86_64/__longjmp.S 19 Sep 2001 10:12:07 -0000 1.1
+++ sysdeps/x86_64/__longjmp.S 10 Jan 2004 19:47:01 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,11 +28,17 @@
ENTRY(__longjmp)
/* Restore registers. */
movq (JB_RBX*8)(%rdi),%rbx
+ cfi_undefined(%rbx)
movq (JB_RBP*8)(%rdi),%rbp
+ cfi_undefined(%rbp)
movq (JB_R12*8)(%rdi),%r12
+ cfi_undefined(%r12)
movq (JB_R13*8)(%rdi),%r13
+ cfi_undefined(%r13)
movq (JB_R14*8)(%rdi),%r14
+ cfi_undefined(%r14)
movq (JB_R15*8)(%rdi),%r15
+ cfi_undefined(%r15)
/* Set return value for setjmp. */
test %esi,%esi
mov $01,%eax
@@ -40,5 +46,6 @@ ENTRY(__longjmp)
mov %esi, %eax
movq (JB_PC*8)(%rdi),%rdx
movq (JB_RSP*8)(%rdi),%rsp
+ cfi_undefined(%rsp)
jmpq *%rdx
END (BP_SYM (__longjmp))
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |