arm neon inline assembly输出操作数转换

时间:2016-07-10 18:40:31

标签: arm inline-assembly neon

我正在尝试以下代码:

"a:8:{s:11:\"use_own_api\";b:0;s:16:\"google_auth_code\";s:45:\"4/hLXqq9X7sX1sOY-K6MhpEZu6bc8fGGADKLnjlcWA-p4\";s:14:\"google_api_key\";s:39:\"AIzaSyAJjpxVYfZ0WQPZSPr72DOuKU3X-sXquqM\";s:16:\"google_client_id\";s:39:\"180054848980.apps.googleusercontent.com\";s:20:\"google_client_secret\";s:24:\"XtEhZR8lUdRnzx5zdH7KsUaY\";s:19:\"google_access_token\";s:215:\"{\"access_token\":\"ya29.Ci8YA6-Ar2eJC21YOxaZEAuWKWLLgTbq_R_-kjR9Acz4UBF92s0hQGCkSUJfh3BvuQ\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"1/zDGdHo4JTJ6o9TOoZyxnY6e89gUc2UJ6G4\",\"created\":1467867036}\";s:22:\"ga_active_web_property\";O:18:\"Google_Webproperty\":20:{s:9:\"accountId\";s:8:\"79991596\";s:18:\"\u0000*\u0000__childLinkType\";s:27:\"Google_WebpropertyChildLink\";s:22:\"\u0000*\u0000__childLinkDataType\";s:0:\"\";s:9:\"childLink\";O:27:\"Google_WebpropertyChildLink\":2:{s:4:\"href\";s:105:\"https://www.googleapis.com/analytics/v3/management/accounts/79991596/webproperties/UA-79991596-2/profiles\";s:4:\"type\";s:18:\"analytics#profiles\";}s:7:\"created\";s:24:\"2016-06-28T19:40:27.202Z\";s:2:\"id\";s:13:\"U"

但它会产生错误" EXC_BAD_ACCESS(代码= 1,地址= 0x0)"。

如果我将操作数类型更改为float,则错误消失:

glm::vec4 a;
asm volatile(
   "mov r1,#64 \t\n"
   "vld1.32 q4,[%[input]],r1 \n\t"
   :[input] "+r" (a.x))

为什么类型很重要?是否有可能将glm :: vec4转换为浮动?我尝试了很多不同的方法,但都没有工作。

0 个答案:

没有答案