)]}'
{
  "commit": "ade87b8e6293f146f754629101cf4e367aec5da9",
  "tree": "68a6dcbf86bc2ac321cb67b73af2efead4f14a1f",
  "parents": [
    "759b09f492d764edfba15c49d12a6f8adfeda019"
  ],
  "author": {
    "name": "Andrew Oates",
    "email": "andrew@andrewoates.com",
    "time": "Mon Feb 24 15:36:54 2025 +0800"
  },
  "committer": {
    "name": "Nelson Chu",
    "email": "nelson@rivosinc.com",
    "time": "Mon Mar 03 11:25:43 2025 +0800"
  },
  "message": "RISC-V: Re-define mapping symbol $x to the file elf architecture attribute\n\nThe mapping symbol \"$x\" without an ISA string \"means using ISA\nconfiguration from ELF attribute.\"[1].  Currently the code does not\nreset the subset_list.  This means that a previous mapping symbol that\noverrides the ISA string will continue to be used, rather than the\ndefault string set in the ELF file\u0027s .riscv.attributes section.  This\ncan cause incorrect or failed instruction decodings.\n\nIn practice, this causes problems when disassembling code generated by\nLLVM, which (unlike gas) does not emit explicit mapping symbols at the\nstart of each section.\n\nThis change stores the default architecture string seen at the beginning\nof disassembly in the global parse data struct, and restores that to\nsubset_list whenever a bare \"$x\" symbol is seen.\n\n[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#mapping-symbol\n\nBefore this patch, the mapping-x.s was dumped as,\n\n00000000 \u003c.text\u003e:\n   0:\t00000013          \tnop\n   4:\t0001                \t.insn\t2, 0x0001\n   6:\t0001                \t.insn\t2, 0x0001\n\nWhich is caused by the definiation of $x was conflict with the psABI.\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ccf9ef762e760ed0860f4ff1ad16a6d1ddad6304",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/riscv/mapping-x.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f17cf2295ca7c595b35e8bd9f54f39bbbd936e40",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/riscv/mapping-x.s"
    },
    {
      "type": "modify",
      "old_id": "9a6349931e79d1d919a28914d9d8e9b57ae7700c",
      "old_mode": 33188,
      "old_path": "opcodes/riscv-dis.c",
      "new_id": "c5e93620b7d36aff26178fd65fac2ffe9d24d8f0",
      "new_mode": 33188,
      "new_path": "opcodes/riscv-dis.c"
    }
  ]
}
