diff --git a/util/fipstools/delocate/delocate.go b/util/fipstools/delocate/delocate.go index f8573e3055b..d7ae588d2fb 100644 --- a/util/fipstools/delocate/delocate.go +++ b/util/fipstools/delocate/delocate.go @@ -1380,6 +1380,13 @@ Args: case ruleRegisterOrConstant, ruleLocalLabelRef: args = append(args, d.contents(fullArg)) + // The AVX-512 mask register is appended to its + // preceding `RegisterOrConstant` without whitespace + // or a comma. + case ruleAVX512Token: + tail := &args[len(args)-1]; + *tail += d.contents(fullArg); + case ruleMemoryRef: symbol, offset, section, didChange, symbolIsLocal, memRef := d.parseMemRef(arg.up) changed = didChange diff --git a/util/fipstools/delocate/delocate.peg b/util/fipstools/delocate/delocate.peg index 8900af05cc2..0b83eca6a50 100644 --- a/util/fipstools/delocate/delocate.peg +++ b/util/fipstools/delocate/delocate.peg @@ -72,7 +72,7 @@ LocalLabel <- [0-9][0-9$]* LocalLabelRef <- [0-9][0-9$]*[bf] Instruction <- InstructionName (WS InstructionArg ((WS? ','? WS?) InstructionArg)*)? InstructionName <- [[A-Z]][[A-Z.0-9]]* [.+\-]? -InstructionArg <- IndirectionIndicator? (ARMConstantTweak / RegisterOrConstant / LocalLabelRef / TOCRefHigh / TOCRefLow / GOTLocation / GOTSymbolOffset / MemoryRef) AVX512Token* +InstructionArg <- IndirectionIndicator? (ARMConstantTweak / RegisterOrConstant / LocalLabelRef / TOCRefHigh / TOCRefLow / GOTLocation / GOTSymbolOffset / MemoryRef / AVX512Token) GOTLocation <- '$_GLOBAL_OFFSET_TABLE_-' LocalSymbol GOTSymbolOffset <- ('$' SymbolName '@GOT' 'OFF'?) / (":got:" SymbolName) AVX512Token <- WS? '{' '%'? [0-9a-z]* '}'