From de0abd515eaa8eda0b4b3af8f346dd1bc874a8b7 Mon Sep 17 00:00:00 2001 From: naim Date: Thu, 21 Dec 1995 16:43:07 +0000 Subject: [PATCH] Implementing rel operators <,<=,>,>= for the hp - naim --- dyninstAPI/src/arch-hppa.h | 7 ++++++- dyninstAPI/src/inst-hppa.C | 35 +++++++++++++++++++++++++++++------ paradynd/src/arch-hppa.h | 7 ++++++- paradynd/src/inst-hppa.C | 35 +++++++++++++++++++++++++++++------ 4 files changed, 70 insertions(+), 14 deletions(-) diff --git a/dyninstAPI/src/arch-hppa.h b/dyninstAPI/src/arch-hppa.h index 2165518..47ef10f 100644 --- a/dyninstAPI/src/arch-hppa.h +++ b/dyninstAPI/src/arch-hppa.h @@ -159,7 +159,12 @@ union instruction { #define COMCLR_EQ_F 0 #define COMCLR_NE_C 1 #define COMCLR_NE_F 1 - +#define COMCLR_LT_C 2 +#define COMCLR_LT_F 0 +#define COMCLR_LT_T 1 +#define COMCLR_LE_C 3 +#define COMCLR_LE_F 0 +#define COMCLR_LE_T 1 /* mask bits for various parts of the instruction format */ diff --git a/dyninstAPI/src/inst-hppa.C b/dyninstAPI/src/inst-hppa.C index 4b40c3a..48d3932 100644 --- a/dyninstAPI/src/inst-hppa.C +++ b/dyninstAPI/src/inst-hppa.C @@ -19,14 +19,17 @@ static char Copyright[] = "@(#) Copyright (c) 1993, 1994 Barton P. Miller, \ Jeff Hollingsworth, Jon Cargille, Krishna Kunchithapadam, Karen Karavanic,\ Tia Newhall, Mark Callaghan. All rights reserved."; -static char rcsid[] = "@(#) $Header: /home/jaw/CVSROOT_20081103/CVSROOT/core/dyninstAPI/src/Attic/inst-hppa.C,v 1.3 1995/12/19 01:04:46 hollings Exp $"; +static char rcsid[] = "@(#) $Header: /home/jaw/CVSROOT_20081103/CVSROOT/core/dyninstAPI/src/Attic/inst-hppa.C,v 1.4 1995/12/21 16:43:09 naim Exp $"; #endif /* * inst-hppa.C - Identify instrumentation points for PA-RISC processors. * * $Log: inst-hppa.C,v $ - * Revision 1.3 1995/12/19 01:04:46 hollings + * Revision 1.4 1995/12/21 16:43:09 naim + * Implementing rel operators <,<=,>,>= for the hp - naim + * + * Revision 1.3 1995/12/19 01:04:46 hollings * Moved the implementation of registerSpace::readOnlyRegister to processor * specific files (since it is). * Fixed a bug in Power relOps cases. @@ -782,14 +785,34 @@ unsigned emit(opCode op, reg src1, reg src2, reg dest, char *i, unsigned &base) return(0); break; - case timesOp: - // emulated via "floating point!" multiply - case divOp: - // emulated via millicode case lessOp: + genCmpOp(insn, COMCLR_LT_C, COMCLR_LT_F, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case greaterOp: + genCmpOp(insn, COMCLR_LE_C, COMCLR_LE_T, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case leOp: + genCmpOp(insn, COMCLR_LE_C, COMCLR_LE_F, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case geOp: + genCmpOp(insn, COMCLR_LT_C, COMCLR_LT_T, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + + case timesOp: + // emulated via "floating point!" multiply + case divOp: + // emulated via millicode abort(); break; diff --git a/paradynd/src/arch-hppa.h b/paradynd/src/arch-hppa.h index 2165518..47ef10f 100644 --- a/paradynd/src/arch-hppa.h +++ b/paradynd/src/arch-hppa.h @@ -159,7 +159,12 @@ union instruction { #define COMCLR_EQ_F 0 #define COMCLR_NE_C 1 #define COMCLR_NE_F 1 - +#define COMCLR_LT_C 2 +#define COMCLR_LT_F 0 +#define COMCLR_LT_T 1 +#define COMCLR_LE_C 3 +#define COMCLR_LE_F 0 +#define COMCLR_LE_T 1 /* mask bits for various parts of the instruction format */ diff --git a/paradynd/src/inst-hppa.C b/paradynd/src/inst-hppa.C index e660ade..0b1ea07 100644 --- a/paradynd/src/inst-hppa.C +++ b/paradynd/src/inst-hppa.C @@ -19,14 +19,17 @@ static char Copyright[] = "@(#) Copyright (c) 1993, 1994 Barton P. Miller, \ Jeff Hollingsworth, Jon Cargille, Krishna Kunchithapadam, Karen Karavanic,\ Tia Newhall, Mark Callaghan. All rights reserved."; -static char rcsid[] = "@(#) $Header: /home/jaw/CVSROOT_20081103/CVSROOT/core/paradynd/src/Attic/inst-hppa.C,v 1.3 1995/12/19 01:04:46 hollings Exp $"; +static char rcsid[] = "@(#) $Header: /home/jaw/CVSROOT_20081103/CVSROOT/core/paradynd/src/Attic/inst-hppa.C,v 1.4 1995/12/21 16:43:09 naim Exp $"; #endif /* * inst-hppa.C - Identify instrumentation points for PA-RISC processors. * * $Log: inst-hppa.C,v $ - * Revision 1.3 1995/12/19 01:04:46 hollings + * Revision 1.4 1995/12/21 16:43:09 naim + * Implementing rel operators <,<=,>,>= for the hp - naim + * + * Revision 1.3 1995/12/19 01:04:46 hollings * Moved the implementation of registerSpace::readOnlyRegister to processor * specific files (since it is). * Fixed a bug in Power relOps cases. @@ -782,14 +785,34 @@ unsigned emit(opCode op, reg src1, reg src2, reg dest, char *i, unsigned &base) return(0); break; - case timesOp: - // emulated via "floating point!" multiply - case divOp: - // emulated via millicode case lessOp: + genCmpOp(insn, COMCLR_LT_C, COMCLR_LT_F, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case greaterOp: + genCmpOp(insn, COMCLR_LE_C, COMCLR_LE_T, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case leOp: + genCmpOp(insn, COMCLR_LE_C, COMCLR_LE_F, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + case geOp: + genCmpOp(insn, COMCLR_LT_C, COMCLR_LT_T, src1, src2, dest); + base += sizeof(instruction); + return(0); + break; + + case timesOp: + // emulated via "floating point!" multiply + case divOp: + // emulated via millicode abort(); break; -- 1.8.3.1