{"action":"created","issue":{"url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/162","repository_url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain","labels_url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/162/comments","events_url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/162/events","html_url":"https://github.com/riscv/riscv-gnu-toolchain/issues/162","id":165104430,"number":162,"title":"spike execution of 32-bit newlib program doesn't terminate","user":{"login":"pmundkur","id":103736,"avatar_url":"https://avatars.githubusercontent.com/u/103736?v=3","gravatar_id":"","url":"https://api.github.com/users/pmundkur","html_url":"https://github.com/pmundkur","followers_url":"https://api.github.com/users/pmundkur/followers","following_url":"https://api.github.com/users/pmundkur/following{/other_user}","gists_url":"https://api.github.com/users/pmundkur/gists{/gist_id}","starred_url":"https://api.github.com/users/pmundkur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmundkur/subscriptions","organizations_url":"https://api.github.com/users/pmundkur/orgs","repos_url":"https://api.github.com/users/pmundkur/repos","events_url":"https://api.github.com/users/pmundkur/events{/privacy}","received_events_url":"https://api.github.com/users/pmundkur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-12T15:08:24Z","updated_at":"2016-07-12T16:50:36Z","closed_at":null,"body":"I'm trying to build 32-bit exes via compilation to assembly with a\r\nrecent toolchain repo using the master branch.  I'm using the newlib toolchain, compiled with\r\n--enable-multilib.\r\n\r\n$ riscv64-unknown-elf-gcc --version\r\nriscv64-unknown-elf-gcc (GCC) 6.1.0\r\n$ riscv64-unknown-elf-gcc -m32 -S -o switch-gcc64-m32.s switch.c\r\n$ riscv64-unknown-elf-gcc -m32 -c -o switch-gcc64-m32.o switch-gcc64-m32.s\r\n$ riscv64-unknown-elf-gcc -m32 -o rv64-m32.exe switch-gcc64-m32.o\r\n$ file rv64-m32.exe\r\nrv64-m32.exe: ELF 32-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, not stripped\r\n$ spike --isa=RV32 pk rv64-m32.exe\r\n(does not terminate)\r\n\r\nFor sanity checking, I tried a 64-bit exe, which works:\r\n\r\n$ riscv64-unknown-elf-gcc -S -o switch-gcc64-m64.s switch.c\r\n$ riscv64-unknown-elf-gcc -c -o switch-gcc64-m64.o switch-gcc64-m64.s\r\n$ riscv64-unknown-elf-gcc -o rv64-m64.exe switch-gcc64-m64.o\r\n$ spike pk rv64-m64.exe\r\n(terminates after approx 370K instructions)\r\n"},"comment":{"url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/comments/232106986","html_url":"https://github.com/riscv/riscv-gnu-toolchain/issues/162#issuecomment-232106986","issue_url":"https://api.github.com/repos/riscv/riscv-gnu-toolchain/issues/162","id":232106986,"user":{"login":"aswaterman","id":1031106,"avatar_url":"https://avatars.githubusercontent.com/u/1031106?v=3","gravatar_id":"","url":"https://api.github.com/users/aswaterman","html_url":"https://github.com/aswaterman","followers_url":"https://api.github.com/users/aswaterman/followers","following_url":"https://api.github.com/users/aswaterman/following{/other_user}","gists_url":"https://api.github.com/users/aswaterman/gists{/gist_id}","starred_url":"https://api.github.com/users/aswaterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aswaterman/subscriptions","organizations_url":"https://api.github.com/users/aswaterman/orgs","repos_url":"https://api.github.com/users/aswaterman/repos","events_url":"https://api.github.com/users/aswaterman/events{/privacy}","received_events_url":"https://api.github.com/users/aswaterman/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T16:50:36Z","updated_at":"2016-07-12T16:50:36Z","body":"Did you build a 32-bit pk?"}}
{"actor":{"display_login":"aswaterman"}}