update master-with-bazel from master branch

This commit is contained in:
BoringSSL Robot
2023-12-15 00:21:20 +00:00
5 changed files with 1888 additions and 1733 deletions
+16
View File
@@ -1163,6 +1163,22 @@ Args:
args = append(args, argStr)
case ruleGOTAddress:
if instructionName != "leaq" {
return nil, fmt.Errorf("_GLOBAL_OFFSET_TABLE_ used outside of lea")
}
if i != 0 || len(argNodes) != 2 {
return nil, fmt.Errorf("Load of _GLOBAL_OFFSET_TABLE_ address didn't have expected form")
}
d.gotDeltaNeeded = true
changed = true
targetReg := d.contents(argNodes[1])
args = append(args, ".Lboringssl_got_delta(%rip)")
wrappers = append(wrappers, func(k func()) {
k()
d.output.WriteString(fmt.Sprintf("\taddq .Lboringssl_got_delta(%%rip), %s\n", targetReg))
})
case ruleGOTLocation:
if instructionName != "movabsq" {
return nil, fmt.Errorf("_GLOBAL_OFFSET_TABLE_ lookup didn't use movabsq")
+2 -1
View File
@@ -68,8 +68,9 @@ 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 / GOTAddress / GOTSymbolOffset / MemoryRef) AVX512Token*
GOTLocation <- '$_GLOBAL_OFFSET_TABLE_-' LocalSymbol
GOTAddress <- '_GLOBAL_OFFSET_TABLE_(%rip)'
GOTSymbolOffset <- ('$' SymbolName '@GOT' 'OFF'?) / (":got:" SymbolName)
AVX512Token <- WS? '{' '%'? [0-9a-z]* '}'
TOCRefHigh <- '.TOC.-' ('0b' / ('.L' [a-zA-Z_0-9]+)) "@ha"
File diff suppressed because it is too large Load Diff
@@ -65,4 +65,7 @@ bar:
cmpq foo@GOTPCREL(%rip), %rax
cmpq %rax, foo@GOTPCREL(%rip)
# With -mcmodel=medium, the code may load the address of the GOT directly.
leaq _GLOBAL_OFFSET_TABLE_(%rip), %rcx
.comm foobar,64,32
@@ -268,6 +268,11 @@ bar:
popq %rbx
leaq 128(%rsp), %rsp
# With -mcmodel=medium, the code may load the address of the GOT directly.
# WAS leaq _GLOBAL_OFFSET_TABLE_(%rip), %rcx
leaq .Lboringssl_got_delta(%rip), %rcx
addq .Lboringssl_got_delta(%rip), %rcx
.comm foobar,64,32
.text
.loc 1 2 0
@@ -302,6 +307,8 @@ OPENSSL_ia32cap_get:
.size OPENSSL_ia32cap_addr_delta, 8
OPENSSL_ia32cap_addr_delta:
.quad OPENSSL_ia32cap_P-OPENSSL_ia32cap_addr_delta
.Lboringssl_got_delta:
.quad _GLOBAL_OFFSET_TABLE_-.Lboringssl_got_delta
.type BORINGSSL_bcm_text_hash, @object
.size BORINGSSL_bcm_text_hash, 32
BORINGSSL_bcm_text_hash: