)]}'
{
  "commit": "41a533a85aaabef4e3f02cd2a09db23cf2ce7ac0",
  "tree": "0ddae55059ebedd0f4af9b01ff222cdef4ba6979",
  "parents": [
    "4a2d9d886ea03ad83e86dfc48df5351c22715722"
  ],
  "author": {
    "name": "Jakub Jelinek",
    "email": "jakub@redhat.com",
    "time": "Tue Mar 03 15:47:08 2026 +0100"
  },
  "committer": {
    "name": "Jakub Jelinek",
    "email": "jakub@gcc.gnu.org",
    "time": "Tue Mar 03 15:47:08 2026 +0100"
  },
  "message": "i386: Use orb instead of orl/orq for stack probes/clash [PR124336]\n\nThis PR is about an inconsistency between AT\u0026T and Intel syntax\nfor output_adjust_stack_and_probe/output_probe_stack_range.\nOn ia32 they use both orl or or BYTE PTR, i.e. 32-bit or,\nbut on x86_64 in AT\u0026T syntax they use orq (i.e. 64-bit or) and\nin Intel syntax they use or DWORD PTR (i.e. 32-bit or).\nThese cases are used when probing stack in a loop, for each\npage one probe.  There is also the probe_stack named pattern\nwhich currently uses word_mode or (i.e. 64-bit or for x86_64)\nfor both syntaxes, used when probing only once.\n\nFunctionally, I think whether we do an 8-bit or 32-bit or 64-bit\nor with 0 constant doesn\u0027t matter, we don\u0027t modify any values on the\nstack, just pretend to modify it.  The 8-bit and 32-bit ors\nare 1-byte shorter though than 64-bit one.  How the 3 behave\nperformance-wise is unknown, if the particular probed spot on the\nstack hasn\u0027t been stored/read for a while and won\u0027t be for a while,\nthen I\u0027d think it shouldn\u0027t matter, dunno if there can be store\nforwarding effects if it has been e.g. written or read very recently\nby some other function as say 32-bit access and now is 8-bit.  The\naccess after the probe (if it happens soon enough) should be in valid\nprograms a store (and again, dunno if there can be issues if the\nsizes are different).\n\nNow, for consistency reasons, we could just make the Intel\nsyntax match the AT\u0026T and use 64-bit or on x86_64, so\nuse QWORD PTR instead of DWORD PTR if stack_pointer_rtx is 64-bit\nin those 2 functions and be done with it.\n\nAnother possibility is use always 32-bit ors (in both those 2 functions\nand probe_stack*; similar to the posted patch except testsuite changes\naren\u0027t needed and s/{b}/{l}/g;s/QI/SI/g;s/BYTE PTR/DWORD PTR/g) and\nlast option is to always use 8-bit ors (which is what the following\npatch does).  Or some other mix, say use 32-bit ors for -Os/-Oz and\n64-bit ors otherwise.\n\n2026-03-03  Jakub Jelinek  \u003cjakub@redhat.com\u003e\n\n\tPR target/124336\n\t* config/i386/i386.cc (output_adjust_stack_and_probe): Use\n\tor{b} rather than or%z0 and BYTE PTR rather than DWORD PTR.\n\t(output_probe_stack_range): Likewise.\n\t* config/i386/i386.md (probe_stack): Pass just 2 arguments\n\tto gen_probe_stack_1, first adjust_address to QImode, second\n\tconst0_rtx.\n\t(@probe_stack_1_\u003cmode\u003e): Remove.\n\t(probe_stack_1): New define_insn.\n\n\t* gcc.target/i386/stack-check-11.c: Allow orb next to orl/orq.\n\t* gcc.target/i386/stack-check-18.c: Likewise.\n\t* gcc.target/i386/stack-check-19.c: Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dec8ae97bf3eb80dbdf2af85018993d84a57ed48",
      "old_mode": 33188,
      "old_path": "gcc/config/i386/i386.cc",
      "new_id": "428b68aff471d9c63dae62cf2596359892b08f03",
      "new_mode": 33188,
      "new_path": "gcc/config/i386/i386.cc"
    },
    {
      "type": "modify",
      "old_id": "5c44988112b654dcb89575f32a3731d03aebce12",
      "old_mode": 33188,
      "old_path": "gcc/config/i386/i386.md",
      "new_id": "660098429a2a082a575c8bb4eb8b43441878dd82",
      "new_mode": 33188,
      "new_path": "gcc/config/i386/i386.md"
    },
    {
      "type": "modify",
      "old_id": "48341cedcd4b91284b9d972cca0d81eb1d66e5cd",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/gcc.target/i386/stack-check-11.c",
      "new_id": "aaf11cba6127fc01b7b36ce2a58a10853492eeee",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/i386/stack-check-11.c"
    },
    {
      "type": "modify",
      "old_id": "a0aab4a982386a7855e535931372cb9df6e6b7d8",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/gcc.target/i386/stack-check-18.c",
      "new_id": "19564fe0f94fe15ae8ff7bfbf4cab241d0cb427a",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/i386/stack-check-18.c"
    },
    {
      "type": "modify",
      "old_id": "94c75dcb47ce42af506d97a1cfb7ee9c5b001002",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/gcc.target/i386/stack-check-19.c",
      "new_id": "864cd7b16e9f5d15193e3e29c0f17839edf57ae7",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/i386/stack-check-19.c"
    }
  ]
}
