{"action":"opened","issue":{"url":"https://api.github.com/repos/arm10c/linux-stable/issues/37","repository_url":"https://api.github.com/repos/arm10c/linux-stable","labels_url":"https://api.github.com/repos/arm10c/linux-stable/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/arm10c/linux-stable/issues/37/comments","events_url":"https://api.github.com/repos/arm10c/linux-stable/issues/37/events","html_url":"https://github.com/arm10c/linux-stable/issues/37","id":145392597,"number":37,"title":"ARM의 주소지정방식 중 IA-DB, FD-EA가 의미하는 것은?","user":{"login":"libertyjin","id":4760134,"avatar_url":"https://avatars.githubusercontent.com/u/4760134?v=3","gravatar_id":"","url":"https://api.github.com/users/libertyjin","html_url":"https://github.com/libertyjin","followers_url":"https://api.github.com/users/libertyjin/followers","following_url":"https://api.github.com/users/libertyjin/following{/other_user}","gists_url":"https://api.github.com/users/libertyjin/gists{/gist_id}","starred_url":"https://api.github.com/users/libertyjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libertyjin/subscriptions","organizations_url":"https://api.github.com/users/libertyjin/orgs","repos_url":"https://api.github.com/users/libertyjin/repos","events_url":"https://api.github.com/users/libertyjin/events{/privacy}","received_events_url":"https://api.github.com/users/libertyjin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-02T16:38:13Z","updated_at":"2016-04-02T16:38:13Z","closed_at":null,"body":"**Reference:** [004_linux-kernel_20130518.md] (https://github.com/arm10c/linux-stable/blob/master/Reference/Breakdown/004_linux-kernel_20130518.md)\r\n\r\n여러개의 데이타를 load store 하는 명령어인 ldm, stm 과 조합하여 사용합니다. \r\nstack에 저장할 때 특히 신경써야 할 부분입니다. ARM 에서는 기본적으로 Full-Descending 스택 정책을 사용합니다. 따라서 스택에 저장할 때는 먼저 스택포인터를 줄이고, 그 다음에 저장을 합니다. \r\n스택에서 읽을 때는 반대로 먼저 읽고 스택포인터를 증가시킵니다. (그렇게 약속이 되어있습니다) \r\n\r\n이때 사용하는 명령어 짝이 stmdb (store multiple decrease before), ldmia (load multiple increase after) 입니다. 다른 방법으로는 stmfd, ldmfd 를 사용해도 컴파일러가 알아서 stmdb, ldmia로 바꾸어 컴파일해줍니다. \r\n마찬가지로 push, pop을 쓰면 알아서 FD 스택이라고 가정하고 컴파일 해줍니다. Empty, Ascending/Descending, Increase/Decrease, Before/After는 아래를 통해 이해.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4760134/14227620/b6b13cfc-f93c-11e5-9f6b-fec006732ee3.png)\r\n\r\n※ 동일 명령어 \r\n:LDMDA = LDMFA \r\n:LDMDB = LDMEA \r\n:LDMIA = LDMFD = LDM = POP \r\n:LDMIB = LDMED :STMDA = STMED\r\n:STMDB = STMFD = PUSH\r\n:STMIA = STMEA = STM \r\n:STMIB = STMFA"}}