To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 3ccffbf2 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano
Browse files

Fixed syntax for STORE instruction

parent 31745239
......@@ -150,7 +150,7 @@ inst
| instResult instName 'SHIFTIREF' (ptr='PTR'?) '<' refTy=type offTy=type '>' opnd=value offset=value # InstShiftIRef
| instResult instName 'GETVARPARTIREF' (ptr='PTR'?) '<' refTy=type '>' opnd=value # InstGetVarPartIRef
| instResult instName 'LOAD' (ptr='PTR'?) memord? '<' type '>' loc=value excClause? # InstLoad
| instResult instName 'STORE' (ptr='PTR'?) memord? '<' type '>' loc=value newVal=value excClause? # InstStore
| instName 'STORE' (ptr='PTR'?) memord? '<' type '>' loc=value newVal=value excClause? # InstStore
| pairResult instName 'CMPXCHG' (ptr='PTR'?) (isWeak='WEAK'?) ordSucc=memord ordFail=memord '<' type '>' loc=value expected=value desired=value excClause? # InstCmpXchg
| instResult instName 'ATOMICRMW' (ptr='PTR'?) memord atomicrmwop '<' type '>' loc=value opnd=value excClause? # InstAtomicRMW
| instName 'FENCE' memord # InstFence
......@@ -158,8 +158,8 @@ inst
| instResults instName 'WATCHPOINT' wpid typeList dis=destClause ena=destClause ('WPEXC' '(' wpExc=destClause ')')? keepaliveClause? # InstWatchPoint
| instName 'WPBRANCH' wpid dis=destClause ena=destClause # InstWPBranch
| instResults instName 'CCALL' callConv '<' funcTy=type funcSig '>' callee=value argList excClause? keepaliveClause? # InstCCall
| instResult instName 'NEWTHREAD' stack=value ('THREADLOCAL' '(' threadLocal=value ')')? newStackClause excClause? # InstNewThread
| instResults instName 'SWAPSTACK' swappee=value curStackClause newStackClause excClause? keepaliveClause? # InstSwapStack
| instResult instName 'NEWTHREAD' stack=value ('THREADLOCAL' '(' threadLocal=value ')')? newStackClause excClause? # InstNewThread
| instResults instName 'SWAPSTACK' swappee=value curStackClause newStackClause excClause? keepaliveClause? # InstSwapStack
| instResults instName 'COMMINST' commInst ('[' flags+=flag* ']')? ('<' tys+=type* '>')? ('<[' sigs+=funcSig* ']>')? ('(' args+=value* ')')? excClause? keepaliveClause? # InstCommInst
;
......
......@@ -3214,10 +3214,6 @@ antlrcpp::Any UIRParser::InstAllocaContext::accept(tree::ParseTreeVisitor *visit
}
//----------------- InstStoreContext ------------------------------------------------------------------
UIRParser::InstResultContext* UIRParser::InstStoreContext::instResult() {
return getRuleContext<UIRParser::InstResultContext>(0);
}
UIRParser::InstNameContext* UIRParser::InstStoreContext::instName() {
return getRuleContext<UIRParser::InstNameContext>(0);
}
......@@ -3495,7 +3491,7 @@ UIRParser::InstContext* UIRParser::inst() {
exitRule();
});
try {
setState(829);
setState(828);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 68, _ctx)) {
case 1: {
......@@ -4217,21 +4213,19 @@ UIRParser::InstContext* UIRParser::inst() {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstStoreContext>(_localctx));
enterOuterAlt(_localctx, 28);
setState(647);
instResult();
setState(648);
instName();
setState(649);
setState(648);
match(UIRParser::T__65);
setState(651);
setState(650);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__60) {
setState(650);
setState(649);
dynamic_cast<InstStoreContext *>(_localctx)->ptr = match(UIRParser::T__60);
}
setState(654);
setState(653);
_errHandler->sync(this);
_la = _input->LA(1);
......@@ -4243,25 +4237,25 @@ UIRParser::InstContext* UIRParser::inst() {
| (1ULL << (UIRParser::T__147 - 144))
| (1ULL << (UIRParser::T__148 - 144))
| (1ULL << (UIRParser::T__149 - 144)))) != 0)) {
setState(653);
setState(652);
memord();
}
setState(656);
setState(655);
match(UIRParser::T__5);
setState(657);
setState(656);
type();
setState(658);
setState(657);
match(UIRParser::T__6);
setState(659);
setState(658);
dynamic_cast<InstStoreContext *>(_localctx)->loc = value();
setState(660);
setState(659);
dynamic_cast<InstStoreContext *>(_localctx)->newVal = value();
setState(662);
setState(661);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(661);
setState(660);
excClause();
}
break;
......@@ -4270,52 +4264,52 @@ UIRParser::InstContext* UIRParser::inst() {
case 29: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstCmpXchgContext>(_localctx));
enterOuterAlt(_localctx, 29);
setState(664);
setState(663);
pairResult();
setState(665);
setState(664);
instName();
setState(666);
setState(665);
match(UIRParser::T__66);
setState(668);
setState(667);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__60) {
setState(667);
setState(666);
dynamic_cast<InstCmpXchgContext *>(_localctx)->ptr = match(UIRParser::T__60);
}
setState(671);
setState(670);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__67) {
setState(670);
setState(669);
dynamic_cast<InstCmpXchgContext *>(_localctx)->isWeak = match(UIRParser::T__67);
}
setState(673);
setState(672);
dynamic_cast<InstCmpXchgContext *>(_localctx)->ordSucc = memord();
setState(674);
setState(673);
dynamic_cast<InstCmpXchgContext *>(_localctx)->ordFail = memord();
setState(675);
setState(674);
match(UIRParser::T__5);
setState(676);
setState(675);
type();
setState(677);
setState(676);
match(UIRParser::T__6);
setState(678);
setState(677);
dynamic_cast<InstCmpXchgContext *>(_localctx)->loc = value();
setState(679);
setState(678);
dynamic_cast<InstCmpXchgContext *>(_localctx)->expected = value();
setState(680);
setState(679);
dynamic_cast<InstCmpXchgContext *>(_localctx)->desired = value();
setState(682);
setState(681);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(681);
setState(680);
excClause();
}
break;
......@@ -4324,41 +4318,41 @@ UIRParser::InstContext* UIRParser::inst() {
case 30: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstAtomicRMWContext>(_localctx));
enterOuterAlt(_localctx, 30);
setState(684);
setState(683);
instResult();
setState(685);
setState(684);
instName();
setState(686);
setState(685);
match(UIRParser::T__68);
setState(688);
setState(687);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__60) {
setState(687);
setState(686);
dynamic_cast<InstAtomicRMWContext *>(_localctx)->ptr = match(UIRParser::T__60);
}
setState(690);
setState(689);
memord();
setState(691);
setState(690);
atomicrmwop();
setState(692);
setState(691);
match(UIRParser::T__5);
setState(693);
setState(692);
type();
setState(694);
setState(693);
match(UIRParser::T__6);
setState(695);
setState(694);
dynamic_cast<InstAtomicRMWContext *>(_localctx)->loc = value();
setState(696);
setState(695);
dynamic_cast<InstAtomicRMWContext *>(_localctx)->opnd = value();
setState(698);
setState(697);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(697);
setState(696);
excClause();
}
break;
......@@ -4367,11 +4361,11 @@ UIRParser::InstContext* UIRParser::inst() {
case 31: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstFenceContext>(_localctx));
enterOuterAlt(_localctx, 31);
setState(700);
setState(699);
instName();
setState(701);
setState(700);
match(UIRParser::T__69);
setState(702);
setState(701);
memord();
break;
}
......@@ -4379,23 +4373,23 @@ UIRParser::InstContext* UIRParser::inst() {
case 32: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstTrapContext>(_localctx));
enterOuterAlt(_localctx, 32);
setState(704);
setState(703);
instResults();
setState(705);
setState(704);
instName();
setState(706);
setState(705);
match(UIRParser::T__70);
setState(707);
setState(706);
typeList();
setState(709);
setState(708);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(708);
setState(707);
excClause();
}
setState(711);
setState(710);
keepaliveClause();
break;
}
......@@ -4403,40 +4397,40 @@ UIRParser::InstContext* UIRParser::inst() {
case 33: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstWatchPointContext>(_localctx));
enterOuterAlt(_localctx, 33);
setState(713);
setState(712);
instResults();
setState(714);
setState(713);
instName();
setState(715);
setState(714);
match(UIRParser::T__71);
setState(716);
setState(715);
wpid();
setState(717);
setState(716);
typeList();
setState(718);
setState(717);
dynamic_cast<InstWatchPointContext *>(_localctx)->dis = destClause();
setState(719);
setState(718);
dynamic_cast<InstWatchPointContext *>(_localctx)->ena = destClause();
setState(725);
setState(724);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__72) {
setState(720);
setState(719);
match(UIRParser::T__72);
setState(721);
setState(720);
match(UIRParser::T__33);
setState(722);
setState(721);
dynamic_cast<InstWatchPointContext *>(_localctx)->wpExc = destClause();
setState(723);
setState(722);
match(UIRParser::T__34);
}
setState(728);
setState(727);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__82) {
setState(727);
setState(726);
keepaliveClause();
}
break;
......@@ -4445,15 +4439,15 @@ UIRParser::InstContext* UIRParser::inst() {
case 34: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstWPBranchContext>(_localctx));
enterOuterAlt(_localctx, 34);
setState(730);
setState(729);
instName();
setState(731);
setState(730);
match(UIRParser::T__73);
setState(732);
setState(731);
wpid();
setState(733);
setState(732);
dynamic_cast<InstWPBranchContext *>(_localctx)->dis = destClause();
setState(734);
setState(733);
dynamic_cast<InstWPBranchContext *>(_localctx)->ena = destClause();
break;
}
......@@ -4461,40 +4455,40 @@ UIRParser::InstContext* UIRParser::inst() {
case 35: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstCCallContext>(_localctx));
enterOuterAlt(_localctx, 35);
setState(736);
setState(735);
instResults();
setState(737);
setState(736);
instName();
setState(738);
setState(737);
match(UIRParser::T__74);
setState(739);
setState(738);
callConv();
setState(740);
setState(739);
match(UIRParser::T__5);
setState(741);
setState(740);
dynamic_cast<InstCCallContext *>(_localctx)->funcTy = type();
setState(742);
setState(741);
funcSig();
setState(743);
setState(742);
match(UIRParser::T__6);
setState(744);
setState(743);
dynamic_cast<InstCCallContext *>(_localctx)->callee = value();
setState(745);
setState(744);
argList();
setState(747);
setState(746);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(746);
setState(745);
excClause();
}
setState(750);
setState(749);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__82) {
setState(749);
setState(748);
keepaliveClause();
}
break;
......@@ -4503,36 +4497,36 @@ UIRParser::InstContext* UIRParser::inst() {
case 36: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstNewThreadContext>(_localctx));
enterOuterAlt(_localctx, 36);
setState(752);
setState(751);
instResult();
setState(753);
setState(752);
instName();
setState(754);
setState(753);
match(UIRParser::T__75);
setState(755);
setState(754);
dynamic_cast<InstNewThreadContext *>(_localctx)->stack = value();
setState(761);
setState(760);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__76) {
setState(756);
setState(755);
match(UIRParser::T__76);
setState(757);
setState(756);
match(UIRParser::T__33);
setState(758);
setState(757);
dynamic_cast<InstNewThreadContext *>(_localctx)->threadLocal = value();
setState(759);
setState(758);
match(UIRParser::T__34);
}
setState(763);
setState(762);
newStackClause();
setState(765);
setState(764);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(764);
setState(763);
excClause();
}
break;
......@@ -4541,32 +4535,32 @@ UIRParser::InstContext* UIRParser::inst() {
case 37: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstSwapStackContext>(_localctx));
enterOuterAlt(_localctx, 37);
setState(767);
setState(766);
instResults();
setState(768);
setState(767);
instName();
setState(769);
setState(768);
match(UIRParser::T__77);
setState(770);
setState(769);
dynamic_cast<InstSwapStackContext *>(_localctx)->swappee = value();
setState(771);
setState(770);
curStackClause();
setState(772);
setState(771);
newStackClause();
setState(774);
setState(773);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__81) {
setState(773);
setState(772);
excClause();
}
setState(777);
setState(776);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__82) {
setState(776);
setState(775);
keepaliveClause();
}
break;
......@@ -4575,22 +4569,22 @@ UIRParser::InstContext* UIRParser::inst() {
case 38: {
_localctx = dynamic_cast<InstContext *>(_tracker.createInstance<UIRParser::InstCommInstContext>(_localctx));
enterOuterAlt(_localctx, 38);
setState(779);
setState(778);
instResults();
setState(780);
setState(779);
instName();
setState(781);
setState(780);
match(UIRParser::T__78);
setState(782);
setState(781);
commInst();
setState(791);
setState(790);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 59, _ctx)) {
case 1: {
setState(783);
setState(782);
match(UIRParser::T__38);
setState(787);
setState(786);
_errHandler->sync(this);
_la = _input->LA(1);
while (((((_la - 157) & ~ 0x3fULL) == 0) &&
......@@ -4599,27 +4593,27 @@ UIRParser::InstContext* UIRParser::inst() {
| (1ULL << (UIRParser::T__158 - 157))
| (1ULL << (UIRParser::T__159 - 157))
| (1ULL << (UIRParser::T__160 - 157)))) != 0)) {
setState(784);
setState(783);
dynamic_cast<InstCommInstContext *>(_localctx)->flagContext = flag();
dynamic_cast<InstCommInstContext *>(_localctx)->flags.push_back(dynamic_cast<InstCommInstContext *>(_localctx)->flagContext);
setState(789);
setState(788);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(790);
setState(789);
match(UIRParser::T__39);
break;
}
}
setState(801);
setState(800);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__5) {
setState(793);
setState(792);
match(UIRParser::T__5);
setState(797);
setState(796);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
......@@ -4645,81 +4639,81 @@ UIRParser::InstContext* UIRParser::inst() {
((1ULL << (_la - 172)) & ((1ULL << (UIRParser::NAME - 172))
| (1ULL << (UIRParser::GLOBAL_NAME - 172))
| (1ULL << (UIRParser::LOCAL_NAME - 172)))) != 0)) {
setState(794);
setState(793);
dynamic_cast<InstCommInstContext *>(_localctx)->typeContext = type();
dynamic_cast<InstCommInstContext *>(_localctx)->tys.push_back(dynamic_cast<InstCommInstContext *>(_localctx)->typeContext);
setState(799);
setState(798);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(800);
setState(799);
match(UIRParser::T__6);
}
setState(811);
setState(810);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == UIRParser::T__79) {
setState(803);
setState(802);
match(UIRParser::T__79);
setState(807);
setState(806);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == UIRParser::T__33 || ((((_la - 172) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 172)) & ((1ULL << (UIRParser::NAME - 172))
| (1ULL << (UIRParser::GLOBAL_NAME - 172))
| (1ULL << (UIRParser::LOCAL_NAME - 172)))) != 0)) {
setState(804);
setState(803);
dynamic_cast<InstCommInstContext *>(_localctx)->funcSigContext = funcSig();
dynamic_cast<InstCommInstContext *>(_localctx)->sigs.push_back(dynamic_cast<InstCommInstContext *>(_localctx)->funcSigContext);
setState(809);
setState(808);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(810);
setState(809);
match(UIRParser::T__80);
}
setState(821);
setState(820);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 65, _ctx)) {
case 1: {
setState(813);
setState(812);
match(UIRParser::T__33);