aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2002-03-31 15:07:55 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2002-03-31 15:07:55 +0000
commit8f840f5701d51cbd337306ef9ff0ddb28b120414 (patch)
treec445b7ba8931d3eea1b66d2c382fe06f35e6a7e8 /gcc
parent41ba8a20bd2bdfa0180420cce0182d0753e85de9 (diff)
downloadgcc-8f840f5701d51cbd337306ef9ff0ddb28b120414.zip
gcc-8f840f5701d51cbd337306ef9ff0ddb28b120414.tar.gz
gcc-8f840f5701d51cbd337306ef9ff0ddb28b120414.tar.bz2
crti.asm (_init): Register _fini with atexit.
* config/mmix/crti.asm (_init): Register _fini with atexit. * config/mmix/crtn.asm (_fini): Add omitted "POP 0,0". From-SVN: r51654
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mmix/crti.asm10
-rw-r--r--gcc/config/mmix/crtn.asm3
3 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 04e7f56..8348c20 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/mmix/crti.asm (_init): Register _fini with atexit.
+ * config/mmix/crtn.asm (_fini): Add omitted "POP 0,0".
+
2002-03-31 Richard Henderson <rth@redhat.com>
PR target/3997
diff --git a/gcc/config/mmix/crti.asm b/gcc/config/mmix/crti.asm
index d118cb8..f4458f7 100644
--- a/gcc/config/mmix/crti.asm
+++ b/gcc/config/mmix/crti.asm
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is free software; you can redistribute it and/or modify it
@@ -103,6 +103,14 @@ _init:
TRAP 0,0,0
0H IS @
+% Register _fini to be executed as the last atexit function.
+#ifdef __MMIX_ABI_GNU__
+ GETA $231,_fini
+#else
+ GETA $1,_fini
+#endif
+ PUSHJ $0,atexit
+
.section .fini,"ax",@progbits
.global _fini
_fini:
diff --git a/gcc/config/mmix/crtn.asm b/gcc/config/mmix/crtn.asm
index 265d926..544b307 100644
--- a/gcc/config/mmix/crtn.asm
+++ b/gcc/config/mmix/crtn.asm
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is free software; you can redistribute it and/or modify it
@@ -87,5 +87,6 @@ gnu_parm_reg_1 GREG
.section .fini,"ax",@progbits
GETA $255,0F
PUT rJ,$255
+ POP 0,0
0H PUT rJ,$0
POP 0,0