{"action":"created","issue":{"url":"https://api.github.com/repos/yegord/snowman/issues/14","labels_url":"https://api.github.com/repos/yegord/snowman/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/yegord/snowman/issues/14/comments","events_url":"https://api.github.com/repos/yegord/snowman/issues/14/events","html_url":"https://github.com/yegord/snowman/issues/14","id":88442798,"number":14,"title":"Possible Add Mips architecture.","user":{"login":"techbliss","id":3592375,"avatar_url":"https://avatars.githubusercontent.com/u/3592375?v=3","gravatar_id":"","url":"https://api.github.com/users/techbliss","html_url":"https://github.com/techbliss","followers_url":"https://api.github.com/users/techbliss/followers","following_url":"https://api.github.com/users/techbliss/following{/other_user}","gists_url":"https://api.github.com/users/techbliss/gists{/gist_id}","starred_url":"https://api.github.com/users/techbliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techbliss/subscriptions","organizations_url":"https://api.github.com/users/techbliss/orgs","repos_url":"https://api.github.com/users/techbliss/repos","events_url":"https://api.github.com/users/techbliss/events{/privacy}","received_events_url":"https://api.github.com/users/techbliss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":192,"created_at":"2015-06-15T14:26:07Z","updated_at":"2015-07-20T22:23:19Z","closed_at":null,"body":"Hey Yegord.\r\n\r\nI see you switched to Capstone engine.\r\nSo Question is.\r\nYou think it would be possible to add MIPS architecture also to the decompiler,\r\nsince Capstone already have the architecture included in the capstone engine.\r\n\r\nhttps://github.com/aquynh/capstone/tree/master/arch/Mips\r\nOr would it be much work to add MIPS support.\r\nRegards"},"comment":{"url":"https://api.github.com/repos/yegord/snowman/issues/comments/123071389","html_url":"https://github.com/yegord/snowman/issues/14#issuecomment-123071389","issue_url":"https://api.github.com/repos/yegord/snowman/issues/14","id":123071389,"user":{"login":"hlide","id":56785,"avatar_url":"https://avatars.githubusercontent.com/u/56785?v=3","gravatar_id":"","url":"https://api.github.com/users/hlide","html_url":"https://github.com/hlide","followers_url":"https://api.github.com/users/hlide/followers","following_url":"https://api.github.com/users/hlide/following{/other_user}","gists_url":"https://api.github.com/users/hlide/gists{/gist_id}","starred_url":"https://api.github.com/users/hlide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlide/subscriptions","organizations_url":"https://api.github.com/users/hlide/orgs","repos_url":"https://api.github.com/users/hlide/repos","events_url":"https://api.github.com/users/hlide/events{/privacy}","received_events_url":"https://api.github.com/users/hlide/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T22:23:19Z","updated_at":"2015-07-20T22:23:19Z","body":"Ok, no panic\r\n\r\njr rd ---> indirect jump\r\njr r31 == jr $ra ---> indirect jump. $RA is equivalent to LR for ARM\r\n\r\nwhen a function is not a leaf function, you need first to save *$ra* in the stack, because a *JAL target* inside a non-leaf function will overwrite *$ra*. In this case, the function save at *$sp + 0x30* but it could be at any offset as it only depends the stack frame of the function. The non-leaf function needs to restore *$ra* through *lw $ra, offset($sp)* before jumping to the caller place with *jr $ra*\r\n\r\nSince some functions like *BxxAL*, *JAL* implicitlyoverwrites *$ra*, you could be sure \"jr $ra\" is mostly like a \"return\". And for a non-leaf function, it is a pair *lw $ra, offset($sp)* and *jr $ra*."}}