{"action":"closed","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/1556","labels_url":"https://api.github.com/repos/micropython/micropython/issues/1556/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1556/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/1556/events","html_url":"https://github.com/micropython/micropython/issues/1556","id":114235325,"number":1556,"title":"Error in inline assembler documentation","user":{"login":"peterhinch","id":8437477,"avatar_url":"https://avatars.githubusercontent.com/u/8437477?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhinch","html_url":"https://github.com/peterhinch","followers_url":"https://api.github.com/users/peterhinch/followers","following_url":"https://api.github.com/users/peterhinch/following{/other_user}","gists_url":"https://api.github.com/users/peterhinch/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhinch/subscriptions","organizations_url":"https://api.github.com/users/peterhinch/orgs","repos_url":"https://api.github.com/users/peterhinch/repos","events_url":"https://api.github.com/users/peterhinch/events{/privacy}","received_events_url":"https://api.github.com/users/peterhinch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-30T09:50:46Z","updated_at":"2015-10-31T10:54:13Z","closed_at":"2015-10-31T10:54:13Z","body":"The documentation for the ``vldr`` and ``vstr`` instructions is incorrect: offsets are measured in 32 bit words, not bytes.\r\n\r\nThis came up in review: the manual clearly states that offsets are in bytes and I \"corrected\" the text accordingly. Alas this seems to be a typo in the manual (not the first). This seems definitive:\r\n```python\r\nfrom array import array\r\ntest = array('i',(0x12345678, 0x33333333, 0x7654321))\r\n@micropython.asm_thumb\r\ndef bar(r0):\r\n    vldr(s0, [r0, 1])\r\n    vmov(r0, s0)\r\n\r\n@micropython.asm_thumb\r\ndef foo(r0):\r\n    vldr(s0, [r0, 2])\r\n    vmov(r0, s0)\r\n\r\nprint(hex(bar(test)))\r\nprint(hex(foo(test)))\r\n```\r\nThe outcome:\r\n```\r\nMicroPython v1.4.6-117-gee9b02f-dirty on 2015-10-16; PYBv1.0 with STM32F405RG\r\nType \"help()\" for more information.\r\n>>> \r\n>>> import rats5\r\n0x33333333\r\n0x7654321\r\n>>> \r\n```\r\nWe're emitting the offset verbatim in ``emitinlinethumb.c`` so the error is in the manual."}}