public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* unwind info for sysdeps/ia64/dl-machine.h
@ 2002-04-03 20:37 David Mosberger
  2002-04-05 15:28 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: David Mosberger @ 2002-04-03 20:37 UTC (permalink / raw)
  To: libc-hacker

Here is a patch to add unwind info for sysdeps/ia64/dl-machine.h.
Since I can't build glibc at the moment, this is untested.  However,
I did inspect the directives and code with readelf -u/objdump -d
and the results look sane.  The patch also fixes a RAW dependency
violation.

	--david

ChangeLog

2002-04-03  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind info.
	(RTLD_START): Ditto.
	(__ia64_init_bootstrap_fdesc_table): Insert stop bit to avoid RAW
	dependency violation.

Index: sysdeps/ia64/dl-machine.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ia64/dl-machine.h,v
retrieving revision 1.18
diff -u -r1.18 dl-machine.h
--- sysdeps/ia64/dl-machine.h	2002/02/28 22:36:27	1.18
+++ sysdeps/ia64/dl-machine.h	2002/04/04 04:33:32
@@ -61,7 +61,7 @@
   Elf64_Addr *boot_table;
 
   /* careful: this will be called before got has been relocated... */
-  asm ("addl %0 = @gprel (__ia64_boot_fptr_table), gp" : "=r"(boot_table));
+  asm (";; addl %0 = @gprel (__ia64_boot_fptr_table), gp" : "=r"(boot_table));
 
   map->l_mach.fptr_table_len = IA64_BOOT_FPTR_TABLE_LEN;
   map->l_mach.fptr_table = boot_table;
@@ -179,13 +179,18 @@
 "	.proc " #tramp_name "#\n"					     \
 #tramp_name ":\n"							     \
 "	{ .mmi\n"							     \
+"	  .prologue\n"							     \
+"	  .save ar.pfs, r40\n"						     \
 "	  alloc loc0 = ar.pfs, 8, 6, 3, 0\n"				     \
 "	  adds r2 = -144, r12\n"					     \
 "	  adds r3 = -128, r12\n"					     \
 "	}\n"								     \
 "	{ .mii\n"							     \
+"	  .fframe 160\n"						     \
 "	  adds r12 = -160, r12\n"					     \
+"	  .save rp, r41\n"						     \
 "	  mov loc1 = b0\n"						     \
+"	  .body\n"							     \
 "	  mov out2 = b0		/* needed by fixup_profile */\n"	     \
 "	  ;;\n"								     \
 "	}\n"								     \
@@ -249,6 +254,7 @@
 "	{ .mmi\n"							     \
 "	  ldf.fill f14 = [r2], 32\n"					     \
 "	  ldf.fill f15 = [r3], 32\n"					     \
+"	  .restore sp		/* pop the unwind frame state */\n"	     \
 "	  adds r12 = 160, r12\n"					     \
 "	  ;;\n"								     \
 "	}\n"								     \
@@ -265,6 +271,8 @@
 "	/* An alloc is needed for the break system call to work.\n"	     \
 "	   We don't care about the old value of the pfs register.  */\n"     \
 "	{ .mmb\n"							     \
+"	  .prologue\n"							     \
+"	  .body\n"							     \
 "	  alloc r2 = ar.pfs, 0, 0, 8, 0\n"				     \
 "	  br.sptk.many b6\n"						     \
 "	  ;;\n"								     \
@@ -292,7 +300,11 @@
 "	.proc _start#\n"						      \
 "_start:\n"								      \
 "0:	{ .mii\n"							      \
+"	  .prologue\n"							      \
+"	  .save ar.pfs, r32\n"						      \
+"	  .save rp, r0\n"						      \
 "	  alloc loc0 = ar.pfs, 0, 3, 4, 0\n"				      \
+"	  .body\n"							      \
 "	  mov r2 = ip\n"						      \
 "	  addl r3 = @gprel(0b), r0\n"					      \
 "	  ;;\n"								      \
@@ -319,6 +331,10 @@
 "	.global _dl_start_user#\n"					      \
 "	.proc _dl_start_user#\n"					      \
 "_dl_start_user:\n"							      \
+"	  .prologue\n"							      \
+"	  .save ar.pfs, r32\n"						      \
+"	  .save rp, r0\n"						      \
+"	  .body\n"							      \
 "	{ .mii\n"							      \
 "	  /* Save the pointer to the user entry point fptr in loc2.  */\n"    \
 "	  mov loc2 = ret0\n"						      \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: unwind info for sysdeps/ia64/dl-machine.h
  2002-04-03 20:37 unwind info for sysdeps/ia64/dl-machine.h David Mosberger
@ 2002-04-05 15:28 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2002-04-05 15:28 UTC (permalink / raw)
  To: David Mosberger; +Cc: GNU libc hacker

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

On Wed, 2002-04-03 at 20:37, David Mosberger wrote:

> 2002-04-03  David Mosberger  <davidm@hpl.hp.com>
> 
> 	* sysdeps/ia64/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind info.
> 	(RTLD_START): Ditto.
> 	(__ia64_init_bootstrap_fdesc_table): Insert stop bit to avoid RAW
> 	dependency violation.

I've applied this patch now.  Thanks,

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-05 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 20:37 unwind info for sysdeps/ia64/dl-machine.h David Mosberger
2002-04-05 15:28 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).