Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64 PR port-ia64/51261
details: https://anonhg.NetBSD.org/src/rev/2d91c2bf51ff
branches: trunk
changeset: 346873:2d91c2bf51ff
user: scole <scole%NetBSD.org@localhost>
date: Fri Aug 05 16:45:50 2016 +0000
description:
PR port-ia64/51261
Import later version from FreeBSD
diffstat:
sys/arch/ia64/disasm/disasm.h | 27 ++++---
sys/arch/ia64/disasm/disasm_decode.c | 100 ++++++++++++++++++++++------
sys/arch/ia64/disasm/disasm_extract.c | 114 ++++++++++++++++++++++++++++++---
sys/arch/ia64/disasm/disasm_format.c | 10 +-
sys/arch/ia64/disasm/disasm_int.h | 12 ++-
sys/arch/ia64/ia64/context.S | 24 +++---
6 files changed, 222 insertions(+), 65 deletions(-)
diffs (truncated from 673 to 300 lines):
diff -r 131028beb573 -r 2d91c2bf51ff sys/arch/ia64/disasm/disasm.h
--- a/sys/arch/ia64/disasm/disasm.h Fri Aug 05 16:44:31 2016 +0000
+++ b/sys/arch/ia64/disasm/disasm.h Fri Aug 05 16:45:50 2016 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: disasm.h,v 1.2 2014/04/03 17:02:34 martin Exp $ */
+/* $NetBSD: disasm.h,v 1.3 2016/08/05 16:45:50 scole Exp $ */
/*-
- * Copyright (c) 2000-2003 Marcel Moolenaar
+ * Copyright (c) 2000-2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/ia64/disasm/disasm.h,v 1.3 2005/01/06 22:18:22 imp Exp $
+ * $FreeBSD: releng/10.1/sys/ia64/disasm/disasm.h 172689 2007-10-16 02:49:40Z marcel $
*/
#ifndef _DISASM_H_
@@ -112,6 +112,7 @@
ASM_CC_RW,
ASM_CC_TREL, ASM_CC_TRUNC,
ASM_CC_UNIT, ASM_CC_UNPACK, ASM_CC_UNS,
+ ASM_CC_VMSW,
ASM_CC_XMA
};
@@ -205,15 +206,16 @@
ASM_FMT_F1, ASM_FMT_F2, ASM_FMT_F3, ASM_FMT_F4,
ASM_FMT_F5, ASM_FMT_F6, ASM_FMT_F7, ASM_FMT_F8,
ASM_FMT_F9, ASM_FMT_F10, ASM_FMT_F11, ASM_FMT_F12,
- ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15,
+ ASM_FMT_F13, ASM_FMT_F14, ASM_FMT_F15, ASM_FMT_F16,
ASM_FMT_I = 0x0400,
ASM_FMT_I1, ASM_FMT_I2, ASM_FMT_I3, ASM_FMT_I4,
ASM_FMT_I5, ASM_FMT_I6, ASM_FMT_I7, ASM_FMT_I8,
ASM_FMT_I9, ASM_FMT_I10, ASM_FMT_I11, ASM_FMT_I12,
ASM_FMT_I13, ASM_FMT_I14, ASM_FMT_I15, ASM_FMT_I16,
- ASM_FMT_I17, ASM_FMT_I19, ASM_FMT_I20, ASM_FMT_I21,
- ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24, ASM_FMT_I25,
- ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28, ASM_FMT_I29,
+ ASM_FMT_I17, ASM_FMT_I18, ASM_FMT_I19, ASM_FMT_I20,
+ ASM_FMT_I21, ASM_FMT_I22, ASM_FMT_I23, ASM_FMT_I24,
+ ASM_FMT_I25, ASM_FMT_I26, ASM_FMT_I27, ASM_FMT_I28,
+ ASM_FMT_I29, ASM_FMT_I30,
ASM_FMT_M = 0x0500,
ASM_FMT_M1, ASM_FMT_M2, ASM_FMT_M3, ASM_FMT_M4,
ASM_FMT_M5, ASM_FMT_M6, ASM_FMT_M7, ASM_FMT_M8,
@@ -226,9 +228,10 @@
ASM_FMT_M33, ASM_FMT_M34, ASM_FMT_M35, ASM_FMT_M36,
ASM_FMT_M37, ASM_FMT_M38, ASM_FMT_M39, ASM_FMT_M40,
ASM_FMT_M41, ASM_FMT_M42, ASM_FMT_M43, ASM_FMT_M44,
- ASM_FMT_M45, ASM_FMT_M46,
+ ASM_FMT_M45, ASM_FMT_M46, ASM_FMT_M47, ASM_FMT_M48,
ASM_FMT_X = 0x0600,
- ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4
+ ASM_FMT_X1, ASM_FMT_X2, ASM_FMT_X3, ASM_FMT_X4,
+ ASM_FMT_X5
};
/* Instruction opcodes. */
@@ -252,6 +255,7 @@
ASM_OP_FPRSQRTA, ASM_OP_FRCPA, ASM_OP_FRSQRTA, ASM_OP_FSELECT,
ASM_OP_FSETC, ASM_OP_FSWAP, ASM_OP_FSXT, ASM_OP_FWB, ASM_OP_FXOR,
ASM_OP_GETF,
+ ASM_OP_HINT,
ASM_OP_INVALA, ASM_OP_ITC, ASM_OP_ITR,
ASM_OP_LD1, ASM_OP_LD16, ASM_OP_LD2, ASM_OP_LD4, ASM_OP_LD8,
ASM_OP_LDF, ASM_OP_LDF8, ASM_OP_LDFD, ASM_OP_LDFE, ASM_OP_LDFP8,
@@ -273,9 +277,10 @@
ASM_OP_ST2, ASM_OP_ST4, ASM_OP_ST8, ASM_OP_STF, ASM_OP_STF8,
ASM_OP_STFD, ASM_OP_STFE, ASM_OP_STFS, ASM_OP_SUB, ASM_OP_SUM,
ASM_OP_SXT1, ASM_OP_SXT2, ASM_OP_SXT4, ASM_OP_SYNC,
- ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_THASH, ASM_OP_TNAT, ASM_OP_TPA,
- ASM_OP_TTAG,
+ ASM_OP_TAK, ASM_OP_TBIT, ASM_OP_TF, ASM_OP_THASH, ASM_OP_TNAT,
+ ASM_OP_TPA, ASM_OP_TTAG,
ASM_OP_UNPACK1, ASM_OP_UNPACK2, ASM_OP_UNPACK4,
+ ASM_OP_VMSW,
ASM_OP_XCHG1, ASM_OP_XCHG2, ASM_OP_XCHG4, ASM_OP_XCHG8, ASM_OP_XMA,
ASM_OP_XOR,
ASM_OP_ZXT1, ASM_OP_ZXT2, ASM_OP_ZXT4,
diff -r 131028beb573 -r 2d91c2bf51ff sys/arch/ia64/disasm/disasm_decode.c
--- a/sys/arch/ia64/disasm/disasm_decode.c Fri Aug 05 16:44:31 2016 +0000
+++ b/sys/arch/ia64/disasm/disasm_decode.c Fri Aug 05 16:45:50 2016 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: disasm_decode.c,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
+/* $NetBSD: disasm_decode.c,v 1.2 2016/08/05 16:45:50 scole Exp $ */
/*-
- * Copyright (c) 2000-2003 Marcel Moolenaar
+ * Copyright (c) 2000-2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-/* __FBSDID("$FreeBSD: src/sys/ia64/disasm/disasm_decode.c,v 1.3 2005/01/06 22:18:22 imp Exp $"); */
+/* __FBSDID("$FreeBSD: releng/10.1/sys/ia64/disasm/disasm_decode.c 159916 2006-06-24 19:21:11Z marcel $"); */
#include <sys/param.h>
#include <sys/systm.h>
@@ -569,6 +569,12 @@
case 0x10:
op = ASM_OP_EPC, fmt = ASM_FMT_B8;
break;
+ case 0x18:
+ op = ASM_OP_VMSW_0, fmt = ASM_FMT_B8;
+ break;
+ case 0x19:
+ op = ASM_OP_VMSW_1, fmt = ASM_FMT_B8;
+ break;
case 0x20:
switch (FIELD(bits, 6, 3)) { /* btype */
case 0x0:
@@ -593,6 +599,9 @@
case 0x0:
op = ASM_OP_NOP_B, fmt = ASM_FMT_B9;
break;
+ case 0x1:
+ op = ASM_OP_HINT_B, fmt = ASM_FMT_B9;
+ break;
case 0x10:
op = ASM_OP_BRP_, fmt = ASM_FMT_B7;
break;
@@ -657,7 +666,10 @@
op = ASM_OP_BREAK_F, fmt = ASM_FMT_F15;
break;
case 0x1:
- op = ASM_OP_NOP_F, fmt = ASM_FMT_F15;
+ if (FIELD(bits, 26, 1) == 0) /* y */
+ op = ASM_OP_NOP_F, fmt = ASM_FMT_F16;
+ else
+ op = ASM_OP_HINT_F, fmt = ASM_FMT_F16;
break;
case 0x4:
op = ASM_OP_FSETC, fmt = ASM_FMT_F12;
@@ -908,7 +920,10 @@
op = ASM_OP_BREAK_I, fmt = ASM_FMT_I19;
break;
case 0x1:
- op = ASM_OP_NOP_I, fmt = ASM_FMT_I19;
+ if (FIELD(bits, 26, 1) == 0) /* y */
+ op = ASM_OP_NOP_I, fmt = ASM_FMT_I18;
+ else
+ op = ASM_OP_HINT_I, fmt = ASM_FMT_I18;
break;
case 0xA:
op = ASM_OP_MOV_I, fmt = ASM_FMT_I27;
@@ -993,11 +1008,20 @@
fmt = ASM_FMT_I16;
break;
case 0x2:
- op = ASM_OP_TNAT_Z, fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_Z,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_Z,
+ fmt = ASM_FMT_I30;
break;
case 0x3:
- op = ASM_OP_TNAT_Z_UNC,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_Z_UNC,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_Z_UNC,
+ fmt = ASM_FMT_I30;
break;
}
} else {
@@ -1011,12 +1035,20 @@
fmt = ASM_FMT_I16;
break;
case 0x2:
- op = ASM_OP_TNAT_Z_AND,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_Z_AND,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_Z_AND,
+ fmt = ASM_FMT_I30;
break;
case 0x3:
- op = ASM_OP_TNAT_NZ_AND,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_NZ_AND,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_NZ_AND,
+ fmt = ASM_FMT_I30;
break;
}
}
@@ -1033,12 +1065,20 @@
fmt = ASM_FMT_I16;
break;
case 0x2:
- op = ASM_OP_TNAT_Z_OR,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_Z_OR,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_Z_OR,
+ fmt = ASM_FMT_I30;
break;
case 0x3:
- op = ASM_OP_TNAT_NZ_OR,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_NZ_OR,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_NZ_OR,
+ fmt = ASM_FMT_I30;
break;
}
} else {
@@ -1052,12 +1092,20 @@
fmt = ASM_FMT_I16;
break;
case 0x2:
- op = ASM_OP_TNAT_Z_OR_ANDCM,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_Z_OR_ANDCM,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_Z_OR_ANDCM,
+ fmt = ASM_FMT_I30;
break;
case 0x3:
- op = ASM_OP_TNAT_NZ_OR_ANDCM,
- fmt = ASM_FMT_I17;
+ if (FIELD(bits, 19, 1) == 0) /* x */
+ op = ASM_OP_TNAT_NZ_OR_ANDCM,
+ fmt = ASM_FMT_I17;
+ else
+ op = ASM_OP_TF_NZ_OR_ANDCM,
+ fmt = ASM_FMT_I30;
break;
}
}
@@ -1284,7 +1332,10 @@
op = ASM_OP_BREAK_M, fmt = ASM_FMT_M37;
break;
case 0x1:
- op = ASM_OP_NOP_M, fmt = ASM_FMT_M37;
+ if (FIELD(bits, 26, 1) == 0) /* y */
+ op = ASM_OP_NOP_M, fmt = ASM_FMT_M48;
+ else
+ op = ASM_OP_HINT_M, fmt = ASM_FMT_M48;
break;
case 0x4: case 0x14: case 0x24: case 0x34:
op = ASM_OP_SUM, fmt = ASM_FMT_M44;
@@ -1484,7 +1535,7 @@
op = ASM_OP_PROBE_W_FAULT, fmt = ASM_FMT_M40;
break;
case 0x34:
- op = ASM_OP_PTC_E, fmt = ASM_FMT_M28;
+ op = ASM_OP_PTC_E, fmt = ASM_FMT_M47;
break;
case 0x38:
op = ASM_OP_PROBE_R, fmt = ASM_FMT_M38;
@@ -2441,7 +2492,10 @@
op = ASM_OP_BREAK_X, fmt = ASM_FMT_X1;
break;
case 0x1:
- op = ASM_OP_NOP_X, fmt = ASM_FMT_X1;
+ if (FIELD(bits, 26, 1) == 0) /* y */
+ op = ASM_OP_NOP_X, fmt = ASM_FMT_X5;
+ else
+ op = ASM_OP_HINT_X, fmt = ASM_FMT_X5;
break;
}
}
diff -r 131028beb573 -r 2d91c2bf51ff sys/arch/ia64/disasm/disasm_extract.c
--- a/sys/arch/ia64/disasm/disasm_extract.c Fri Aug 05 16:44:31 2016 +0000
+++ b/sys/arch/ia64/disasm/disasm_extract.c Fri Aug 05 16:45:50 2016 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: disasm_extract.c,v 1.2 2011/07/17 20:54:42 joerg Exp $ */
+/* $NetBSD: disasm_extract.c,v 1.3 2016/08/05 16:45:50 scole Exp $ */
/*-
- * Copyright (c) 2000-2003 Marcel Moolenaar
+ * Copyright (c) 2000-2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
Home |
Main Index |
Thread Index |
Old Index