)]}'
{
  "commit": "b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a",
  "tree": "9659339c01d49ca9ddc5452cbc32274b880439c5",
  "parents": [
    "b30049f188bac3b06c26a7f44821c63622ba3a24"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Thu Jul 22 21:53:26 2021 +0930"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Wed Jul 28 11:45:18 2021 +0930"
  },
  "message": "PowerPC: ignore sticky options for .machine\n\nPowerPC gas and objdump for a long time have allowed certain -m/-M\noptions that extend a base cpu with extra functional units to be\nspecified before the base cpu.  For example, \"-maltivec -mpower4\" is\nthe same as \"-mpower4 -maltivec\".  See\nhttps://sourceware.org/pipermail/binutils/2008-January/054935.html\n\nIt doesn\u0027t make as much sense that .machine keep any of these\n\"sticky\" flags when handling a new base cpu.  See gcc PR101393.  I\nthink that instead .machine ought to override the command line.\nThat\u0027s what this patch does.  It is still possible to extend cpu\nfunctionality with .machine.  For example the following can be\nassembled when selecting a basic -mppc on the command line:\n\t.machine power5\n\t.machine altivec\n\tfrin 1,2\n\tlvsr 3,4,5\nHere, \".machine altivec\" extends the \".machine power5\" so that both\nthe power5 \"frin\" instruction and the altivec \"lvsr\" instruction are\nenabled.  Swapping the two \".machine\" directives would result in\nfailure to assemble \"lvsr\".\n\nThis change will expose some assembly errors, such as the one in\nglibc/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c, a file\ncompiled with -maltivec but containing\n  asm volatile (\".machine push;\\n\"\n\t\t\".machine \\\"power5\\\";\\n\"\n\t\t\"vspltisb %0,0;\\n\"\n\t\t\"vspltisb %1,-1;\\n\"\n\t\t\"vpkuwus %0,%0,%1;\\n\"\n\t\t\"mfvscr %0;\\n\"\n\t\t\"stvx %0,0,%2;\\n\"\n\t\t\".machine pop;\"\n\t\t: \"\u003dv\" (v0), \"\u003dv\" (v1)\n\t\t: \"r\" (vscr_ptr)\n\t\t: \"memory\");\nIt\u0027s just wrong to choose power5 for a bunch of altivec instructions\nand in fact all of those .machine directives are unnecessary.\n\n\t* config/tc-ppc.c (ppc_machine): Don\u0027t use command line\n\tsticky options.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3eaeb892387422300b61c4a63aeb527258392070",
      "old_mode": 33188,
      "old_path": "gas/config/tc-ppc.c",
      "new_id": "6eeb98c57449605878ca3e95c7d8c7b62221cddb",
      "new_mode": 33188,
      "new_path": "gas/config/tc-ppc.c"
    }
  ]
}
