)]}'
{
  "commit": "e09bbaec69a8ff960110e13eabb3bef5331ecb0c",
  "tree": "87cb47a464ae27caf59c463547ed55f1b92e146a",
  "parents": [
    "8a9e2d9d49a9d5234b52a0360ed6a0f91753c291"
  ],
  "author": {
    "name": "erifan01",
    "email": "eric.fang@arm.com",
    "time": "Tue Oct 25 12:08:05 2022 +0800"
  },
  "committer": {
    "name": "Eric Fang",
    "email": "eric.fang@arm.com",
    "time": "Sat Oct 29 04:48:07 2022 +0000"
  },
  "message": "cmd/compile: enable address folding for global symbols of shared library\n\nAddress folding is disabled in CL42172, the commit message of which\nsaid that \"In shared library, load/store of global is rewritten to\nusing GOT and temp register, which conflicts with the use of temp\nregister for assembling large offset.\". Actually this doesn\u0027t happen\nbecause the sequence of instructions when rewritten to use Got looks\nlike this:\n  MOVD $sym, Rx becomes\n  MOVD sym@GOT, Rx\nIf there is an offset off, there will be one more instruction:\n  ADD $off, Rx, Rx\n\nAnd MOVD sym, Rx becomes\n  MOVD sym@GOT, REGTMP\n  MOVx (REGTMP), Ry\n\nIf there is a small offset off, it becomes:\n  MOVD sym@GOT, REGTMP\n  MOVx (REGTMP)off, Ry\n\nIf off is very large, it becomes:\n  MOVD sym@GOT, REGTMP\n  MOVD $off, Rt\n  ADD  Rt, REGTMP\n  MOVx (REGTMP), Ry\n\nWe can see that the address can be calculated correctly, and testing\non darwin/arm64 confirms this.\n\nRemoving this restriction is beneficial to further optimize the sequence\nof \"ADRP+ADD+LD/ST\" to \"ADRP+LD/ST(offset), so this CL removes it.\n\nChange-Id: I0e9f7bc1723e0a027f32cf0ae2c41cd6df49defe\nReviewed-on: https://go-review.googlesource.com/c/go/+/445535\nReviewed-by: Cherry Mui \u003ccherryyz@google.com\u003e\nRun-TryBot: Eric Fang \u003ceric.fang@arm.com\u003e\nReviewed-by: Heschi Kreinick \u003cheschi@google.com\u003e\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b3c0e72f6e39583c66b06b38c1f7ba1f73f5414",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/ssa/_gen/ARM64.rules",
      "new_id": "4dafef574e5368676969f7720308c52c7c67dc66",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/ssa/_gen/ARM64.rules"
    },
    {
      "type": "modify",
      "old_id": "731ea980da01562626622c34dd8405d1ecc30caf",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/ssa/rewriteARM64.go",
      "new_id": "e8b3aeb9cbba5ea4af330eb6b9795a39d7a3a220",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/ssa/rewriteARM64.go"
    }
  ]
}
