)]}'
{
  "commit": "082251bba4effea7f60191c6cbddacb3705c07db",
  "tree": "dff60797f07b93c2f82ec61c8b3cc24dc37c0dc1",
  "parents": [
    "52360d195b85608c677d781272534dfa61e9a1c3"
  ],
  "author": {
    "name": "Jameson Nash",
    "email": "vtjnash@gmail.com",
    "time": "Wed Jun 11 21:49:01 2025 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jun 11 21:49:01 2025 -0400"
  },
  "message": "[AArch64] fix trampoline implementation: use X15 (#126743)\n\nAAPCS64 reserves any of X9-X15 for a compiler to choose to use for this\npurpose, and says not to use X16 or X18 like GCC (and the previous\nimplementation) chose to use. The X18 register may need to get used by\nthe kernel in some circumstances, as specified by the platform ABI, so\nit is generally an unwise choice. Simply choosing a different register\nfixes the problem of this being broken on any platform that actually\nfollows the platform ABI (which is all of them except EABI, if I am\nreading this linux kernel bug correctly\nhttps://lkml2.uits.iu.edu/hypermail/linux/kernel/2001.2/01502.html). As\na side benefit, also generate slightly better code and avoids needing\nthe compiler-rt to be present. I did that by following the XCore\nimplementation instead of PPC (although in hindsight, following the\nRISCV might have been slightly more readable). That X18 is wrong to use\nfor this purpose has been known for many years (e.g.\nhttps://www.mail-archive.com/gcc@gcc.gnu.org/msg76934.html) and also\nknown that fixing this to use one of the correct registers is not an ABI\nbreak, since this only appears inside of a translation unit. Some of the\nother temporary registers (e.g. X9) are already reserved inside llvm for\ninternal use as a generic temporary register in the prologue before\nsaving registers, while X15 was already used in rare cases as a scratch\nregister in the prologue as well, so I felt that seemed the most logical\nchoice to choose here.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "19f26c92a0f94f163aa106a12f6ac612129e0214",
      "old_mode": 33188,
      "old_path": "compiler-rt/lib/builtins/README.txt",
      "new_id": "2d213d95f333af3dbdf252a0ec7a748938559230",
      "new_mode": 33188,
      "new_path": "compiler-rt/lib/builtins/README.txt"
    },
    {
      "type": "modify",
      "old_id": "830e25e4c0303ad75afd777e220a791f2370191a",
      "old_mode": 33188,
      "old_path": "compiler-rt/lib/builtins/trampoline_setup.c",
      "new_id": "844eb279441428574e7314669d3573b1c1f993a7",
      "new_mode": 33188,
      "new_path": "compiler-rt/lib/builtins/trampoline_setup.c"
    },
    {
      "type": "modify",
      "old_id": "d51d35acaa02f1c74dce37a2833118e21561a7fb",
      "old_mode": 33188,
      "old_path": "compiler-rt/test/builtins/Unit/trampoline_setup_test.c",
      "new_id": "da115fe7642718375142f4b2bdafa426e3b52b1f",
      "new_mode": 33188,
      "new_path": "compiler-rt/test/builtins/Unit/trampoline_setup_test.c"
    },
    {
      "type": "modify",
      "old_id": "82b11ad7db32a2b2bc20a4da604f6caef1a75fdf",
      "old_mode": 33188,
      "old_path": "flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp",
      "new_id": "69bdb48146a54a7d0c01172f90d9afb9abc6c36d",
      "new_mode": 33188,
      "new_path": "flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp"
    },
    {
      "type": "modify",
      "old_id": "5d82522055adc8c0455a3d36718020fbdd62a89a",
      "old_mode": 33188,
      "old_path": "flang/test/Fir/boxproc.fir",
      "new_id": "97d9b38ed6f4008b9ecb29ec9e296f4e6b4d2b15",
      "new_mode": 33188,
      "new_path": "flang/test/Fir/boxproc.fir"
    },
    {
      "type": "modify",
      "old_id": "920cc67273146e82917771da9a5de4e9e6d21ee9",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/AArch64/AArch64CallingConvention.td",
      "new_id": "1b5a713bffdc9abddf8829b47b1371b14cec0aca",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/AArch64/AArch64CallingConvention.td"
    },
    {
      "type": "modify",
      "old_id": "3335ee04bb0e0fdb17ebb69b4516a454f24a4a08",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/AArch64/AArch64FrameLowering.cpp",
      "new_id": "2650c621e19f603a0632ce7b51dc52ccf09d3473",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/AArch64/AArch64FrameLowering.cpp"
    },
    {
      "type": "modify",
      "old_id": "766599d567efd3ab92c840f73985e538d8bc4c43",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp",
      "new_id": "ad5b90984188e1801d9115652d3f187404c1f065",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp"
    },
    {
      "type": "modify",
      "old_id": "bd291e1918219a3402516957ec5cb7d6750b30a3",
      "old_mode": 33188,
      "old_path": "llvm/lib/TargetParser/Triple.cpp",
      "new_id": "5718ae385bac1d4872294db9bbe87420ae6e692f",
      "new_mode": 33188,
      "new_path": "llvm/lib/TargetParser/Triple.cpp"
    },
    {
      "type": "modify",
      "old_id": "1e1c1b044bab653d4d73c6ce5e4f51ce0ff44964",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/nest-register.ll",
      "new_id": "2e94dfba1fa523ebdcc1785069d84a41c63400e5",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/nest-register.ll"
    },
    {
      "type": "modify",
      "old_id": "9619895c450cac3588a343143473ad49028134b9",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/statepoint-call-lowering.ll",
      "new_id": "32c3eaeb9c8766c90b92b7feaa014034543f6cb1",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/statepoint-call-lowering.ll"
    },
    {
      "type": "modify",
      "old_id": "30ac2aa283b3eec2a122ef4c84cb76651fa34bc1",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/trampoline.ll",
      "new_id": "d9016b02a0f80842309dcd4b5024972dcad11e43",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/trampoline.ll"
    },
    {
      "type": "modify",
      "old_id": "b3e78cc9bbb81001aad195bab51a363fe7cca0ba",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/win64cc-x18.ll",
      "new_id": "4b45c300e9c1d5ce747a340d4c56ba06395ad77e",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/win64cc-x18.ll"
    },
    {
      "type": "modify",
      "old_id": "4799ea3bcd19f67ed48b827a0f113ef7a3341c22",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/zero-call-used-regs.ll",
      "new_id": "986666e015e9ec66bb15802c22c2f2611cc791ae",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/zero-call-used-regs.ll"
    }
  ]
}
