Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 586f364e7e1475375a458aa830fed85b69be4438
      
https://github.com/WebKit/WebKit/commit/586f364e7e1475375a458aa830fed85b69be4438
  Author: Vassili Bykov <[email protected]>
  Date:   2026-02-24 (Tue, 24 Feb 2026)

  Changed paths:
    M Source/JavaScriptCore/offlineasm/arm64.rb
    M Source/JavaScriptCore/offlineasm/ast.rb
    M Source/JavaScriptCore/offlineasm/backends.rb

  Log Message:
  -----------
  [JSC] The pcrtoaddr offlineasm instruction should be lowered differently to 
support global labels
rdar://170991136
https://bugs.webkit.org/show_bug.cgi?id=308517

Reviewed by Yusuke Suzuki.

The `pcrtoaddr` instruction is lowered for arm64 into a single `adr` 
instruction. This works
reliably for local labels. JSPI implementation adds a case where the 
instruction is used to load an
address of a global label. In this situation, `adr` appears to work only in 
some build
configurations and in others causes an "unknown fixup kind" build error.

This patch augments `pcrtoaddr` implementation so that for global labels it 
translates into an
`adrp`/`add` instruction sequence. For local labels it keeps the existing 
single-instruction scheme.
It also adds a useful externOrGlobal? predicate to LabelReference, used 
elsewhere for a similar
conditional.

Testing: integration-tested at its call sites.
Canonical link: https://commits.webkit.org/308139@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to