Lines Matching defs:cas
1337 void ppIRCAS ( IRCAS* cas )
1341 if (cas->oldHi != IRTemp_INVALID) {
1342 cas->oldHi);
1345 ppIRTemp(cas->oldLo);
1346 vex_printf(" = CAS%s(", cas->end==Iend_LE ? "le" : "be" );
1347 ppIRExpr(cas->addr);
1349 if (cas->expdHi) {
1350 ppIRExpr(cas->expdHi);
1353 ppIRExpr(cas->expdLo);
1355 if (cas->dataHi) {
1356 ppIRExpr(cas->dataHi);
1359 ppIRExpr(cas->dataLo);
1499 ppIRCAS(s->Ist.CAS.details);
1920 IRCAS* cas = LibVEX_Alloc(sizeof(IRCAS));
1921 cas->oldHi = oldHi;
1922 cas->oldLo = oldLo;
1923 cas->end = end;
1924 cas->addr = addr;
1925 cas->expdHi = expdHi;
1926 cas->expdLo = expdLo;
1927 cas->dataHi = dataHi;
1928 cas->dataLo = dataLo;
1929 return cas;
2043 IRStmt* IRStmt_CAS ( IRCAS* cas ) {
2046 s->Ist.CAS.details = cas;
2256 IRCAS* deepCopyIRCAS ( IRCAS* cas )
2258 return mkIRCAS( cas->oldHi, cas->oldLo, cas->end,
2259 deepCopyIRExpr(cas->addr),
2260 cas->expdHi==NULL ? NULL : deepCopyIRExpr(cas->expdHi),
2261 deepCopyIRExpr(cas->expdLo),
2262 cas->dataHi==NULL ? NULL : deepCopyIRExpr(cas->dataHi),
2263 deepCopyIRExpr(cas->dataLo) );
2314 return IRStmt_CAS(deepCopyIRCAS(s->Ist.CAS.details));
3484 IRCAS* cas;
3552 cas = st->Ist.CAS.details;
3553 return toBool( isIRAtom(cas->addr)
3554 && (cas->expdHi ? isIRAtom(cas->expdHi) : True)
3555 && isIRAtom(cas->expdLo)
3556 && (cas->dataHi ? isIRAtom(cas->dataHi) : True)
3557 && isIRAtom(cas->dataLo) );
3734 IRCAS* cas;
3773 cas = stmt->Ist.CAS.details;
3774 useBeforeDef_Expr(bb,stmt,cas->addr,def_counts);
3775 if (cas->expdHi)
3776 useBeforeDef_Expr(bb,stmt,cas->expdHi,def_counts);
3777 useBeforeDef_Expr(bb,stmt,cas->expdLo,def_counts);
3778 if (cas->dataHi)
3779 useBeforeDef_Expr(bb,stmt,cas->dataHi,def_counts);
3780 useBeforeDef_Expr(bb,stmt,cas->dataLo,def_counts);
4025 IRCAS* cas;
4118 cas = stmt->Ist.CAS.details;
4119 /* make sure it's definitely either a CAS or a DCAS */
4120 if (cas->oldHi == IRTemp_INVALID
4121 && cas->expdHi == NULL && cas->dataHi == NULL) {
4122 /* fine; it's a single cas */
4125 if (cas->oldHi != IRTemp_INVALID
4126 && cas->expdHi != NULL && cas->dataHi != NULL) {
4127 /* fine; it's a double cas */
4134 tcExpr( bb, stmt, cas->addr, gWordTy );
4135 if (typeOfIRExpr(tyenv, cas->addr) != gWordTy) goto bad_cas;
4137 tyExpd = typeOfIRExpr(tyenv, cas->expdLo);
4138 tyData = typeOfIRExpr(tyenv, cas->dataLo);
4140 if (tyExpd != typeOfIRTemp(tyenv, cas->oldLo))
4151 if (cas->oldHi != IRTemp_INVALID) {
4152 tyExpd = typeOfIRExpr(tyenv, cas->expdHi);
4153 tyData = typeOfIRExpr(tyenv, cas->dataHi);
4155 if (tyExpd != typeOfIRTemp(tyenv, cas->oldHi))
4159 if (typeOfIRTemp(tyenv, cas->oldHi)
4160 != typeOfIRTemp(tyenv, cas->oldLo))
4165 sanityCheckFail(bb,stmt,"IRStmt.CAS: ill-formed");
4357 IRCAS* cas;
4397 cas = stmt->Ist.CAS.details;
4398 if (cas->oldHi != IRTemp_INVALID) {
4399 if (cas->oldHi < 0 || cas->oldHi >= n_temps)
4401 "IRStmt.CAS: destination tmpHi is out of range");
4402 def_counts[cas->oldHi]++;
4403 if (def_counts[cas->oldHi] > 1)
4405 "IRStmt.CAS: destination tmpHi is assigned more than once");
4407 if (cas->oldLo < 0 || cas->oldLo >= n_temps)
4409 "IRStmt.CAS: destination tmpLo is out of range");
4410 def_counts[cas->oldLo]++;
4411 if (def_counts[cas->oldLo] > 1)
4413 "IRStmt.CAS: destination tmpLo is assigned more than once");