delocate: translate uleb128 and sleb128 directives
These directives contain labels that need to be mapped by delocate. This
starts to bite with DWARF5. Also, auto-detect whether the compiler is
emitting file directives with MD5 checksums and match that for the dummy
entry.
Change-Id: Ia6f3803287354bc77042a5629cf7e94ceb11b9f9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36184
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/util/fipstools/delocate/delocate.go b/util/fipstools/delocate/delocate.go
index 593abec..a43b428 100644
--- a/util/fipstools/delocate/delocate.go
+++ b/util/fipstools/delocate/delocate.go
@@ -1269,6 +1269,10 @@
// maxObservedFileNumber contains the largest seen file number in a
// .file directive. Zero is not a valid number.
maxObservedFileNumber := 0
+ // fileDirectivesContainMD5 is true if the compiler is outputting MD5
+ // checksums in .file directives. If it does so, then this script needs
+ // to match that behaviour otherwise warnings result.
+ fileDirectivesContainMD5 := false
// OPENSSL_ia32cap_get will be synthesized by this script.
symbols["OPENSSL_ia32cap_get"] = struct{}{}
@@ -1328,6 +1332,12 @@
if fileNo > maxObservedFileNumber {
maxObservedFileNumber = fileNo
}
+
+ for _, token := range parts[2:] {
+ if token == "md5" {
+ fileDirectivesContainMD5 = true
+ }
+ }
}, ruleStatement, ruleLocationDirective)
}
@@ -1348,7 +1358,11 @@
}
w.WriteString(".text\n")
- w.WriteString(fmt.Sprintf(".file %d \"inserted_by_delocate.c\"\n", maxObservedFileNumber+1))
+ var fileTrailing string
+ if fileDirectivesContainMD5 {
+ fileTrailing = " md5 0x00000000000000000000000000000000"
+ }
+ w.WriteString(fmt.Sprintf(".file %d \"inserted_by_delocate.c\"%s\n", maxObservedFileNumber+1, fileTrailing))
w.WriteString(fmt.Sprintf(".loc %d 1 0\n", maxObservedFileNumber+1))
w.WriteString("BORINGSSL_bcm_text_start:\n")
diff --git a/util/fipstools/delocate/delocate.peg b/util/fipstools/delocate/delocate.peg
index 82a3cb5..b24a47a 100644
--- a/util/fipstools/delocate/delocate.peg
+++ b/util/fipstools/delocate/delocate.peg
@@ -36,7 +36,7 @@
QuotedArg <- '"' QuotedText '"'
QuotedText <- (EscapedChar / [^"])*
LabelContainingDirective <- LabelContainingDirectiveName WS SymbolArgs
-LabelContainingDirectiveName <- ".long" / ".set" / ".8byte" / ".4byte" / ".quad" / ".tc" / ".localentry" / ".size" / ".type"
+LabelContainingDirectiveName <- ".long" / ".set" / ".8byte" / ".4byte" / ".quad" / ".tc" / ".localentry" / ".size" / ".type" / ".uleb128" / ".sleb128"
SymbolArgs <- SymbolArg ((WS? ',' WS?) SymbolArg)*
SymbolArg <- Offset /
SymbolType /
diff --git a/util/fipstools/delocate/delocate.peg.go b/util/fipstools/delocate/delocate.peg.go
index e147943..298f55c 100644
--- a/util/fipstools/delocate/delocate.peg.go
+++ b/util/fipstools/delocate/delocate.peg.go
@@ -1260,7 +1260,7 @@
position, tokenIndex = position131, tokenIndex131
return false
},
- /* 11 LabelContainingDirectiveName <- <(('.' ('l' / 'L') ('o' / 'O') ('n' / 'N') ('g' / 'G')) / ('.' ('s' / 'S') ('e' / 'E') ('t' / 'T')) / ('.' '8' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' '4' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' ('q' / 'Q') ('u' / 'U') ('a' / 'A') ('d' / 'D')) / ('.' ('t' / 'T') ('c' / 'C')) / ('.' ('l' / 'L') ('o' / 'O') ('c' / 'C') ('a' / 'A') ('l' / 'L') ('e' / 'E') ('n' / 'N') ('t' / 'T') ('r' / 'R') ('y' / 'Y')) / ('.' ('s' / 'S') ('i' / 'I') ('z' / 'Z') ('e' / 'E')) / ('.' ('t' / 'T') ('y' / 'Y') ('p' / 'P') ('e' / 'E')))> */
+ /* 11 LabelContainingDirectiveName <- <(('.' ('l' / 'L') ('o' / 'O') ('n' / 'N') ('g' / 'G')) / ('.' ('s' / 'S') ('e' / 'E') ('t' / 'T')) / ('.' '8' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' '4' ('b' / 'B') ('y' / 'Y') ('t' / 'T') ('e' / 'E')) / ('.' ('q' / 'Q') ('u' / 'U') ('a' / 'A') ('d' / 'D')) / ('.' ('t' / 'T') ('c' / 'C')) / ('.' ('l' / 'L') ('o' / 'O') ('c' / 'C') ('a' / 'A') ('l' / 'L') ('e' / 'E') ('n' / 'N') ('t' / 'T') ('r' / 'R') ('y' / 'Y')) / ('.' ('s' / 'S') ('i' / 'I') ('z' / 'Z') ('e' / 'E')) / ('.' ('t' / 'T') ('y' / 'Y') ('p' / 'P') ('e' / 'E')) / ('.' ('u' / 'U') ('l' / 'L') ('e' / 'E') ('b' / 'B') '1' '2' '8') / ('.' ('s' / 'S') ('l' / 'L') ('e' / 'E') ('b' / 'B') '1' '2' '8'))> */
func() bool {
position133, tokenIndex133 := position, tokenIndex
{
@@ -1857,69 +1857,227 @@
l205:
position, tokenIndex = position135, tokenIndex135
if buffer[position] != rune('.') {
+ goto l214
+ }
+ position++
+ {
+ position215, tokenIndex215 := position, tokenIndex
+ if buffer[position] != rune('t') {
+ goto l216
+ }
+ position++
+ goto l215
+ l216:
+ position, tokenIndex = position215, tokenIndex215
+ if buffer[position] != rune('T') {
+ goto l214
+ }
+ position++
+ }
+ l215:
+ {
+ position217, tokenIndex217 := position, tokenIndex
+ if buffer[position] != rune('y') {
+ goto l218
+ }
+ position++
+ goto l217
+ l218:
+ position, tokenIndex = position217, tokenIndex217
+ if buffer[position] != rune('Y') {
+ goto l214
+ }
+ position++
+ }
+ l217:
+ {
+ position219, tokenIndex219 := position, tokenIndex
+ if buffer[position] != rune('p') {
+ goto l220
+ }
+ position++
+ goto l219
+ l220:
+ position, tokenIndex = position219, tokenIndex219
+ if buffer[position] != rune('P') {
+ goto l214
+ }
+ position++
+ }
+ l219:
+ {
+ position221, tokenIndex221 := position, tokenIndex
+ if buffer[position] != rune('e') {
+ goto l222
+ }
+ position++
+ goto l221
+ l222:
+ position, tokenIndex = position221, tokenIndex221
+ if buffer[position] != rune('E') {
+ goto l214
+ }
+ position++
+ }
+ l221:
+ goto l135
+ l214:
+ position, tokenIndex = position135, tokenIndex135
+ if buffer[position] != rune('.') {
+ goto l223
+ }
+ position++
+ {
+ position224, tokenIndex224 := position, tokenIndex
+ if buffer[position] != rune('u') {
+ goto l225
+ }
+ position++
+ goto l224
+ l225:
+ position, tokenIndex = position224, tokenIndex224
+ if buffer[position] != rune('U') {
+ goto l223
+ }
+ position++
+ }
+ l224:
+ {
+ position226, tokenIndex226 := position, tokenIndex
+ if buffer[position] != rune('l') {
+ goto l227
+ }
+ position++
+ goto l226
+ l227:
+ position, tokenIndex = position226, tokenIndex226
+ if buffer[position] != rune('L') {
+ goto l223
+ }
+ position++
+ }
+ l226:
+ {
+ position228, tokenIndex228 := position, tokenIndex
+ if buffer[position] != rune('e') {
+ goto l229
+ }
+ position++
+ goto l228
+ l229:
+ position, tokenIndex = position228, tokenIndex228
+ if buffer[position] != rune('E') {
+ goto l223
+ }
+ position++
+ }
+ l228:
+ {
+ position230, tokenIndex230 := position, tokenIndex
+ if buffer[position] != rune('b') {
+ goto l231
+ }
+ position++
+ goto l230
+ l231:
+ position, tokenIndex = position230, tokenIndex230
+ if buffer[position] != rune('B') {
+ goto l223
+ }
+ position++
+ }
+ l230:
+ if buffer[position] != rune('1') {
+ goto l223
+ }
+ position++
+ if buffer[position] != rune('2') {
+ goto l223
+ }
+ position++
+ if buffer[position] != rune('8') {
+ goto l223
+ }
+ position++
+ goto l135
+ l223:
+ position, tokenIndex = position135, tokenIndex135
+ if buffer[position] != rune('.') {
goto l133
}
position++
{
- position214, tokenIndex214 := position, tokenIndex
- if buffer[position] != rune('t') {
- goto l215
+ position232, tokenIndex232 := position, tokenIndex
+ if buffer[position] != rune('s') {
+ goto l233
}
position++
- goto l214
- l215:
- position, tokenIndex = position214, tokenIndex214
- if buffer[position] != rune('T') {
+ goto l232
+ l233:
+ position, tokenIndex = position232, tokenIndex232
+ if buffer[position] != rune('S') {
goto l133
}
position++
}
- l214:
+ l232:
{
- position216, tokenIndex216 := position, tokenIndex
- if buffer[position] != rune('y') {
- goto l217
+ position234, tokenIndex234 := position, tokenIndex
+ if buffer[position] != rune('l') {
+ goto l235
}
position++
- goto l216
- l217:
- position, tokenIndex = position216, tokenIndex216
- if buffer[position] != rune('Y') {
+ goto l234
+ l235:
+ position, tokenIndex = position234, tokenIndex234
+ if buffer[position] != rune('L') {
goto l133
}
position++
}
- l216:
+ l234:
{
- position218, tokenIndex218 := position, tokenIndex
- if buffer[position] != rune('p') {
- goto l219
- }
- position++
- goto l218
- l219:
- position, tokenIndex = position218, tokenIndex218
- if buffer[position] != rune('P') {
- goto l133
- }
- position++
- }
- l218:
- {
- position220, tokenIndex220 := position, tokenIndex
+ position236, tokenIndex236 := position, tokenIndex
if buffer[position] != rune('e') {
- goto l221
+ goto l237
}
position++
- goto l220
- l221:
- position, tokenIndex = position220, tokenIndex220
+ goto l236
+ l237:
+ position, tokenIndex = position236, tokenIndex236
if buffer[position] != rune('E') {
goto l133
}
position++
}
- l220:
+ l236:
+ {
+ position238, tokenIndex238 := position, tokenIndex
+ if buffer[position] != rune('b') {
+ goto l239
+ }
+ position++
+ goto l238
+ l239:
+ position, tokenIndex = position238, tokenIndex238
+ if buffer[position] != rune('B') {
+ goto l133
+ }
+ position++
+ }
+ l238:
+ if buffer[position] != rune('1') {
+ goto l133
+ }
+ position++
+ if buffer[position] != rune('2') {
+ goto l133
+ }
+ position++
+ if buffer[position] != rune('8') {
+ goto l133
+ }
+ position++
}
l135:
add(ruleLabelContainingDirectiveName, position134)
@@ -1931,570 +2089,460 @@
},
/* 12 SymbolArgs <- <(SymbolArg (WS? ',' WS? SymbolArg)*)> */
func() bool {
- position222, tokenIndex222 := position, tokenIndex
+ position240, tokenIndex240 := position, tokenIndex
{
- position223 := position
+ position241 := position
if !_rules[ruleSymbolArg]() {
- goto l222
+ goto l240
}
- l224:
+ l242:
{
- position225, tokenIndex225 := position, tokenIndex
+ position243, tokenIndex243 := position, tokenIndex
{
- position226, tokenIndex226 := position, tokenIndex
+ position244, tokenIndex244 := position, tokenIndex
if !_rules[ruleWS]() {
- goto l226
+ goto l244
}
- goto l227
- l226:
- position, tokenIndex = position226, tokenIndex226
+ goto l245
+ l244:
+ position, tokenIndex = position244, tokenIndex244
}
- l227:
+ l245:
if buffer[position] != rune(',') {
- goto l225
+ goto l243
}
position++
{
- position228, tokenIndex228 := position, tokenIndex
+ position246, tokenIndex246 := position, tokenIndex
if !_rules[ruleWS]() {
- goto l228
+ goto l246
}
- goto l229
- l228:
- position, tokenIndex = position228, tokenIndex228
+ goto l247
+ l246:
+ position, tokenIndex = position246, tokenIndex246
}
- l229:
+ l247:
if !_rules[ruleSymbolArg]() {
- goto l225
+ goto l243
}
- goto l224
- l225:
- position, tokenIndex = position225, tokenIndex225
+ goto l242
+ l243:
+ position, tokenIndex = position243, tokenIndex243
}
- add(ruleSymbolArgs, position223)
+ add(ruleSymbolArgs, position241)
}
return true
- l222:
- position, tokenIndex = position222, tokenIndex222
+ l240:
+ position, tokenIndex = position240, tokenIndex240
return false
},
/* 13 SymbolArg <- <(Offset / SymbolType / ((Offset / LocalSymbol / SymbolName / Dot) WS? Operator WS? (Offset / LocalSymbol / SymbolName)) / (LocalSymbol TCMarker?) / (SymbolName Offset) / (SymbolName TCMarker?))> */
func() bool {
- position230, tokenIndex230 := position, tokenIndex
+ position248, tokenIndex248 := position, tokenIndex
{
- position231 := position
+ position249 := position
{
- position232, tokenIndex232 := position, tokenIndex
+ position250, tokenIndex250 := position, tokenIndex
if !_rules[ruleOffset]() {
- goto l233
+ goto l251
}
- goto l232
- l233:
- position, tokenIndex = position232, tokenIndex232
+ goto l250
+ l251:
+ position, tokenIndex = position250, tokenIndex250
if !_rules[ruleSymbolType]() {
- goto l234
+ goto l252
}
- goto l232
- l234:
- position, tokenIndex = position232, tokenIndex232
+ goto l250
+ l252:
+ position, tokenIndex = position250, tokenIndex250
{
- position236, tokenIndex236 := position, tokenIndex
+ position254, tokenIndex254 := position, tokenIndex
if !_rules[ruleOffset]() {
- goto l237
+ goto l255
}
- goto l236
- l237:
- position, tokenIndex = position236, tokenIndex236
+ goto l254
+ l255:
+ position, tokenIndex = position254, tokenIndex254
if !_rules[ruleLocalSymbol]() {
- goto l238
+ goto l256
}
- goto l236
- l238:
- position, tokenIndex = position236, tokenIndex236
+ goto l254
+ l256:
+ position, tokenIndex = position254, tokenIndex254
if !_rules[ruleSymbolName]() {
- goto l239
+ goto l257
}
- goto l236
- l239:
- position, tokenIndex = position236, tokenIndex236
+ goto l254
+ l257:
+ position, tokenIndex = position254, tokenIndex254
if !_rules[ruleDot]() {
- goto l235
+ goto l253
}
}
- l236:
+ l254:
{
- position240, tokenIndex240 := position, tokenIndex
+ position258, tokenIndex258 := position, tokenIndex
if !_rules[ruleWS]() {
- goto l240
+ goto l258
}
- goto l241
- l240:
- position, tokenIndex = position240, tokenIndex240
+ goto l259
+ l258:
+ position, tokenIndex = position258, tokenIndex258
}
- l241:
+ l259:
if !_rules[ruleOperator]() {
- goto l235
+ goto l253
}
{
- position242, tokenIndex242 := position, tokenIndex
+ position260, tokenIndex260 := position, tokenIndex
if !_rules[ruleWS]() {
- goto l242
+ goto l260
}
- goto l243
- l242:
- position, tokenIndex = position242, tokenIndex242
+ goto l261
+ l260:
+ position, tokenIndex = position260, tokenIndex260
}
- l243:
+ l261:
{
- position244, tokenIndex244 := position, tokenIndex
+ position262, tokenIndex262 := position, tokenIndex
if !_rules[ruleOffset]() {
- goto l245
+ goto l263
}
- goto l244
- l245:
- position, tokenIndex = position244, tokenIndex244
+ goto l262
+ l263:
+ position, tokenIndex = position262, tokenIndex262
if !_rules[ruleLocalSymbol]() {
- goto l246
+ goto l264
}
- goto l244
- l246:
- position, tokenIndex = position244, tokenIndex244
+ goto l262
+ l264:
+ position, tokenIndex = position262, tokenIndex262
if !_rules[ruleSymbolName]() {
- goto l235
+ goto l253
}
}
- l244:
- goto l232
- l235:
- position, tokenIndex = position232, tokenIndex232
+ l262:
+ goto l250
+ l253:
+ position, tokenIndex = position250, tokenIndex250
if !_rules[ruleLocalSymbol]() {
- goto l247
+ goto l265
}
{
- position248, tokenIndex248 := position, tokenIndex
+ position266, tokenIndex266 := position, tokenIndex
if !_rules[ruleTCMarker]() {
- goto l248
+ goto l266
}
- goto l249
- l248:
- position, tokenIndex = position248, tokenIndex248
+ goto l267
+ l266:
+ position, tokenIndex = position266, tokenIndex266
}
- l249:
- goto l232
- l247:
- position, tokenIndex = position232, tokenIndex232
+ l267:
+ goto l250
+ l265:
+ position, tokenIndex = position250, tokenIndex250
if !_rules[ruleSymbolName]() {
- goto l250
+ goto l268
}
if !_rules[ruleOffset]() {
- goto l250
+ goto l268
}
- goto l232
- l250:
- position, tokenIndex = position232, tokenIndex232
+ goto l250
+ l268:
+ position, tokenIndex = position250, tokenIndex250
if !_rules[ruleSymbolName]() {
- goto l230
+ goto l248
}
{
- position251, tokenIndex251 := position, tokenIndex
+ position269, tokenIndex269 := position, tokenIndex
if !_rules[ruleTCMarker]() {
- goto l251
+ goto l269
}
- goto l252
- l251:
- position, tokenIndex = position251, tokenIndex251
+ goto l270
+ l269:
+ position, tokenIndex = position269, tokenIndex269
}
- l252:
+ l270:
}
- l232:
- add(ruleSymbolArg, position231)
+ l250:
+ add(ruleSymbolArg, position249)
}
return true
- l230:
- position, tokenIndex = position230, tokenIndex230
+ l248:
+ position, tokenIndex = position248, tokenIndex248
return false
},
/* 14 SymbolType <- <(('@' 'f' 'u' 'n' 'c' 't' 'i' 'o' 'n') / ('@' 'o' 'b' 'j' 'e' 'c' 't'))> */
func() bool {
- position253, tokenIndex253 := position, tokenIndex
- {
- position254 := position
- {
- position255, tokenIndex255 := position, tokenIndex
- if buffer[position] != rune('@') {
- goto l256
- }
- position++
- if buffer[position] != rune('f') {
- goto l256
- }
- position++
- if buffer[position] != rune('u') {
- goto l256
- }
- position++
- if buffer[position] != rune('n') {
- goto l256
- }
- position++
- if buffer[position] != rune('c') {
- goto l256
- }
- position++
- if buffer[position] != rune('t') {
- goto l256
- }
- position++
- if buffer[position] != rune('i') {
- goto l256
- }
- position++
- if buffer[position] != rune('o') {
- goto l256
- }
- position++
- if buffer[position] != rune('n') {
- goto l256
- }
- position++
- goto l255
- l256:
- position, tokenIndex = position255, tokenIndex255
- if buffer[position] != rune('@') {
- goto l253
- }
- position++
- if buffer[position] != rune('o') {
- goto l253
- }
- position++
- if buffer[position] != rune('b') {
- goto l253
- }
- position++
- if buffer[position] != rune('j') {
- goto l253
- }
- position++
- if buffer[position] != rune('e') {
- goto l253
- }
- position++
- if buffer[position] != rune('c') {
- goto l253
- }
- position++
- if buffer[position] != rune('t') {
- goto l253
- }
- position++
- }
- l255:
- add(ruleSymbolType, position254)
- }
- return true
- l253:
- position, tokenIndex = position253, tokenIndex253
- return false
- },
- /* 15 Dot <- <'.'> */
- func() bool {
- position257, tokenIndex257 := position, tokenIndex
- {
- position258 := position
- if buffer[position] != rune('.') {
- goto l257
- }
- position++
- add(ruleDot, position258)
- }
- return true
- l257:
- position, tokenIndex = position257, tokenIndex257
- return false
- },
- /* 16 TCMarker <- <('[' 'T' 'C' ']')> */
- func() bool {
- position259, tokenIndex259 := position, tokenIndex
- {
- position260 := position
- if buffer[position] != rune('[') {
- goto l259
- }
- position++
- if buffer[position] != rune('T') {
- goto l259
- }
- position++
- if buffer[position] != rune('C') {
- goto l259
- }
- position++
- if buffer[position] != rune(']') {
- goto l259
- }
- position++
- add(ruleTCMarker, position260)
- }
- return true
- l259:
- position, tokenIndex = position259, tokenIndex259
- return false
- },
- /* 17 EscapedChar <- <('\\' .)> */
- func() bool {
- position261, tokenIndex261 := position, tokenIndex
- {
- position262 := position
- if buffer[position] != rune('\\') {
- goto l261
- }
- position++
- if !matchDot() {
- goto l261
- }
- add(ruleEscapedChar, position262)
- }
- return true
- l261:
- position, tokenIndex = position261, tokenIndex261
- return false
- },
- /* 18 WS <- <(' ' / '\t')+> */
- func() bool {
- position263, tokenIndex263 := position, tokenIndex
- {
- position264 := position
- {
- position267, tokenIndex267 := position, tokenIndex
- if buffer[position] != rune(' ') {
- goto l268
- }
- position++
- goto l267
- l268:
- position, tokenIndex = position267, tokenIndex267
- if buffer[position] != rune('\t') {
- goto l263
- }
- position++
- }
- l267:
- l265:
- {
- position266, tokenIndex266 := position, tokenIndex
- {
- position269, tokenIndex269 := position, tokenIndex
- if buffer[position] != rune(' ') {
- goto l270
- }
- position++
- goto l269
- l270:
- position, tokenIndex = position269, tokenIndex269
- if buffer[position] != rune('\t') {
- goto l266
- }
- position++
- }
- l269:
- goto l265
- l266:
- position, tokenIndex = position266, tokenIndex266
- }
- add(ruleWS, position264)
- }
- return true
- l263:
- position, tokenIndex = position263, tokenIndex263
- return false
- },
- /* 19 Comment <- <('#' (!'\n' .)*)> */
- func() bool {
position271, tokenIndex271 := position, tokenIndex
{
position272 := position
- if buffer[position] != rune('#') {
- goto l271
- }
- position++
- l273:
{
- position274, tokenIndex274 := position, tokenIndex
- {
- position275, tokenIndex275 := position, tokenIndex
- if buffer[position] != rune('\n') {
- goto l275
- }
- position++
- goto l274
- l275:
- position, tokenIndex = position275, tokenIndex275
- }
- if !matchDot() {
+ position273, tokenIndex273 := position, tokenIndex
+ if buffer[position] != rune('@') {
goto l274
}
+ position++
+ if buffer[position] != rune('f') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('u') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('n') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('c') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('t') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('i') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('o') {
+ goto l274
+ }
+ position++
+ if buffer[position] != rune('n') {
+ goto l274
+ }
+ position++
goto l273
l274:
- position, tokenIndex = position274, tokenIndex274
+ position, tokenIndex = position273, tokenIndex273
+ if buffer[position] != rune('@') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('o') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('b') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('j') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('e') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('c') {
+ goto l271
+ }
+ position++
+ if buffer[position] != rune('t') {
+ goto l271
+ }
+ position++
}
- add(ruleComment, position272)
+ l273:
+ add(ruleSymbolType, position272)
}
return true
l271:
position, tokenIndex = position271, tokenIndex271
return false
},
- /* 20 Label <- <((LocalSymbol / LocalLabel / SymbolName) ':')> */
+ /* 15 Dot <- <'.'> */
func() bool {
- position276, tokenIndex276 := position, tokenIndex
+ position275, tokenIndex275 := position, tokenIndex
{
- position277 := position
- {
- position278, tokenIndex278 := position, tokenIndex
- if !_rules[ruleLocalSymbol]() {
- goto l279
- }
- goto l278
- l279:
- position, tokenIndex = position278, tokenIndex278
- if !_rules[ruleLocalLabel]() {
- goto l280
- }
- goto l278
- l280:
- position, tokenIndex = position278, tokenIndex278
- if !_rules[ruleSymbolName]() {
- goto l276
- }
- }
- l278:
- if buffer[position] != rune(':') {
- goto l276
+ position276 := position
+ if buffer[position] != rune('.') {
+ goto l275
}
position++
- add(ruleLabel, position277)
+ add(ruleDot, position276)
}
return true
- l276:
- position, tokenIndex = position276, tokenIndex276
+ l275:
+ position, tokenIndex = position275, tokenIndex275
return false
},
- /* 21 SymbolName <- <(([a-z] / [A-Z] / '.' / '_') ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')*)> */
+ /* 16 TCMarker <- <('[' 'T' 'C' ']')> */
+ func() bool {
+ position277, tokenIndex277 := position, tokenIndex
+ {
+ position278 := position
+ if buffer[position] != rune('[') {
+ goto l277
+ }
+ position++
+ if buffer[position] != rune('T') {
+ goto l277
+ }
+ position++
+ if buffer[position] != rune('C') {
+ goto l277
+ }
+ position++
+ if buffer[position] != rune(']') {
+ goto l277
+ }
+ position++
+ add(ruleTCMarker, position278)
+ }
+ return true
+ l277:
+ position, tokenIndex = position277, tokenIndex277
+ return false
+ },
+ /* 17 EscapedChar <- <('\\' .)> */
+ func() bool {
+ position279, tokenIndex279 := position, tokenIndex
+ {
+ position280 := position
+ if buffer[position] != rune('\\') {
+ goto l279
+ }
+ position++
+ if !matchDot() {
+ goto l279
+ }
+ add(ruleEscapedChar, position280)
+ }
+ return true
+ l279:
+ position, tokenIndex = position279, tokenIndex279
+ return false
+ },
+ /* 18 WS <- <(' ' / '\t')+> */
func() bool {
position281, tokenIndex281 := position, tokenIndex
{
position282 := position
{
- position283, tokenIndex283 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l284
- }
- position++
- goto l283
- l284:
- position, tokenIndex = position283, tokenIndex283
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l285
- }
- position++
- goto l283
- l285:
- position, tokenIndex = position283, tokenIndex283
- if buffer[position] != rune('.') {
+ position285, tokenIndex285 := position, tokenIndex
+ if buffer[position] != rune(' ') {
goto l286
}
position++
- goto l283
+ goto l285
l286:
- position, tokenIndex = position283, tokenIndex283
- if buffer[position] != rune('_') {
+ position, tokenIndex = position285, tokenIndex285
+ if buffer[position] != rune('\t') {
goto l281
}
position++
}
+ l285:
l283:
- l287:
{
- position288, tokenIndex288 := position, tokenIndex
+ position284, tokenIndex284 := position, tokenIndex
{
- position289, tokenIndex289 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l290
- }
- position++
- goto l289
- l290:
- position, tokenIndex = position289, tokenIndex289
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l291
- }
- position++
- goto l289
- l291:
- position, tokenIndex = position289, tokenIndex289
- if buffer[position] != rune('.') {
- goto l292
- }
- position++
- goto l289
- l292:
- position, tokenIndex = position289, tokenIndex289
- {
- position294, tokenIndex294 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l295
- }
- position++
- goto l294
- l295:
- position, tokenIndex = position294, tokenIndex294
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l293
- }
- position++
- }
- l294:
- goto l289
- l293:
- position, tokenIndex = position289, tokenIndex289
- if buffer[position] != rune('$') {
- goto l296
- }
- position++
- goto l289
- l296:
- position, tokenIndex = position289, tokenIndex289
- if buffer[position] != rune('_') {
+ position287, tokenIndex287 := position, tokenIndex
+ if buffer[position] != rune(' ') {
goto l288
}
position++
+ goto l287
+ l288:
+ position, tokenIndex = position287, tokenIndex287
+ if buffer[position] != rune('\t') {
+ goto l284
+ }
+ position++
}
- l289:
- goto l287
- l288:
- position, tokenIndex = position288, tokenIndex288
+ l287:
+ goto l283
+ l284:
+ position, tokenIndex = position284, tokenIndex284
}
- add(ruleSymbolName, position282)
+ add(ruleWS, position282)
}
return true
l281:
position, tokenIndex = position281, tokenIndex281
return false
},
- /* 22 LocalSymbol <- <('.' 'L' ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')+)> */
+ /* 19 Comment <- <('#' (!'\n' .)*)> */
func() bool {
- position297, tokenIndex297 := position, tokenIndex
+ position289, tokenIndex289 := position, tokenIndex
{
- position298 := position
- if buffer[position] != rune('.') {
- goto l297
+ position290 := position
+ if buffer[position] != rune('#') {
+ goto l289
}
position++
- if buffer[position] != rune('L') {
- goto l297
+ l291:
+ {
+ position292, tokenIndex292 := position, tokenIndex
+ {
+ position293, tokenIndex293 := position, tokenIndex
+ if buffer[position] != rune('\n') {
+ goto l293
+ }
+ position++
+ goto l292
+ l293:
+ position, tokenIndex = position293, tokenIndex293
+ }
+ if !matchDot() {
+ goto l292
+ }
+ goto l291
+ l292:
+ position, tokenIndex = position292, tokenIndex292
+ }
+ add(ruleComment, position290)
+ }
+ return true
+ l289:
+ position, tokenIndex = position289, tokenIndex289
+ return false
+ },
+ /* 20 Label <- <((LocalSymbol / LocalLabel / SymbolName) ':')> */
+ func() bool {
+ position294, tokenIndex294 := position, tokenIndex
+ {
+ position295 := position
+ {
+ position296, tokenIndex296 := position, tokenIndex
+ if !_rules[ruleLocalSymbol]() {
+ goto l297
+ }
+ goto l296
+ l297:
+ position, tokenIndex = position296, tokenIndex296
+ if !_rules[ruleLocalLabel]() {
+ goto l298
+ }
+ goto l296
+ l298:
+ position, tokenIndex = position296, tokenIndex296
+ if !_rules[ruleSymbolName]() {
+ goto l294
+ }
+ }
+ l296:
+ if buffer[position] != rune(':') {
+ goto l294
}
position++
+ add(ruleLabel, position295)
+ }
+ return true
+ l294:
+ position, tokenIndex = position294, tokenIndex294
+ return false
+ },
+ /* 21 SymbolName <- <(([a-z] / [A-Z] / '.' / '_') ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')*)> */
+ func() bool {
+ position299, tokenIndex299 := position, tokenIndex
+ {
+ position300 := position
{
position301, tokenIndex301 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
@@ -2518,640 +2566,592 @@
goto l301
l304:
position, tokenIndex = position301, tokenIndex301
- {
- position306, tokenIndex306 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l307
- }
- position++
- goto l306
- l307:
- position, tokenIndex = position306, tokenIndex306
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l305
- }
- position++
- }
- l306:
- goto l301
- l305:
- position, tokenIndex = position301, tokenIndex301
- if buffer[position] != rune('$') {
- goto l308
- }
- position++
- goto l301
- l308:
- position, tokenIndex = position301, tokenIndex301
if buffer[position] != rune('_') {
- goto l297
+ goto l299
}
position++
}
l301:
- l299:
+ l305:
{
- position300, tokenIndex300 := position, tokenIndex
+ position306, tokenIndex306 := position, tokenIndex
{
- position309, tokenIndex309 := position, tokenIndex
+ position307, tokenIndex307 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l308
+ }
+ position++
+ goto l307
+ l308:
+ position, tokenIndex = position307, tokenIndex307
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l309
+ }
+ position++
+ goto l307
+ l309:
+ position, tokenIndex = position307, tokenIndex307
+ if buffer[position] != rune('.') {
goto l310
}
position++
- goto l309
+ goto l307
l310:
- position, tokenIndex = position309, tokenIndex309
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l311
- }
- position++
- goto l309
- l311:
- position, tokenIndex = position309, tokenIndex309
- if buffer[position] != rune('.') {
- goto l312
- }
- position++
- goto l309
- l312:
- position, tokenIndex = position309, tokenIndex309
+ position, tokenIndex = position307, tokenIndex307
{
- position314, tokenIndex314 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l315
- }
- position++
- goto l314
- l315:
- position, tokenIndex = position314, tokenIndex314
+ position312, tokenIndex312 := position, tokenIndex
if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l313
}
position++
+ goto l312
+ l313:
+ position, tokenIndex = position312, tokenIndex312
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l311
+ }
+ position++
}
- l314:
- goto l309
- l313:
- position, tokenIndex = position309, tokenIndex309
+ l312:
+ goto l307
+ l311:
+ position, tokenIndex = position307, tokenIndex307
if buffer[position] != rune('$') {
- goto l316
+ goto l314
}
position++
- goto l309
- l316:
- position, tokenIndex = position309, tokenIndex309
+ goto l307
+ l314:
+ position, tokenIndex = position307, tokenIndex307
if buffer[position] != rune('_') {
- goto l300
+ goto l306
}
position++
}
- l309:
- goto l299
- l300:
- position, tokenIndex = position300, tokenIndex300
+ l307:
+ goto l305
+ l306:
+ position, tokenIndex = position306, tokenIndex306
}
- add(ruleLocalSymbol, position298)
+ add(ruleSymbolName, position300)
}
return true
- l297:
- position, tokenIndex = position297, tokenIndex297
+ l299:
+ position, tokenIndex = position299, tokenIndex299
return false
},
- /* 23 LocalLabel <- <([0-9] ([0-9] / '$')*)> */
+ /* 22 LocalSymbol <- <('.' 'L' ([a-z] / [A-Z] / '.' / ([0-9] / [0-9]) / '$' / '_')+)> */
func() bool {
- position317, tokenIndex317 := position, tokenIndex
+ position315, tokenIndex315 := position, tokenIndex
{
- position318 := position
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l317
+ position316 := position
+ if buffer[position] != rune('.') {
+ goto l315
}
position++
- l319:
+ if buffer[position] != rune('L') {
+ goto l315
+ }
+ position++
{
- position320, tokenIndex320 := position, tokenIndex
- {
- position321, tokenIndex321 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l322
- }
- position++
- goto l321
- l322:
- position, tokenIndex = position321, tokenIndex321
- if buffer[position] != rune('$') {
- goto l320
- }
- position++
+ position319, tokenIndex319 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l320
}
- l321:
+ position++
goto l319
l320:
- position, tokenIndex = position320, tokenIndex320
+ position, tokenIndex = position319, tokenIndex319
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l321
+ }
+ position++
+ goto l319
+ l321:
+ position, tokenIndex = position319, tokenIndex319
+ if buffer[position] != rune('.') {
+ goto l322
+ }
+ position++
+ goto l319
+ l322:
+ position, tokenIndex = position319, tokenIndex319
+ {
+ position324, tokenIndex324 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l325
+ }
+ position++
+ goto l324
+ l325:
+ position, tokenIndex = position324, tokenIndex324
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l323
+ }
+ position++
+ }
+ l324:
+ goto l319
+ l323:
+ position, tokenIndex = position319, tokenIndex319
+ if buffer[position] != rune('$') {
+ goto l326
+ }
+ position++
+ goto l319
+ l326:
+ position, tokenIndex = position319, tokenIndex319
+ if buffer[position] != rune('_') {
+ goto l315
+ }
+ position++
}
- add(ruleLocalLabel, position318)
- }
- return true
- l317:
- position, tokenIndex = position317, tokenIndex317
- return false
- },
- /* 24 LocalLabelRef <- <([0-9] ([0-9] / '$')* ('b' / 'f'))> */
- func() bool {
- position323, tokenIndex323 := position, tokenIndex
- {
- position324 := position
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l323
- }
- position++
- l325:
+ l319:
+ l317:
{
- position326, tokenIndex326 := position, tokenIndex
+ position318, tokenIndex318 := position, tokenIndex
{
position327, tokenIndex327 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l328
}
position++
goto l327
l328:
position, tokenIndex = position327, tokenIndex327
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l329
+ }
+ position++
+ goto l327
+ l329:
+ position, tokenIndex = position327, tokenIndex327
+ if buffer[position] != rune('.') {
+ goto l330
+ }
+ position++
+ goto l327
+ l330:
+ position, tokenIndex = position327, tokenIndex327
+ {
+ position332, tokenIndex332 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l333
+ }
+ position++
+ goto l332
+ l333:
+ position, tokenIndex = position332, tokenIndex332
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l331
+ }
+ position++
+ }
+ l332:
+ goto l327
+ l331:
+ position, tokenIndex = position327, tokenIndex327
if buffer[position] != rune('$') {
- goto l326
+ goto l334
+ }
+ position++
+ goto l327
+ l334:
+ position, tokenIndex = position327, tokenIndex327
+ if buffer[position] != rune('_') {
+ goto l318
}
position++
}
l327:
- goto l325
- l326:
- position, tokenIndex = position326, tokenIndex326
+ goto l317
+ l318:
+ position, tokenIndex = position318, tokenIndex318
}
- {
- position329, tokenIndex329 := position, tokenIndex
- if buffer[position] != rune('b') {
- goto l330
- }
- position++
- goto l329
- l330:
- position, tokenIndex = position329, tokenIndex329
- if buffer[position] != rune('f') {
- goto l323
- }
- position++
- }
- l329:
- add(ruleLocalLabelRef, position324)
+ add(ruleLocalSymbol, position316)
}
return true
- l323:
- position, tokenIndex = position323, tokenIndex323
+ l315:
+ position, tokenIndex = position315, tokenIndex315
return false
},
- /* 25 Instruction <- <(InstructionName (WS InstructionArg (WS? ',' WS? InstructionArg)*)?)> */
+ /* 23 LocalLabel <- <([0-9] ([0-9] / '$')*)> */
func() bool {
- position331, tokenIndex331 := position, tokenIndex
+ position335, tokenIndex335 := position, tokenIndex
{
- position332 := position
- if !_rules[ruleInstructionName]() {
- goto l331
+ position336 := position
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l335
}
+ position++
+ l337:
{
- position333, tokenIndex333 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l333
- }
- if !_rules[ruleInstructionArg]() {
- goto l333
- }
- l335:
+ position338, tokenIndex338 := position, tokenIndex
{
- position336, tokenIndex336 := position, tokenIndex
- {
- position337, tokenIndex337 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l337
- }
- goto l338
- l337:
- position, tokenIndex = position337, tokenIndex337
- }
- l338:
- if buffer[position] != rune(',') {
- goto l336
+ position339, tokenIndex339 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l340
}
position++
- {
- position339, tokenIndex339 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l339
- }
- goto l340
- l339:
- position, tokenIndex = position339, tokenIndex339
- }
+ goto l339
l340:
- if !_rules[ruleInstructionArg]() {
- goto l336
+ position, tokenIndex = position339, tokenIndex339
+ if buffer[position] != rune('$') {
+ goto l338
}
- goto l335
- l336:
- position, tokenIndex = position336, tokenIndex336
+ position++
}
- goto l334
- l333:
- position, tokenIndex = position333, tokenIndex333
+ l339:
+ goto l337
+ l338:
+ position, tokenIndex = position338, tokenIndex338
}
- l334:
- add(ruleInstruction, position332)
+ add(ruleLocalLabel, position336)
}
return true
- l331:
- position, tokenIndex = position331, tokenIndex331
+ l335:
+ position, tokenIndex = position335, tokenIndex335
return false
},
- /* 26 InstructionName <- <(([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))* ('.' / '+' / '-')?)> */
+ /* 24 LocalLabelRef <- <([0-9] ([0-9] / '$')* ('b' / 'f'))> */
func() bool {
position341, tokenIndex341 := position, tokenIndex
{
position342 := position
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l341
+ }
+ position++
+ l343:
{
- position343, tokenIndex343 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l344
+ position344, tokenIndex344 := position, tokenIndex
+ {
+ position345, tokenIndex345 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l346
+ }
+ position++
+ goto l345
+ l346:
+ position, tokenIndex = position345, tokenIndex345
+ if buffer[position] != rune('$') {
+ goto l344
+ }
+ position++
}
- position++
+ l345:
goto l343
l344:
- position, tokenIndex = position343, tokenIndex343
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ position, tokenIndex = position344, tokenIndex344
+ }
+ {
+ position347, tokenIndex347 := position, tokenIndex
+ if buffer[position] != rune('b') {
+ goto l348
+ }
+ position++
+ goto l347
+ l348:
+ position, tokenIndex = position347, tokenIndex347
+ if buffer[position] != rune('f') {
goto l341
}
position++
}
- l343:
- l345:
- {
- position346, tokenIndex346 := position, tokenIndex
- {
- position347, tokenIndex347 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l348
- }
- position++
- goto l347
- l348:
- position, tokenIndex = position347, tokenIndex347
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l349
- }
- position++
- goto l347
- l349:
- position, tokenIndex = position347, tokenIndex347
- {
- position350, tokenIndex350 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l351
- }
- position++
- goto l350
- l351:
- position, tokenIndex = position350, tokenIndex350
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l346
- }
- position++
- }
- l350:
- }
- l347:
- goto l345
- l346:
- position, tokenIndex = position346, tokenIndex346
- }
- {
- position352, tokenIndex352 := position, tokenIndex
- {
- position354, tokenIndex354 := position, tokenIndex
- if buffer[position] != rune('.') {
- goto l355
- }
- position++
- goto l354
- l355:
- position, tokenIndex = position354, tokenIndex354
- if buffer[position] != rune('+') {
- goto l356
- }
- position++
- goto l354
- l356:
- position, tokenIndex = position354, tokenIndex354
- if buffer[position] != rune('-') {
- goto l352
- }
- position++
- }
- l354:
- goto l353
- l352:
- position, tokenIndex = position352, tokenIndex352
- }
- l353:
- add(ruleInstructionName, position342)
+ l347:
+ add(ruleLocalLabelRef, position342)
}
return true
l341:
position, tokenIndex = position341, tokenIndex341
return false
},
- /* 27 InstructionArg <- <(IndirectionIndicator? (RegisterOrConstant / LocalLabelRef / TOCRefHigh / TOCRefLow / MemoryRef) AVX512Token*)> */
+ /* 25 Instruction <- <(InstructionName (WS InstructionArg (WS? ',' WS? InstructionArg)*)?)> */
func() bool {
- position357, tokenIndex357 := position, tokenIndex
+ position349, tokenIndex349 := position, tokenIndex
{
- position358 := position
- {
- position359, tokenIndex359 := position, tokenIndex
- if !_rules[ruleIndirectionIndicator]() {
- goto l359
- }
- goto l360
- l359:
- position, tokenIndex = position359, tokenIndex359
+ position350 := position
+ if !_rules[ruleInstructionName]() {
+ goto l349
}
- l360:
+ {
+ position351, tokenIndex351 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l351
+ }
+ if !_rules[ruleInstructionArg]() {
+ goto l351
+ }
+ l353:
+ {
+ position354, tokenIndex354 := position, tokenIndex
+ {
+ position355, tokenIndex355 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l355
+ }
+ goto l356
+ l355:
+ position, tokenIndex = position355, tokenIndex355
+ }
+ l356:
+ if buffer[position] != rune(',') {
+ goto l354
+ }
+ position++
+ {
+ position357, tokenIndex357 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l357
+ }
+ goto l358
+ l357:
+ position, tokenIndex = position357, tokenIndex357
+ }
+ l358:
+ if !_rules[ruleInstructionArg]() {
+ goto l354
+ }
+ goto l353
+ l354:
+ position, tokenIndex = position354, tokenIndex354
+ }
+ goto l352
+ l351:
+ position, tokenIndex = position351, tokenIndex351
+ }
+ l352:
+ add(ruleInstruction, position350)
+ }
+ return true
+ l349:
+ position, tokenIndex = position349, tokenIndex349
+ return false
+ },
+ /* 26 InstructionName <- <(([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))* ('.' / '+' / '-')?)> */
+ func() bool {
+ position359, tokenIndex359 := position, tokenIndex
+ {
+ position360 := position
{
position361, tokenIndex361 := position, tokenIndex
- if !_rules[ruleRegisterOrConstant]() {
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
goto l362
}
+ position++
goto l361
l362:
position, tokenIndex = position361, tokenIndex361
- if !_rules[ruleLocalLabelRef]() {
- goto l363
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l359
}
- goto l361
- l363:
- position, tokenIndex = position361, tokenIndex361
- if !_rules[ruleTOCRefHigh]() {
- goto l364
- }
- goto l361
- l364:
- position, tokenIndex = position361, tokenIndex361
- if !_rules[ruleTOCRefLow]() {
- goto l365
- }
- goto l361
- l365:
- position, tokenIndex = position361, tokenIndex361
- if !_rules[ruleMemoryRef]() {
- goto l357
- }
+ position++
}
l361:
- l366:
+ l363:
{
- position367, tokenIndex367 := position, tokenIndex
- if !_rules[ruleAVX512Token]() {
- goto l367
+ position364, tokenIndex364 := position, tokenIndex
+ {
+ position365, tokenIndex365 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l366
+ }
+ position++
+ goto l365
+ l366:
+ position, tokenIndex = position365, tokenIndex365
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l367
+ }
+ position++
+ goto l365
+ l367:
+ position, tokenIndex = position365, tokenIndex365
+ {
+ position368, tokenIndex368 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l369
+ }
+ position++
+ goto l368
+ l369:
+ position, tokenIndex = position368, tokenIndex368
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l364
+ }
+ position++
+ }
+ l368:
}
- goto l366
- l367:
- position, tokenIndex = position367, tokenIndex367
+ l365:
+ goto l363
+ l364:
+ position, tokenIndex = position364, tokenIndex364
}
- add(ruleInstructionArg, position358)
- }
- return true
- l357:
- position, tokenIndex = position357, tokenIndex357
- return false
- },
- /* 28 AVX512Token <- <(WS? '{' '%'? ([0-9] / [a-z])* '}')> */
- func() bool {
- position368, tokenIndex368 := position, tokenIndex
- {
- position369 := position
{
position370, tokenIndex370 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l370
+ {
+ position372, tokenIndex372 := position, tokenIndex
+ if buffer[position] != rune('.') {
+ goto l373
+ }
+ position++
+ goto l372
+ l373:
+ position, tokenIndex = position372, tokenIndex372
+ if buffer[position] != rune('+') {
+ goto l374
+ }
+ position++
+ goto l372
+ l374:
+ position, tokenIndex = position372, tokenIndex372
+ if buffer[position] != rune('-') {
+ goto l370
+ }
+ position++
}
+ l372:
goto l371
l370:
position, tokenIndex = position370, tokenIndex370
}
l371:
- if buffer[position] != rune('{') {
- goto l368
- }
- position++
- {
- position372, tokenIndex372 := position, tokenIndex
- if buffer[position] != rune('%') {
- goto l372
- }
- position++
- goto l373
- l372:
- position, tokenIndex = position372, tokenIndex372
- }
- l373:
- l374:
- {
- position375, tokenIndex375 := position, tokenIndex
- {
- position376, tokenIndex376 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l377
- }
- position++
- goto l376
- l377:
- position, tokenIndex = position376, tokenIndex376
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l375
- }
- position++
- }
- l376:
- goto l374
- l375:
- position, tokenIndex = position375, tokenIndex375
- }
- if buffer[position] != rune('}') {
- goto l368
- }
- position++
- add(ruleAVX512Token, position369)
+ add(ruleInstructionName, position360)
}
return true
- l368:
- position, tokenIndex = position368, tokenIndex368
+ l359:
+ position, tokenIndex = position359, tokenIndex359
+ return false
+ },
+ /* 27 InstructionArg <- <(IndirectionIndicator? (RegisterOrConstant / LocalLabelRef / TOCRefHigh / TOCRefLow / MemoryRef) AVX512Token*)> */
+ func() bool {
+ position375, tokenIndex375 := position, tokenIndex
+ {
+ position376 := position
+ {
+ position377, tokenIndex377 := position, tokenIndex
+ if !_rules[ruleIndirectionIndicator]() {
+ goto l377
+ }
+ goto l378
+ l377:
+ position, tokenIndex = position377, tokenIndex377
+ }
+ l378:
+ {
+ position379, tokenIndex379 := position, tokenIndex
+ if !_rules[ruleRegisterOrConstant]() {
+ goto l380
+ }
+ goto l379
+ l380:
+ position, tokenIndex = position379, tokenIndex379
+ if !_rules[ruleLocalLabelRef]() {
+ goto l381
+ }
+ goto l379
+ l381:
+ position, tokenIndex = position379, tokenIndex379
+ if !_rules[ruleTOCRefHigh]() {
+ goto l382
+ }
+ goto l379
+ l382:
+ position, tokenIndex = position379, tokenIndex379
+ if !_rules[ruleTOCRefLow]() {
+ goto l383
+ }
+ goto l379
+ l383:
+ position, tokenIndex = position379, tokenIndex379
+ if !_rules[ruleMemoryRef]() {
+ goto l375
+ }
+ }
+ l379:
+ l384:
+ {
+ position385, tokenIndex385 := position, tokenIndex
+ if !_rules[ruleAVX512Token]() {
+ goto l385
+ }
+ goto l384
+ l385:
+ position, tokenIndex = position385, tokenIndex385
+ }
+ add(ruleInstructionArg, position376)
+ }
+ return true
+ l375:
+ position, tokenIndex = position375, tokenIndex375
+ return false
+ },
+ /* 28 AVX512Token <- <(WS? '{' '%'? ([0-9] / [a-z])* '}')> */
+ func() bool {
+ position386, tokenIndex386 := position, tokenIndex
+ {
+ position387 := position
+ {
+ position388, tokenIndex388 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l388
+ }
+ goto l389
+ l388:
+ position, tokenIndex = position388, tokenIndex388
+ }
+ l389:
+ if buffer[position] != rune('{') {
+ goto l386
+ }
+ position++
+ {
+ position390, tokenIndex390 := position, tokenIndex
+ if buffer[position] != rune('%') {
+ goto l390
+ }
+ position++
+ goto l391
+ l390:
+ position, tokenIndex = position390, tokenIndex390
+ }
+ l391:
+ l392:
+ {
+ position393, tokenIndex393 := position, tokenIndex
+ {
+ position394, tokenIndex394 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l395
+ }
+ position++
+ goto l394
+ l395:
+ position, tokenIndex = position394, tokenIndex394
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l393
+ }
+ position++
+ }
+ l394:
+ goto l392
+ l393:
+ position, tokenIndex = position393, tokenIndex393
+ }
+ if buffer[position] != rune('}') {
+ goto l386
+ }
+ position++
+ add(ruleAVX512Token, position387)
+ }
+ return true
+ l386:
+ position, tokenIndex = position386, tokenIndex386
return false
},
/* 29 TOCRefHigh <- <('.' 'T' 'O' 'C' '.' '-' (('0' 'b') / ('.' 'L' ([a-z] / [A-Z] / '_' / [0-9])+)) ('@' ('h' / 'H') ('a' / 'A')))> */
func() bool {
- position378, tokenIndex378 := position, tokenIndex
- {
- position379 := position
- if buffer[position] != rune('.') {
- goto l378
- }
- position++
- if buffer[position] != rune('T') {
- goto l378
- }
- position++
- if buffer[position] != rune('O') {
- goto l378
- }
- position++
- if buffer[position] != rune('C') {
- goto l378
- }
- position++
- if buffer[position] != rune('.') {
- goto l378
- }
- position++
- if buffer[position] != rune('-') {
- goto l378
- }
- position++
- {
- position380, tokenIndex380 := position, tokenIndex
- if buffer[position] != rune('0') {
- goto l381
- }
- position++
- if buffer[position] != rune('b') {
- goto l381
- }
- position++
- goto l380
- l381:
- position, tokenIndex = position380, tokenIndex380
- if buffer[position] != rune('.') {
- goto l378
- }
- position++
- if buffer[position] != rune('L') {
- goto l378
- }
- position++
- {
- position384, tokenIndex384 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l385
- }
- position++
- goto l384
- l385:
- position, tokenIndex = position384, tokenIndex384
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l386
- }
- position++
- goto l384
- l386:
- position, tokenIndex = position384, tokenIndex384
- if buffer[position] != rune('_') {
- goto l387
- }
- position++
- goto l384
- l387:
- position, tokenIndex = position384, tokenIndex384
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l378
- }
- position++
- }
- l384:
- l382:
- {
- position383, tokenIndex383 := position, tokenIndex
- {
- position388, tokenIndex388 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l389
- }
- position++
- goto l388
- l389:
- position, tokenIndex = position388, tokenIndex388
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l390
- }
- position++
- goto l388
- l390:
- position, tokenIndex = position388, tokenIndex388
- if buffer[position] != rune('_') {
- goto l391
- }
- position++
- goto l388
- l391:
- position, tokenIndex = position388, tokenIndex388
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l383
- }
- position++
- }
- l388:
- goto l382
- l383:
- position, tokenIndex = position383, tokenIndex383
- }
- }
- l380:
- if buffer[position] != rune('@') {
- goto l378
- }
- position++
- {
- position392, tokenIndex392 := position, tokenIndex
- if buffer[position] != rune('h') {
- goto l393
- }
- position++
- goto l392
- l393:
- position, tokenIndex = position392, tokenIndex392
- if buffer[position] != rune('H') {
- goto l378
- }
- position++
- }
- l392:
- {
- position394, tokenIndex394 := position, tokenIndex
- if buffer[position] != rune('a') {
- goto l395
- }
- position++
- goto l394
- l395:
- position, tokenIndex = position394, tokenIndex394
- if buffer[position] != rune('A') {
- goto l378
- }
- position++
- }
- l394:
- add(ruleTOCRefHigh, position379)
- }
- return true
- l378:
- position, tokenIndex = position378, tokenIndex378
- return false
- },
- /* 30 TOCRefLow <- <('.' 'T' 'O' 'C' '.' '-' (('0' 'b') / ('.' 'L' ([a-z] / [A-Z] / '_' / [0-9])+)) ('@' ('l' / 'L')))> */
- func() bool {
position396, tokenIndex396 := position, tokenIndex
{
position397 := position
@@ -3273,494 +3273,538 @@
position++
{
position410, tokenIndex410 := position, tokenIndex
- if buffer[position] != rune('l') {
+ if buffer[position] != rune('h') {
goto l411
}
position++
goto l410
l411:
position, tokenIndex = position410, tokenIndex410
- if buffer[position] != rune('L') {
+ if buffer[position] != rune('H') {
goto l396
}
position++
}
l410:
- add(ruleTOCRefLow, position397)
+ {
+ position412, tokenIndex412 := position, tokenIndex
+ if buffer[position] != rune('a') {
+ goto l413
+ }
+ position++
+ goto l412
+ l413:
+ position, tokenIndex = position412, tokenIndex412
+ if buffer[position] != rune('A') {
+ goto l396
+ }
+ position++
+ }
+ l412:
+ add(ruleTOCRefHigh, position397)
}
return true
l396:
position, tokenIndex = position396, tokenIndex396
return false
},
- /* 31 IndirectionIndicator <- <'*'> */
- func() bool {
- position412, tokenIndex412 := position, tokenIndex
- {
- position413 := position
- if buffer[position] != rune('*') {
- goto l412
- }
- position++
- add(ruleIndirectionIndicator, position413)
- }
- return true
- l412:
- position, tokenIndex = position412, tokenIndex412
- return false
- },
- /* 32 RegisterOrConstant <- <((('%' ([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))*) / ('$'? ((Offset Offset) / Offset))) !('f' / 'b' / ':' / '(' / '+' / '-'))> */
+ /* 30 TOCRefLow <- <('.' 'T' 'O' 'C' '.' '-' (('0' 'b') / ('.' 'L' ([a-z] / [A-Z] / '_' / [0-9])+)) ('@' ('l' / 'L')))> */
func() bool {
position414, tokenIndex414 := position, tokenIndex
{
position415 := position
+ if buffer[position] != rune('.') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('T') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('O') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('C') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('.') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('-') {
+ goto l414
+ }
+ position++
{
position416, tokenIndex416 := position, tokenIndex
- if buffer[position] != rune('%') {
+ if buffer[position] != rune('0') {
goto l417
}
position++
- {
- position418, tokenIndex418 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l419
- }
- position++
- goto l418
- l419:
- position, tokenIndex = position418, tokenIndex418
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l417
- }
- position++
+ if buffer[position] != rune('b') {
+ goto l417
}
- l418:
- l420:
- {
- position421, tokenIndex421 := position, tokenIndex
- {
- position422, tokenIndex422 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l423
- }
- position++
- goto l422
- l423:
- position, tokenIndex = position422, tokenIndex422
- if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l424
- }
- position++
- goto l422
- l424:
- position, tokenIndex = position422, tokenIndex422
- {
- position425, tokenIndex425 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l426
- }
- position++
- goto l425
- l426:
- position, tokenIndex = position425, tokenIndex425
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l421
- }
- position++
- }
- l425:
- }
- l422:
- goto l420
- l421:
- position, tokenIndex = position421, tokenIndex421
- }
+ position++
goto l416
l417:
position, tokenIndex = position416, tokenIndex416
+ if buffer[position] != rune('.') {
+ goto l414
+ }
+ position++
+ if buffer[position] != rune('L') {
+ goto l414
+ }
+ position++
{
- position427, tokenIndex427 := position, tokenIndex
- if buffer[position] != rune('$') {
- goto l427
+ position420, tokenIndex420 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l421
}
position++
- goto l428
- l427:
- position, tokenIndex = position427, tokenIndex427
- }
- l428:
- {
- position429, tokenIndex429 := position, tokenIndex
- if !_rules[ruleOffset]() {
- goto l430
+ goto l420
+ l421:
+ position, tokenIndex = position420, tokenIndex420
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l422
}
- if !_rules[ruleOffset]() {
- goto l430
+ position++
+ goto l420
+ l422:
+ position, tokenIndex = position420, tokenIndex420
+ if buffer[position] != rune('_') {
+ goto l423
}
- goto l429
- l430:
- position, tokenIndex = position429, tokenIndex429
- if !_rules[ruleOffset]() {
+ position++
+ goto l420
+ l423:
+ position, tokenIndex = position420, tokenIndex420
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
goto l414
}
+ position++
}
- l429:
+ l420:
+ l418:
+ {
+ position419, tokenIndex419 := position, tokenIndex
+ {
+ position424, tokenIndex424 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l425
+ }
+ position++
+ goto l424
+ l425:
+ position, tokenIndex = position424, tokenIndex424
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l426
+ }
+ position++
+ goto l424
+ l426:
+ position, tokenIndex = position424, tokenIndex424
+ if buffer[position] != rune('_') {
+ goto l427
+ }
+ position++
+ goto l424
+ l427:
+ position, tokenIndex = position424, tokenIndex424
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l419
+ }
+ position++
+ }
+ l424:
+ goto l418
+ l419:
+ position, tokenIndex = position419, tokenIndex419
+ }
}
l416:
- {
- position431, tokenIndex431 := position, tokenIndex
- {
- position432, tokenIndex432 := position, tokenIndex
- if buffer[position] != rune('f') {
- goto l433
- }
- position++
- goto l432
- l433:
- position, tokenIndex = position432, tokenIndex432
- if buffer[position] != rune('b') {
- goto l434
- }
- position++
- goto l432
- l434:
- position, tokenIndex = position432, tokenIndex432
- if buffer[position] != rune(':') {
- goto l435
- }
- position++
- goto l432
- l435:
- position, tokenIndex = position432, tokenIndex432
- if buffer[position] != rune('(') {
- goto l436
- }
- position++
- goto l432
- l436:
- position, tokenIndex = position432, tokenIndex432
- if buffer[position] != rune('+') {
- goto l437
- }
- position++
- goto l432
- l437:
- position, tokenIndex = position432, tokenIndex432
- if buffer[position] != rune('-') {
- goto l431
- }
- position++
- }
- l432:
+ if buffer[position] != rune('@') {
goto l414
- l431:
- position, tokenIndex = position431, tokenIndex431
}
- add(ruleRegisterOrConstant, position415)
+ position++
+ {
+ position428, tokenIndex428 := position, tokenIndex
+ if buffer[position] != rune('l') {
+ goto l429
+ }
+ position++
+ goto l428
+ l429:
+ position, tokenIndex = position428, tokenIndex428
+ if buffer[position] != rune('L') {
+ goto l414
+ }
+ position++
+ }
+ l428:
+ add(ruleTOCRefLow, position415)
}
return true
l414:
position, tokenIndex = position414, tokenIndex414
return false
},
- /* 33 MemoryRef <- <((SymbolRef BaseIndexScale) / SymbolRef / (Offset* BaseIndexScale) / (SegmentRegister Offset BaseIndexScale) / (SegmentRegister BaseIndexScale) / (SegmentRegister Offset) / BaseIndexScale)> */
+ /* 31 IndirectionIndicator <- <'*'> */
func() bool {
- position438, tokenIndex438 := position, tokenIndex
+ position430, tokenIndex430 := position, tokenIndex
{
- position439 := position
+ position431 := position
+ if buffer[position] != rune('*') {
+ goto l430
+ }
+ position++
+ add(ruleIndirectionIndicator, position431)
+ }
+ return true
+ l430:
+ position, tokenIndex = position430, tokenIndex430
+ return false
+ },
+ /* 32 RegisterOrConstant <- <((('%' ([a-z] / [A-Z]) ([a-z] / [A-Z] / ([0-9] / [0-9]))*) / ('$'? ((Offset Offset) / Offset))) !('f' / 'b' / ':' / '(' / '+' / '-'))> */
+ func() bool {
+ position432, tokenIndex432 := position, tokenIndex
+ {
+ position433 := position
{
- position440, tokenIndex440 := position, tokenIndex
- if !_rules[ruleSymbolRef]() {
- goto l441
+ position434, tokenIndex434 := position, tokenIndex
+ if buffer[position] != rune('%') {
+ goto l435
}
- if !_rules[ruleBaseIndexScale]() {
- goto l441
+ position++
+ {
+ position436, tokenIndex436 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l437
+ }
+ position++
+ goto l436
+ l437:
+ position, tokenIndex = position436, tokenIndex436
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l435
+ }
+ position++
}
- goto l440
- l441:
- position, tokenIndex = position440, tokenIndex440
- if !_rules[ruleSymbolRef]() {
- goto l442
+ l436:
+ l438:
+ {
+ position439, tokenIndex439 := position, tokenIndex
+ {
+ position440, tokenIndex440 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('z') {
+ goto l441
+ }
+ position++
+ goto l440
+ l441:
+ position, tokenIndex = position440, tokenIndex440
+ if c := buffer[position]; c < rune('A') || c > rune('Z') {
+ goto l442
+ }
+ position++
+ goto l440
+ l442:
+ position, tokenIndex = position440, tokenIndex440
+ {
+ position443, tokenIndex443 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l444
+ }
+ position++
+ goto l443
+ l444:
+ position, tokenIndex = position443, tokenIndex443
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l439
+ }
+ position++
+ }
+ l443:
+ }
+ l440:
+ goto l438
+ l439:
+ position, tokenIndex = position439, tokenIndex439
}
- goto l440
- l442:
- position, tokenIndex = position440, tokenIndex440
- l444:
+ goto l434
+ l435:
+ position, tokenIndex = position434, tokenIndex434
{
position445, tokenIndex445 := position, tokenIndex
- if !_rules[ruleOffset]() {
+ if buffer[position] != rune('$') {
goto l445
}
- goto l444
+ position++
+ goto l446
l445:
position, tokenIndex = position445, tokenIndex445
}
- if !_rules[ruleBaseIndexScale]() {
- goto l443
- }
- goto l440
- l443:
- position, tokenIndex = position440, tokenIndex440
- if !_rules[ruleSegmentRegister]() {
- goto l446
- }
- if !_rules[ruleOffset]() {
- goto l446
- }
- if !_rules[ruleBaseIndexScale]() {
- goto l446
- }
- goto l440
l446:
- position, tokenIndex = position440, tokenIndex440
- if !_rules[ruleSegmentRegister]() {
+ {
+ position447, tokenIndex447 := position, tokenIndex
+ if !_rules[ruleOffset]() {
+ goto l448
+ }
+ if !_rules[ruleOffset]() {
+ goto l448
+ }
goto l447
+ l448:
+ position, tokenIndex = position447, tokenIndex447
+ if !_rules[ruleOffset]() {
+ goto l432
+ }
}
- if !_rules[ruleBaseIndexScale]() {
- goto l447
- }
- goto l440
l447:
- position, tokenIndex = position440, tokenIndex440
- if !_rules[ruleSegmentRegister]() {
- goto l448
- }
- if !_rules[ruleOffset]() {
- goto l448
- }
- goto l440
- l448:
- position, tokenIndex = position440, tokenIndex440
- if !_rules[ruleBaseIndexScale]() {
- goto l438
- }
}
- l440:
- add(ruleMemoryRef, position439)
+ l434:
+ {
+ position449, tokenIndex449 := position, tokenIndex
+ {
+ position450, tokenIndex450 := position, tokenIndex
+ if buffer[position] != rune('f') {
+ goto l451
+ }
+ position++
+ goto l450
+ l451:
+ position, tokenIndex = position450, tokenIndex450
+ if buffer[position] != rune('b') {
+ goto l452
+ }
+ position++
+ goto l450
+ l452:
+ position, tokenIndex = position450, tokenIndex450
+ if buffer[position] != rune(':') {
+ goto l453
+ }
+ position++
+ goto l450
+ l453:
+ position, tokenIndex = position450, tokenIndex450
+ if buffer[position] != rune('(') {
+ goto l454
+ }
+ position++
+ goto l450
+ l454:
+ position, tokenIndex = position450, tokenIndex450
+ if buffer[position] != rune('+') {
+ goto l455
+ }
+ position++
+ goto l450
+ l455:
+ position, tokenIndex = position450, tokenIndex450
+ if buffer[position] != rune('-') {
+ goto l449
+ }
+ position++
+ }
+ l450:
+ goto l432
+ l449:
+ position, tokenIndex = position449, tokenIndex449
+ }
+ add(ruleRegisterOrConstant, position433)
}
return true
- l438:
- position, tokenIndex = position438, tokenIndex438
+ l432:
+ position, tokenIndex = position432, tokenIndex432
+ return false
+ },
+ /* 33 MemoryRef <- <((SymbolRef BaseIndexScale) / SymbolRef / (Offset* BaseIndexScale) / (SegmentRegister Offset BaseIndexScale) / (SegmentRegister BaseIndexScale) / (SegmentRegister Offset) / BaseIndexScale)> */
+ func() bool {
+ position456, tokenIndex456 := position, tokenIndex
+ {
+ position457 := position
+ {
+ position458, tokenIndex458 := position, tokenIndex
+ if !_rules[ruleSymbolRef]() {
+ goto l459
+ }
+ if !_rules[ruleBaseIndexScale]() {
+ goto l459
+ }
+ goto l458
+ l459:
+ position, tokenIndex = position458, tokenIndex458
+ if !_rules[ruleSymbolRef]() {
+ goto l460
+ }
+ goto l458
+ l460:
+ position, tokenIndex = position458, tokenIndex458
+ l462:
+ {
+ position463, tokenIndex463 := position, tokenIndex
+ if !_rules[ruleOffset]() {
+ goto l463
+ }
+ goto l462
+ l463:
+ position, tokenIndex = position463, tokenIndex463
+ }
+ if !_rules[ruleBaseIndexScale]() {
+ goto l461
+ }
+ goto l458
+ l461:
+ position, tokenIndex = position458, tokenIndex458
+ if !_rules[ruleSegmentRegister]() {
+ goto l464
+ }
+ if !_rules[ruleOffset]() {
+ goto l464
+ }
+ if !_rules[ruleBaseIndexScale]() {
+ goto l464
+ }
+ goto l458
+ l464:
+ position, tokenIndex = position458, tokenIndex458
+ if !_rules[ruleSegmentRegister]() {
+ goto l465
+ }
+ if !_rules[ruleBaseIndexScale]() {
+ goto l465
+ }
+ goto l458
+ l465:
+ position, tokenIndex = position458, tokenIndex458
+ if !_rules[ruleSegmentRegister]() {
+ goto l466
+ }
+ if !_rules[ruleOffset]() {
+ goto l466
+ }
+ goto l458
+ l466:
+ position, tokenIndex = position458, tokenIndex458
+ if !_rules[ruleBaseIndexScale]() {
+ goto l456
+ }
+ }
+ l458:
+ add(ruleMemoryRef, position457)
+ }
+ return true
+ l456:
+ position, tokenIndex = position456, tokenIndex456
return false
},
/* 34 SymbolRef <- <((Offset* '+')? (LocalSymbol / SymbolName) Offset* ('@' Section Offset*)?)> */
func() bool {
- position449, tokenIndex449 := position, tokenIndex
+ position467, tokenIndex467 := position, tokenIndex
{
- position450 := position
- {
- position451, tokenIndex451 := position, tokenIndex
- l453:
- {
- position454, tokenIndex454 := position, tokenIndex
- if !_rules[ruleOffset]() {
- goto l454
- }
- goto l453
- l454:
- position, tokenIndex = position454, tokenIndex454
- }
- if buffer[position] != rune('+') {
- goto l451
- }
- position++
- goto l452
- l451:
- position, tokenIndex = position451, tokenIndex451
- }
- l452:
- {
- position455, tokenIndex455 := position, tokenIndex
- if !_rules[ruleLocalSymbol]() {
- goto l456
- }
- goto l455
- l456:
- position, tokenIndex = position455, tokenIndex455
- if !_rules[ruleSymbolName]() {
- goto l449
- }
- }
- l455:
- l457:
- {
- position458, tokenIndex458 := position, tokenIndex
- if !_rules[ruleOffset]() {
- goto l458
- }
- goto l457
- l458:
- position, tokenIndex = position458, tokenIndex458
- }
- {
- position459, tokenIndex459 := position, tokenIndex
- if buffer[position] != rune('@') {
- goto l459
- }
- position++
- if !_rules[ruleSection]() {
- goto l459
- }
- l461:
- {
- position462, tokenIndex462 := position, tokenIndex
- if !_rules[ruleOffset]() {
- goto l462
- }
- goto l461
- l462:
- position, tokenIndex = position462, tokenIndex462
- }
- goto l460
- l459:
- position, tokenIndex = position459, tokenIndex459
- }
- l460:
- add(ruleSymbolRef, position450)
- }
- return true
- l449:
- position, tokenIndex = position449, tokenIndex449
- return false
- },
- /* 35 BaseIndexScale <- <('(' RegisterOrConstant? WS? (',' WS? RegisterOrConstant WS? (',' [0-9]+)?)? ')')> */
- func() bool {
- position463, tokenIndex463 := position, tokenIndex
- {
- position464 := position
- if buffer[position] != rune('(') {
- goto l463
- }
- position++
- {
- position465, tokenIndex465 := position, tokenIndex
- if !_rules[ruleRegisterOrConstant]() {
- goto l465
- }
- goto l466
- l465:
- position, tokenIndex = position465, tokenIndex465
- }
- l466:
- {
- position467, tokenIndex467 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l467
- }
- goto l468
- l467:
- position, tokenIndex = position467, tokenIndex467
- }
- l468:
+ position468 := position
{
position469, tokenIndex469 := position, tokenIndex
- if buffer[position] != rune(',') {
+ l471:
+ {
+ position472, tokenIndex472 := position, tokenIndex
+ if !_rules[ruleOffset]() {
+ goto l472
+ }
+ goto l471
+ l472:
+ position, tokenIndex = position472, tokenIndex472
+ }
+ if buffer[position] != rune('+') {
goto l469
}
position++
- {
- position471, tokenIndex471 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l471
- }
- goto l472
- l471:
- position, tokenIndex = position471, tokenIndex471
- }
- l472:
- if !_rules[ruleRegisterOrConstant]() {
- goto l469
- }
- {
- position473, tokenIndex473 := position, tokenIndex
- if !_rules[ruleWS]() {
- goto l473
- }
- goto l474
- l473:
- position, tokenIndex = position473, tokenIndex473
- }
- l474:
- {
- position475, tokenIndex475 := position, tokenIndex
- if buffer[position] != rune(',') {
- goto l475
- }
- position++
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l475
- }
- position++
- l477:
- {
- position478, tokenIndex478 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l478
- }
- position++
- goto l477
- l478:
- position, tokenIndex = position478, tokenIndex478
- }
- goto l476
- l475:
- position, tokenIndex = position475, tokenIndex475
- }
- l476:
goto l470
l469:
position, tokenIndex = position469, tokenIndex469
}
l470:
- if buffer[position] != rune(')') {
- goto l463
+ {
+ position473, tokenIndex473 := position, tokenIndex
+ if !_rules[ruleLocalSymbol]() {
+ goto l474
+ }
+ goto l473
+ l474:
+ position, tokenIndex = position473, tokenIndex473
+ if !_rules[ruleSymbolName]() {
+ goto l467
+ }
+ }
+ l473:
+ l475:
+ {
+ position476, tokenIndex476 := position, tokenIndex
+ if !_rules[ruleOffset]() {
+ goto l476
+ }
+ goto l475
+ l476:
+ position, tokenIndex = position476, tokenIndex476
+ }
+ {
+ position477, tokenIndex477 := position, tokenIndex
+ if buffer[position] != rune('@') {
+ goto l477
+ }
+ position++
+ if !_rules[ruleSection]() {
+ goto l477
+ }
+ l479:
+ {
+ position480, tokenIndex480 := position, tokenIndex
+ if !_rules[ruleOffset]() {
+ goto l480
+ }
+ goto l479
+ l480:
+ position, tokenIndex = position480, tokenIndex480
+ }
+ goto l478
+ l477:
+ position, tokenIndex = position477, tokenIndex477
+ }
+ l478:
+ add(ruleSymbolRef, position468)
+ }
+ return true
+ l467:
+ position, tokenIndex = position467, tokenIndex467
+ return false
+ },
+ /* 35 BaseIndexScale <- <('(' RegisterOrConstant? WS? (',' WS? RegisterOrConstant WS? (',' [0-9]+)?)? ')')> */
+ func() bool {
+ position481, tokenIndex481 := position, tokenIndex
+ {
+ position482 := position
+ if buffer[position] != rune('(') {
+ goto l481
}
position++
- add(ruleBaseIndexScale, position464)
- }
- return true
- l463:
- position, tokenIndex = position463, tokenIndex463
- return false
- },
- /* 36 Operator <- <('+' / '-')> */
- func() bool {
- position479, tokenIndex479 := position, tokenIndex
- {
- position480 := position
{
- position481, tokenIndex481 := position, tokenIndex
- if buffer[position] != rune('+') {
- goto l482
+ position483, tokenIndex483 := position, tokenIndex
+ if !_rules[ruleRegisterOrConstant]() {
+ goto l483
}
- position++
- goto l481
- l482:
- position, tokenIndex = position481, tokenIndex481
- if buffer[position] != rune('-') {
- goto l479
- }
- position++
+ goto l484
+ l483:
+ position, tokenIndex = position483, tokenIndex483
}
- l481:
- add(ruleOperator, position480)
- }
- return true
- l479:
- position, tokenIndex = position479, tokenIndex479
- return false
- },
- /* 37 Offset <- <('+'? '-'? (('0' ('b' / 'B') ('0' / '1')+) / ('0' ('x' / 'X') ([0-9] / [0-9] / ([a-f] / [A-F]))+) / [0-9]+))> */
- func() bool {
- position483, tokenIndex483 := position, tokenIndex
- {
- position484 := position
+ l484:
{
position485, tokenIndex485 := position, tokenIndex
- if buffer[position] != rune('+') {
+ if !_rules[ruleWS]() {
goto l485
}
- position++
goto l486
l485:
position, tokenIndex = position485, tokenIndex485
@@ -3768,295 +3812,409 @@
l486:
{
position487, tokenIndex487 := position, tokenIndex
- if buffer[position] != rune('-') {
+ if buffer[position] != rune(',') {
goto l487
}
position++
+ {
+ position489, tokenIndex489 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l489
+ }
+ goto l490
+ l489:
+ position, tokenIndex = position489, tokenIndex489
+ }
+ l490:
+ if !_rules[ruleRegisterOrConstant]() {
+ goto l487
+ }
+ {
+ position491, tokenIndex491 := position, tokenIndex
+ if !_rules[ruleWS]() {
+ goto l491
+ }
+ goto l492
+ l491:
+ position, tokenIndex = position491, tokenIndex491
+ }
+ l492:
+ {
+ position493, tokenIndex493 := position, tokenIndex
+ if buffer[position] != rune(',') {
+ goto l493
+ }
+ position++
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l493
+ }
+ position++
+ l495:
+ {
+ position496, tokenIndex496 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l496
+ }
+ position++
+ goto l495
+ l496:
+ position, tokenIndex = position496, tokenIndex496
+ }
+ goto l494
+ l493:
+ position, tokenIndex = position493, tokenIndex493
+ }
+ l494:
goto l488
l487:
position, tokenIndex = position487, tokenIndex487
}
l488:
- {
- position489, tokenIndex489 := position, tokenIndex
- if buffer[position] != rune('0') {
- goto l490
- }
- position++
- {
- position491, tokenIndex491 := position, tokenIndex
- if buffer[position] != rune('b') {
- goto l492
- }
- position++
- goto l491
- l492:
- position, tokenIndex = position491, tokenIndex491
- if buffer[position] != rune('B') {
- goto l490
- }
- position++
- }
- l491:
- {
- position495, tokenIndex495 := position, tokenIndex
- if buffer[position] != rune('0') {
- goto l496
- }
- position++
- goto l495
- l496:
- position, tokenIndex = position495, tokenIndex495
- if buffer[position] != rune('1') {
- goto l490
- }
- position++
- }
- l495:
- l493:
- {
- position494, tokenIndex494 := position, tokenIndex
- {
- position497, tokenIndex497 := position, tokenIndex
- if buffer[position] != rune('0') {
- goto l498
- }
- position++
- goto l497
- l498:
- position, tokenIndex = position497, tokenIndex497
- if buffer[position] != rune('1') {
- goto l494
- }
- position++
- }
- l497:
- goto l493
- l494:
- position, tokenIndex = position494, tokenIndex494
- }
- goto l489
- l490:
- position, tokenIndex = position489, tokenIndex489
- if buffer[position] != rune('0') {
- goto l499
- }
- position++
- {
- position500, tokenIndex500 := position, tokenIndex
- if buffer[position] != rune('x') {
- goto l501
- }
- position++
- goto l500
- l501:
- position, tokenIndex = position500, tokenIndex500
- if buffer[position] != rune('X') {
- goto l499
- }
- position++
- }
- l500:
- {
- position504, tokenIndex504 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l505
- }
- position++
- goto l504
- l505:
- position, tokenIndex = position504, tokenIndex504
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l506
- }
- position++
- goto l504
- l506:
- position, tokenIndex = position504, tokenIndex504
- {
- position507, tokenIndex507 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('f') {
- goto l508
- }
- position++
- goto l507
- l508:
- position, tokenIndex = position507, tokenIndex507
- if c := buffer[position]; c < rune('A') || c > rune('F') {
- goto l499
- }
- position++
- }
- l507:
- }
- l504:
- l502:
- {
- position503, tokenIndex503 := position, tokenIndex
- {
- position509, tokenIndex509 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l510
- }
- position++
- goto l509
- l510:
- position, tokenIndex = position509, tokenIndex509
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l511
- }
- position++
- goto l509
- l511:
- position, tokenIndex = position509, tokenIndex509
- {
- position512, tokenIndex512 := position, tokenIndex
- if c := buffer[position]; c < rune('a') || c > rune('f') {
- goto l513
- }
- position++
- goto l512
- l513:
- position, tokenIndex = position512, tokenIndex512
- if c := buffer[position]; c < rune('A') || c > rune('F') {
- goto l503
- }
- position++
- }
- l512:
- }
- l509:
- goto l502
- l503:
- position, tokenIndex = position503, tokenIndex503
- }
- goto l489
- l499:
- position, tokenIndex = position489, tokenIndex489
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l483
- }
- position++
- l514:
- {
- position515, tokenIndex515 := position, tokenIndex
- if c := buffer[position]; c < rune('0') || c > rune('9') {
- goto l515
- }
- position++
- goto l514
- l515:
- position, tokenIndex = position515, tokenIndex515
- }
+ if buffer[position] != rune(')') {
+ goto l481
}
- l489:
- add(ruleOffset, position484)
+ position++
+ add(ruleBaseIndexScale, position482)
}
return true
- l483:
- position, tokenIndex = position483, tokenIndex483
+ l481:
+ position, tokenIndex = position481, tokenIndex481
+ return false
+ },
+ /* 36 Operator <- <('+' / '-')> */
+ func() bool {
+ position497, tokenIndex497 := position, tokenIndex
+ {
+ position498 := position
+ {
+ position499, tokenIndex499 := position, tokenIndex
+ if buffer[position] != rune('+') {
+ goto l500
+ }
+ position++
+ goto l499
+ l500:
+ position, tokenIndex = position499, tokenIndex499
+ if buffer[position] != rune('-') {
+ goto l497
+ }
+ position++
+ }
+ l499:
+ add(ruleOperator, position498)
+ }
+ return true
+ l497:
+ position, tokenIndex = position497, tokenIndex497
+ return false
+ },
+ /* 37 Offset <- <('+'? '-'? (('0' ('b' / 'B') ('0' / '1')+) / ('0' ('x' / 'X') ([0-9] / [0-9] / ([a-f] / [A-F]))+) / [0-9]+))> */
+ func() bool {
+ position501, tokenIndex501 := position, tokenIndex
+ {
+ position502 := position
+ {
+ position503, tokenIndex503 := position, tokenIndex
+ if buffer[position] != rune('+') {
+ goto l503
+ }
+ position++
+ goto l504
+ l503:
+ position, tokenIndex = position503, tokenIndex503
+ }
+ l504:
+ {
+ position505, tokenIndex505 := position, tokenIndex
+ if buffer[position] != rune('-') {
+ goto l505
+ }
+ position++
+ goto l506
+ l505:
+ position, tokenIndex = position505, tokenIndex505
+ }
+ l506:
+ {
+ position507, tokenIndex507 := position, tokenIndex
+ if buffer[position] != rune('0') {
+ goto l508
+ }
+ position++
+ {
+ position509, tokenIndex509 := position, tokenIndex
+ if buffer[position] != rune('b') {
+ goto l510
+ }
+ position++
+ goto l509
+ l510:
+ position, tokenIndex = position509, tokenIndex509
+ if buffer[position] != rune('B') {
+ goto l508
+ }
+ position++
+ }
+ l509:
+ {
+ position513, tokenIndex513 := position, tokenIndex
+ if buffer[position] != rune('0') {
+ goto l514
+ }
+ position++
+ goto l513
+ l514:
+ position, tokenIndex = position513, tokenIndex513
+ if buffer[position] != rune('1') {
+ goto l508
+ }
+ position++
+ }
+ l513:
+ l511:
+ {
+ position512, tokenIndex512 := position, tokenIndex
+ {
+ position515, tokenIndex515 := position, tokenIndex
+ if buffer[position] != rune('0') {
+ goto l516
+ }
+ position++
+ goto l515
+ l516:
+ position, tokenIndex = position515, tokenIndex515
+ if buffer[position] != rune('1') {
+ goto l512
+ }
+ position++
+ }
+ l515:
+ goto l511
+ l512:
+ position, tokenIndex = position512, tokenIndex512
+ }
+ goto l507
+ l508:
+ position, tokenIndex = position507, tokenIndex507
+ if buffer[position] != rune('0') {
+ goto l517
+ }
+ position++
+ {
+ position518, tokenIndex518 := position, tokenIndex
+ if buffer[position] != rune('x') {
+ goto l519
+ }
+ position++
+ goto l518
+ l519:
+ position, tokenIndex = position518, tokenIndex518
+ if buffer[position] != rune('X') {
+ goto l517
+ }
+ position++
+ }
+ l518:
+ {
+ position522, tokenIndex522 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l523
+ }
+ position++
+ goto l522
+ l523:
+ position, tokenIndex = position522, tokenIndex522
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l524
+ }
+ position++
+ goto l522
+ l524:
+ position, tokenIndex = position522, tokenIndex522
+ {
+ position525, tokenIndex525 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('f') {
+ goto l526
+ }
+ position++
+ goto l525
+ l526:
+ position, tokenIndex = position525, tokenIndex525
+ if c := buffer[position]; c < rune('A') || c > rune('F') {
+ goto l517
+ }
+ position++
+ }
+ l525:
+ }
+ l522:
+ l520:
+ {
+ position521, tokenIndex521 := position, tokenIndex
+ {
+ position527, tokenIndex527 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l528
+ }
+ position++
+ goto l527
+ l528:
+ position, tokenIndex = position527, tokenIndex527
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l529
+ }
+ position++
+ goto l527
+ l529:
+ position, tokenIndex = position527, tokenIndex527
+ {
+ position530, tokenIndex530 := position, tokenIndex
+ if c := buffer[position]; c < rune('a') || c > rune('f') {
+ goto l531
+ }
+ position++
+ goto l530
+ l531:
+ position, tokenIndex = position530, tokenIndex530
+ if c := buffer[position]; c < rune('A') || c > rune('F') {
+ goto l521
+ }
+ position++
+ }
+ l530:
+ }
+ l527:
+ goto l520
+ l521:
+ position, tokenIndex = position521, tokenIndex521
+ }
+ goto l507
+ l517:
+ position, tokenIndex = position507, tokenIndex507
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l501
+ }
+ position++
+ l532:
+ {
+ position533, tokenIndex533 := position, tokenIndex
+ if c := buffer[position]; c < rune('0') || c > rune('9') {
+ goto l533
+ }
+ position++
+ goto l532
+ l533:
+ position, tokenIndex = position533, tokenIndex533
+ }
+ }
+ l507:
+ add(ruleOffset, position502)
+ }
+ return true
+ l501:
+ position, tokenIndex = position501, tokenIndex501
return false
},
/* 38 Section <- <([a-z] / [A-Z] / '@')+> */
func() bool {
- position516, tokenIndex516 := position, tokenIndex
+ position534, tokenIndex534 := position, tokenIndex
{
- position517 := position
+ position535 := position
{
- position520, tokenIndex520 := position, tokenIndex
+ position538, tokenIndex538 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l521
+ goto l539
}
position++
- goto l520
- l521:
- position, tokenIndex = position520, tokenIndex520
+ goto l538
+ l539:
+ position, tokenIndex = position538, tokenIndex538
if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l522
+ goto l540
}
position++
- goto l520
- l522:
- position, tokenIndex = position520, tokenIndex520
+ goto l538
+ l540:
+ position, tokenIndex = position538, tokenIndex538
if buffer[position] != rune('@') {
- goto l516
+ goto l534
}
position++
}
- l520:
- l518:
+ l538:
+ l536:
{
- position519, tokenIndex519 := position, tokenIndex
+ position537, tokenIndex537 := position, tokenIndex
{
- position523, tokenIndex523 := position, tokenIndex
+ position541, tokenIndex541 := position, tokenIndex
if c := buffer[position]; c < rune('a') || c > rune('z') {
- goto l524
+ goto l542
}
position++
- goto l523
- l524:
- position, tokenIndex = position523, tokenIndex523
+ goto l541
+ l542:
+ position, tokenIndex = position541, tokenIndex541
if c := buffer[position]; c < rune('A') || c > rune('Z') {
- goto l525
+ goto l543
}
position++
- goto l523
- l525:
- position, tokenIndex = position523, tokenIndex523
+ goto l541
+ l543:
+ position, tokenIndex = position541, tokenIndex541
if buffer[position] != rune('@') {
- goto l519
+ goto l537
}
position++
}
- l523:
- goto l518
- l519:
- position, tokenIndex = position519, tokenIndex519
+ l541:
+ goto l536
+ l537:
+ position, tokenIndex = position537, tokenIndex537
}
- add(ruleSection, position517)
+ add(ruleSection, position535)
}
return true
- l516:
- position, tokenIndex = position516, tokenIndex516
+ l534:
+ position, tokenIndex = position534, tokenIndex534
return false
},
/* 39 SegmentRegister <- <('%' ([c-g] / 's') ('s' ':'))> */
func() bool {
- position526, tokenIndex526 := position, tokenIndex
+ position544, tokenIndex544 := position, tokenIndex
{
- position527 := position
+ position545 := position
if buffer[position] != rune('%') {
- goto l526
+ goto l544
}
position++
{
- position528, tokenIndex528 := position, tokenIndex
+ position546, tokenIndex546 := position, tokenIndex
if c := buffer[position]; c < rune('c') || c > rune('g') {
- goto l529
+ goto l547
}
position++
- goto l528
- l529:
- position, tokenIndex = position528, tokenIndex528
+ goto l546
+ l547:
+ position, tokenIndex = position546, tokenIndex546
if buffer[position] != rune('s') {
- goto l526
+ goto l544
}
position++
}
- l528:
+ l546:
if buffer[position] != rune('s') {
- goto l526
+ goto l544
}
position++
if buffer[position] != rune(':') {
- goto l526
+ goto l544
}
position++
- add(ruleSegmentRegister, position527)
+ add(ruleSegmentRegister, position545)
}
return true
- l526:
- position, tokenIndex = position526, tokenIndex526
+ l544:
+ position, tokenIndex = position544, tokenIndex544
return false
},
}
diff --git a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in1.s b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in1.s
index e97b280..8ee7089 100644
--- a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in1.s
+++ b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in1.s
@@ -35,6 +35,8 @@
.quad 42
.L2:
.quad .L2-.L1
+ .uleb128 .L2-.L1
+ .sleb128 .L2-.L1
# Local labels and their jumps are left alone.
.text
diff --git a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in2.s b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in2.s
index 7a5a551..5027325 100644
--- a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in2.s
+++ b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in2.s
@@ -9,4 +9,6 @@
.quad 42
.L2:
.quad .L2-.L1
+ .uleb128 .L2-.L1
+ .sleb128 .L2-.L1
diff --git a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s
index 8cc27de..252f69c 100644
--- a/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s
+++ b/util/fipstools/delocate/testdata/x86_64-LabelRewrite/out.s
@@ -56,6 +56,8 @@
.L2:
.quad .L2-.L1
+ .uleb128 .L2-.L1
+ .sleb128 .L2-.L1
# Local labels and their jumps are left alone.
.text
@@ -82,6 +84,10 @@
# WAS .quad .L2-.L1
.quad .L2_BCM_1-.L1_BCM_1
+# WAS .uleb128 .L2-.L1
+ .uleb128 .L2_BCM_1-.L1_BCM_1
+# WAS .sleb128 .L2-.L1
+ .sleb128 .L2_BCM_1-.L1_BCM_1
.text
.loc 1 2 0