Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:32

0001 /*
0002  *  qp_exe_op_cmp.h  --
0003  *
0004  *  Original: 23-Jan-1995 17:17
0005  *
0006  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0007  *
0008  *  $Id$
0009  *
0010  *  $Log$
0011  *  Revision 1.3  1996/04/23 18:38:32  maartenb
0012  *  - Add RCS keywords
0013  *
0014  *
0015  */
0016 
0017 case FC_LT + (OP_BASE):
0018     o1 = &stack[frame[framep]];
0019     o2 = &stack[frame[framep-1]];
0020     POP_FRAME(2);
0021     NEW_FRAME(D_BOOL,1,r);
0022     if ( (*((OP_TYPE *) o1)) < (*((OP_TYPE *) o2)) ) {
0023         *((bool *) r) = TRUE;
0024     } else {
0025         *((bool *) r) = FALSE;
0026     }
0027     break;
0028 
0029 case FC_LE + (OP_BASE):
0030     o1 = &stack[frame[framep]];
0031     o2 = &stack[frame[framep-1]];
0032     POP_FRAME(2);
0033     NEW_FRAME(D_BOOL,1,r);
0034     if ( *((OP_TYPE *) o1) <= *((OP_TYPE *) o2) ) {
0035         *((bool *) r) = TRUE;
0036     } else {
0037         *((bool *) r) = FALSE;
0038     }
0039     break;
0040 
0041 case FC_LTLT + (OP_BASE):
0042     o1 = &stack[frame[framep]];
0043     o2 = &stack[frame[framep-1]];
0044     o3 = &stack[frame[framep-2]];
0045     POP_FRAME(3);
0046     NEW_FRAME(D_BOOL,1,r);
0047     if ( (*((OP_TYPE *) o1) < *((OP_TYPE *) o2)) &&
0048         (*((OP_TYPE *) o2) < *((OP_TYPE *) o3))
0049     ) {
0050         *((bool *) r) = TRUE;
0051     } else {
0052         *((bool *) r) = FALSE;
0053     }
0054     break;
0055 
0056 case FC_LTLE + (OP_BASE):
0057     o1 = &stack[frame[framep]];
0058     o2 = &stack[frame[framep-1]];
0059     o3 = &stack[frame[framep-2]];
0060     POP_FRAME(3);
0061     NEW_FRAME(D_BOOL,1,r);
0062     if ( (*((OP_TYPE *) o1) < *((OP_TYPE *) o2)) &&
0063         (*((OP_TYPE *) o2) <= *((OP_TYPE *) o3))
0064     ) {
0065         *((bool *) r) = TRUE;
0066     } else {
0067         *((bool *) r) = FALSE;
0068     }
0069     break;
0070 
0071 case FC_LELT + (OP_BASE):
0072     o1 = &stack[frame[framep]];
0073     o2 = &stack[frame[framep-1]];
0074     o3 = &stack[frame[framep-2]];
0075     POP_FRAME(3);
0076     NEW_FRAME(D_BOOL,1,r);
0077     if ( (*((OP_TYPE *) o1) <= *((OP_TYPE *) o2)) &&
0078         (*((OP_TYPE *) o2) < *((OP_TYPE *) o3))
0079     ) {
0080         *((bool *) r) = TRUE;
0081     } else {
0082         *((bool *) r) = FALSE;
0083     }
0084     break;
0085 
0086 case FC_LELE + (OP_BASE):
0087     o1 = &stack[frame[framep]];
0088     o2 = &stack[frame[framep-1]];
0089     o3 = &stack[frame[framep-2]];
0090     POP_FRAME(3);
0091     NEW_FRAME(D_BOOL,1,r);
0092     if ( (*((OP_TYPE *) o1) <= *((OP_TYPE *) o2)) &&
0093         (*((OP_TYPE *) o2) <= *((OP_TYPE *) o3))
0094     ) {
0095         *((bool *) r) = TRUE;
0096     } else {
0097         *((bool *) r) = FALSE;
0098     }
0099     break;
0100 
0101 case FC_GT + (OP_BASE):
0102     o1 = &stack[frame[framep]];
0103     o2 = &stack[frame[framep-1]];
0104     POP_FRAME(2);
0105     NEW_FRAME(D_BOOL,1,r);
0106     if ( *((OP_TYPE *) o1) > *((OP_TYPE *) o2) ) {
0107         *((bool *) r) = TRUE;
0108     } else {
0109         *((bool *) r) = FALSE;
0110     }
0111     break;
0112 
0113 case FC_GE + (OP_BASE):
0114     o1 = &stack[frame[framep]];
0115     o2 = &stack[frame[framep-1]];
0116     POP_FRAME(2);
0117     NEW_FRAME(D_BOOL,1,r);
0118     if ( *((OP_TYPE *) o1) >= *((OP_TYPE *) o2) ) {
0119         *((bool *) r) = TRUE;
0120     } else {
0121         *((bool *) r) = FALSE;
0122     }
0123     break;
0124 
0125 
0126 case FC_GTGT + (OP_BASE):
0127     o1 = &stack[frame[framep]];
0128     o2 = &stack[frame[framep-1]];
0129     o3 = &stack[frame[framep-2]];
0130     POP_FRAME(3);
0131     NEW_FRAME(D_BOOL,1,r);
0132     if ( (*((OP_TYPE *) o1) > *((OP_TYPE *) o2)) &&
0133         (*((OP_TYPE *) o2) > *((OP_TYPE *) o3))
0134     ) {
0135         *((bool *) r) = TRUE;
0136     } else {
0137         *((bool *) r) = FALSE;
0138     }
0139     break;
0140 
0141 case FC_GTGE + (OP_BASE):
0142     o1 = &stack[frame[framep]];
0143     o2 = &stack[frame[framep-1]];
0144     o3 = &stack[frame[framep-2]];
0145     POP_FRAME(3);
0146     NEW_FRAME(D_BOOL,1,r);
0147     if ( (*((OP_TYPE *) o1) > *((OP_TYPE *) o2)) &&
0148         (*((OP_TYPE *) o2) >= *((OP_TYPE *) o3))
0149     ) {
0150         *((bool *) r) = TRUE;
0151     } else {
0152         *((bool *) r) = FALSE;
0153     }
0154     break;
0155 
0156 case FC_GEGT + (OP_BASE):
0157     o1 = &stack[frame[framep]];
0158     o2 = &stack[frame[framep-1]];
0159     o3 = &stack[frame[framep-2]];
0160     POP_FRAME(3);
0161     NEW_FRAME(D_BOOL,1,r);
0162     if ( (*((OP_TYPE *) o1) >= *((OP_TYPE *) o2)) &&
0163         (*((OP_TYPE *) o2) > *((OP_TYPE *) o3))
0164     ) {
0165         *((bool *) r) = TRUE;
0166     } else {
0167         *((bool *) r) = FALSE;
0168     }
0169     break;
0170 
0171 case FC_GEGE + (OP_BASE):
0172     o1 = &stack[frame[framep]];
0173     o2 = &stack[frame[framep-1]];
0174     o3 = &stack[frame[framep-2]];
0175     POP_FRAME(3);
0176     NEW_FRAME(D_BOOL,1,r);
0177     if ( (*((OP_TYPE *) o1) >= *((OP_TYPE *) o2)) &&
0178         (*((OP_TYPE *) o2) >= *((OP_TYPE *) o3))
0179     ) {
0180         *((bool *) r) = TRUE;
0181     } else {
0182         *((bool *) r) = FALSE;
0183     }
0184     break;
0185 
0186 
0187 case FC_EQ + (OP_BASE):
0188     o1 = &stack[frame[framep]];
0189     o2 = &stack[frame[framep-1]];
0190     POP_FRAME(2);
0191     NEW_FRAME(D_BOOL,1,r);
0192     if ( *((OP_TYPE *) o1) == *((OP_TYPE *) o2) ) {
0193         *((bool *) r) = TRUE;
0194     } else {
0195         *((bool *) r) = FALSE;
0196     }
0197     break;
0198 
0199 case FC_NE + (OP_BASE):
0200     o1 = &stack[frame[framep]];
0201     o2 = &stack[frame[framep-1]];
0202     POP_FRAME(2);
0203     NEW_FRAME(D_BOOL,1,r);
0204     if ( *((OP_TYPE *) o1) != *((OP_TYPE *) o2) ) {
0205         *((bool *) r) = TRUE;
0206     } else {
0207         *((bool *) r) = FALSE;
0208     }
0209     break;
0210 
0211 #if 0
0212 /* this needs a specific implementation, probably ... :-( */
0213 case FC_CT + (OP_BASE):
0214     sf_report( "Warning: FC_CT not implemented properly\n" );
0215     o1 = &stack[frame[framep]];
0216     o2 = &stack[frame[framep-1]];
0217     POP_FRAME(2);
0218     NEW_FRAME(D_BOOL,1,r);
0219     if ( *((OP_TYPE *) o1) == *((OP_TYPE *) o2) ) {
0220         *((bool *) r) = TRUE;
0221     } else {
0222         *((bool *) r) = FALSE;
0223     }
0224     break;
0225 #endif