Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/hppa Re-order relocation in switch statement. ...
details: https://anonhg.NetBSD.org/src/rev/f443ae5274ae
branches: trunk
changeset: 789076:f443ae5274ae
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Aug 06 06:40:43 2013 +0000
description:
Re-order relocation in switch statement. No functional change.
diffstat:
sys/arch/hppa/hppa/kobj_machdep.c | 54 +++++++++++++++++++-------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diffs (97 lines):
diff -r 5451ea13264e -r f443ae5274ae sys/arch/hppa/hppa/kobj_machdep.c
--- a/sys/arch/hppa/hppa/kobj_machdep.c Tue Aug 06 06:10:57 2013 +0000
+++ b/sys/arch/hppa/hppa/kobj_machdep.c Tue Aug 06 06:40:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kobj_machdep.c,v 1.7 2012/01/06 09:09:25 skrll Exp $ */
+/* $NetBSD: kobj_machdep.c,v 1.8 2013/08/06 06:40:43 skrll Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.7 2012/01/06 09:09:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.8 2013/08/06 06:40:43 skrll Exp $");
#define ELFSIZE ARCH_ELFSIZE
@@ -132,22 +132,6 @@
*where = value;
break;
- case R_TYPE(PLABEL32):
- /* fptr(symbol) */
- addr = kobj_sym_lookup(ko, symidx);
- if (*where != addr)
- *where = addr;
- break;
-
- case R_TYPE(DIR14R):
- /* RR(symbol, addend) */
- addr = kobj_sym_lookup(ko, symidx);
- value = RR(addr, value);
- *where |=
- (((value >> 0) & 0x1fff) << 1) |
- (((value >> 13) & 0x1) << 0);
- break;
-
case R_TYPE(DIR21L):
/* LR(symbol, addend) */
addr = kobj_sym_lookup(ko, symidx);
@@ -160,6 +144,15 @@
(((value >> 11) & 0x003) << 12);
break;
+ case R_TYPE(DIR14R):
+ /* RR(symbol, addend) */
+ addr = kobj_sym_lookup(ko, symidx);
+ value = RR(addr, value);
+ *where |=
+ (((value >> 0) & 0x1fff) << 1) |
+ (((value >> 13) & 0x1) << 0);
+ break;
+
case R_TYPE(PCREL17F):
/* symbol - PC - 8 + addend */
addr = kobj_sym_lookup(ko, symidx);
@@ -173,6 +166,18 @@
(((value & 0x003ff) << 1) << 2); /* w2 */
break;
+ case R_TYPE(DPREL21L):
+ /* LR(symbol - GP, addend) */
+ addr = kobj_sym_lookup(ko, symidx);
+ value = LR(addr - GP, value);
+ *where |=
+ (((value >> 31) & 0x001) << 0) |
+ (((value >> 20) & 0x7ff) << 1) |
+ (((value >> 18) & 0x003) << 14) |
+ (((value >> 13) & 0x01f) << 16) |
+ (((value >> 11) & 0x003) << 12);
+ break;
+
case R_TYPE(DPREL14R):
/* RR(symbol - GP, addend) */
addr = kobj_sym_lookup(ko, symidx);
@@ -183,16 +188,11 @@
break;
- case R_TYPE(DPREL21L):
- /* LR(symbol - GP, addend) */
+ case R_TYPE(PLABEL32):
+ /* fptr(symbol) */
addr = kobj_sym_lookup(ko, symidx);
- value = LR(addr - GP, value);
- *where |=
- (((value >> 31) & 0x001) << 0) |
- (((value >> 20) & 0x7ff) << 1) |
- (((value >> 18) & 0x003) << 14) |
- (((value >> 13) & 0x01f) << 16) |
- (((value >> 11) & 0x003) << 12);
+ if (*where != addr)
+ *where = addr;
break;
case R_TYPE(SEGREL32):
Home |
Main Index |
Thread Index |
Old Index