{"action":"created","issue":{"url":"https://api.github.com/repos/bonzini/qboot/issues/4","labels_url":"https://api.github.com/repos/bonzini/qboot/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bonzini/qboot/issues/4/comments","events_url":"https://api.github.com/repos/bonzini/qboot/issues/4/events","html_url":"https://github.com/bonzini/qboot/issues/4","id":80279028,"number":4,"title":"inconsistent operand constraints in an 'asm'","user":{"login":"davedoesdev","id":2329683,"avatar_url":"https://avatars.githubusercontent.com/u/2329683?v=3","gravatar_id":"","url":"https://api.github.com/users/davedoesdev","html_url":"https://github.com/davedoesdev","followers_url":"https://api.github.com/users/davedoesdev/followers","following_url":"https://api.github.com/users/davedoesdev/following{/other_user}","gists_url":"https://api.github.com/users/davedoesdev/gists{/gist_id}","starred_url":"https://api.github.com/users/davedoesdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davedoesdev/subscriptions","organizations_url":"https://api.github.com/users/davedoesdev/orgs","repos_url":"https://api.github.com/users/davedoesdev/repos","events_url":"https://api.github.com/users/davedoesdev/events{/privacy}","received_events_url":"https://api.github.com/users/davedoesdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-24T21:42:33Z","updated_at":"2015-05-26T06:55:14Z","closed_at":null,"body":"I'm getting this error:\r\n\r\n```shell\r\ncc -O2 -g -MMD -MF .deps/cc-.-main.d -Wall -m32 -march=i386 -mregparm=3 -fno-stack-protector -fno-delete-null-pointer-checks -ffreestanding -Iinclude -c -s main.c -o main.o\r\nmain.c: In function 'main':\r\ninclude/ioport.h:11: error: inconsistent operand constraints in an 'asm'\r\ninclude/ioport.h:11: error: inconsistent operand constraints in an 'asm'\r\ninclude/ioport.h:11: error: inconsistent operand constraints in an 'asm'\r\nmake: *** [main.o] Error 1\r\n```\r\n\r\nI'm using GCC 4.2.1.\r\n"},"comment":{"url":"https://api.github.com/repos/bonzini/qboot/issues/comments/105419227","html_url":"https://github.com/bonzini/qboot/issues/4#issuecomment-105419227","issue_url":"https://api.github.com/repos/bonzini/qboot/issues/4","id":105419227,"user":{"login":"davedoesdev","id":2329683,"avatar_url":"https://avatars.githubusercontent.com/u/2329683?v=3","gravatar_id":"","url":"https://api.github.com/users/davedoesdev","html_url":"https://github.com/davedoesdev","followers_url":"https://api.github.com/users/davedoesdev/followers","following_url":"https://api.github.com/users/davedoesdev/following{/other_user}","gists_url":"https://api.github.com/users/davedoesdev/gists{/gist_id}","starred_url":"https://api.github.com/users/davedoesdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davedoesdev/subscriptions","organizations_url":"https://api.github.com/users/davedoesdev/orgs","repos_url":"https://api.github.com/users/davedoesdev/repos","events_url":"https://api.github.com/users/davedoesdev/events{/privacy}","received_events_url":"https://api.github.com/users/davedoesdev/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T06:55:14Z","updated_at":"2015-05-26T06:55:14Z","body":"This fixes it but it seems a bit strange to me:\r\n\r\n```diff\r\n--- include/ioport.h.orig\r\n+++ include/ioport.h\r\n@@ -8,7 +8,7 @@\r\n \r\n static inline void insb(void *buf, unsigned short port, int len)\r\n {\r\n-\tasm volatile(\"rep insb %3, %%es:(%0)\" : \"+D\" (buf), \"+c\" (len), \"=m\"(buf) : \"Nd\"(port), \"0\" (buf), \"1\" (len));\r\n+\tasm volatile(\"rep insb %3, %%es:(%0)\" : \"+D\" (buf), \"=c\" (len), \"=m\"(buf) : \"Nd\"(port), \"c\" (len), \"0\" (buf), \"1\" (len));\r\n }\r\n \r\n static inline unsigned char inb(unsigned short port)\r\n```\r\n\r\nAlso, does it need a `\"memory\"` constraint?"}}