# How does the j\_xx function generated?

**URL:** https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590
**Category:** General Usage
**Tags:** question
**Created:** [November 1, 2025, 7:01am UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590 "2025-11-01T07:01:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![envyslee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/envyslee/32/32033_2.png) [@envyslee](https://discourse.julialang.org/u/envyslee)
#### Post date: [November 1, 2025, 7:01am UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/1 "2025-11-01T07:01:48Z")

</div>

Julia 1.12.1  
LLVM 18.1.0

When I build Julia, it runs command “./julia-debug -O0 -C “native” --output-o path/basecompiler-debug-o.a.tmp --startup-file=no --warn-overwrite=yes -g1 Base\_compiler.jl --buildroot ./ --dataroot ../usr/share/”, but I got an error.

 ![cf642366bf5006361bb5e2b933fc9b6](https://global.discourse-cdn.com/julialang/original/3X/8/8/886332f76caa924a1db6135d620b70d1af10fc94.jpeg)

I check the asm by gdb, #0 load from the 3rd argument register, actually the register value is not a address but a number 0x3.  
From #1 to #0, the function called itself, before the call, asm load 0x3 to the 3rd register.  
I also find other j\_xx function dose the same thing: loads 0x3 to the 3rd register and calls itself .  
So, Could anybody tell me how or where does the j\_xx function generated?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 2, 2025, 1:08am UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/2 "2025-11-02T01:08:15Z")

</div>

On my sytem I see:

```julia-auto
julia> versioninfo()
Julia Version 1.12.1
Commit ba1e628ee49 (2025-10-17 13:02 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)

```

So Julia 1.12.1 is using LLVM 18.1.7.

And most likely it needs a patched version of LLVM 18.1.7.

I would expect any other version of LLVM to fail.

What are you trying to achieve?

---

<div class="post-metadata">

### Author: ![envyslee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/envyslee/32/32033_2.png) [@envyslee](https://discourse.julialang.org/u/envyslee)
#### Post date: [November 2, 2025, 1:22pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/3 "2025-11-02T13:22:04Z")

</div>

First of all, thank you very much for your reply!  
I am trying to compile the Julia on my own platform.  
Do you have a version relationship table for Julia and LLVM?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 2, 2025, 1:27pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/4 "2025-11-02T13:27:01Z")

</div>

Well, you can install any Julia version you like using `juliaup`, like:

```julia-auto
juliaup add 1.11

```

or whatever version you are interested in.

```julia-auto
versioninfo()

```

tells you the LLVM version that is used. For Julia 1.11.7 it is `libLLVM-16.0.6 `.

I don’t know how to determine which patches have been applied to LLVM, though.

---

<div class="post-metadata">

### Author: ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)
#### Post date: [November 2, 2025, 1:39pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/5 "2025-11-02T13:39:22Z")

</div>

> [@ufechner7](#):
>
> I don’t know how to determine which patches have been applied to LLVM, though.

I think they are in `deps/patches/` in julia’s source tree: [julia/deps/patches at v1.12.1 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/tree/v1.12.1/deps/patches)  
It changes by julia version, since the julia developers are submitting patches to llvm, and there’s some lag.

---

<div class="post-metadata">

### Author: ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)
#### Post date: [November 2, 2025, 1:55pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/6 "2025-11-02T13:55:47Z")

</div>

> [@envyslee](#):
>
> So, Could anybody tell me how or where does the j\_xx function generated?

By their names it looks like they are instances of julia methods. E.g. `j_fixup_phinode_value!_53300` is a compiler-generated name for an instance of `fixup_phinode_value!`, a julia function defined in `Compiler/src/ssair/ir.jl`. Similarly with `japi1_just_fixup!_22814` which is an instance of `just_fixup!` in the same file. If you have the wrong version of llvm, or have not applied the patches, it’s likely that their native code is wrong in various ways. Though, I don’t know the inner workings of the compiler.

---

<div class="post-metadata">

### Author: ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)
#### Post date: [November 2, 2025, 4:23pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/7 "2025-11-02T16:23:06Z")

</div>

> [@envyslee](#):
>
> I am trying to compile the Julia on my own platform.

I am not sure why that involves you providing a different LLVM. I compiled Julia from source following the instructions in the [GitHub Readme](https://github.com/JuliaLang/julia?tab=readme-ov-file#building-julia) just fine. You can find links to Julia’s dependencies there as well but usually they are either provided directly or downloaded automatically.

Still, using the prebuild binaries (via juliaup) is what anyone should use except if you plan to do development on Julia itself.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [November 2, 2025, 11:46pm UTC](https://discourse.julialang.org/t/how-does-the-j-xx-function-generated/133590/8 "2025-11-02T23:46:39Z")

</div>

> [@ufechner7](#):
>
> I don’t know how to determine which patches have been applied to LLVM, though.

> **[Comparing llvm:llvmorg-18.1.7...JuliaLang:julia-release/18.x · llvm/llvm-project](https://github.com/llvm/llvm-project/compare/llvmorg-18.1.7...JuliaLang:llvm-project:julia-release/18.x)**
>
> The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. - Comparing llvm:llvmorg-18.1.7...JuliaLang:julia-release/18.x · llvm/llvm-project

> [@sgaure](#):
>
> I think they are in `deps/patches/` in julia’s source tree: [julia/deps/patches at v1.12.1 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/tree/v1.12.1/deps/patches)

LLVM patches are _ **not** _ there. Besides, that directory contains patches for fully from source builds, which _may_ (but in theory should not) match the binary builds done in Yggdrasil used in the official binaries, so that directory isn’t the source of truth.
