{"id":106207,"date":"2026-09-16T21:48:33","date_gmt":"2026-09-16T13:48:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/106207.html"},"modified":"2026-09-16T21:48:33","modified_gmt":"2026-09-16T13:48:33","slug":"%e3%80%90arm%e6%b1%87%e7%bc%96%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b002%e3%80%91%e6%9d%a1%e4%bb%b6%e6%a0%87%e5%bf%97%e4%bd%8d%e3%80%81%e6%a0%88%e6%9c%ba%e5%88%b6%e4%b8%8e%e5%87%bd%e6%95%b0%e8%b0%83","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/106207.html","title":{"rendered":"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u4e00\u3001CPSR \u6761\u4ef6\u6807\u5fd7\u4f4d&#xff08;NZCV&#xff09;\u5f7b\u5e95\u641e\u61c2\n<ul>\n<li>1. \u56db\u4e2a\u6807\u5fd7\u4f4d\u7684\u5b9a\u4e49<\/li>\n<li>2. \u91cd\u70b9\u8fa8\u6790&#xff1a;C\u4f4d \u548c V\u4f4d \u5b8c\u5168\u72ec\u7acb<\/li>\n<li>3. \u96be\u70b9\u7a81\u7834&#xff1a;N\u4e0eV\u7684\u7ec4\u5408\u903b\u8f91<\/li>\n<li>4. \u5e38\u7528\u6761\u4ef6\u7801\u5bf9\u5e94\u8868<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u6761\u4ef6\u6307\u4ee4\u4e0e\u5faa\u73af\u7ed3\u6784\u5b9e\u73b0\n<ul>\n<li>1. while \u5faa\u73af&#xff08;\u5148\u5224\u65ad\u540e\u6267\u884c&#xff09;<\/li>\n<li>2. do-while \u5faa\u73af&#xff08;\u5148\u6267\u884c\u540e\u5224\u65ad&#xff09;<\/li>\n<li>3. \u4e24\u8005\u8f6c\u6362\u8981\u70b9<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u8df3\u8f6c\u6307\u4ee4\u4e09\u5144\u5f1f&#xff1a;b\u3001bl\u3001bx \u533a\u522b\n<ul>\n<li>\u5173\u952e&#xff1a;LR\u7684\u8fd4\u56de\u5730\u5740\u4ece\u54ea\u6765&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001ARM\u6808\u673a\u5236\u4e0e\u51fd\u6570\u73b0\u573a\u4fdd\u62a4\n<ul>\n<li>1. ARM\u9ed8\u8ba4\u6808\u7c7b\u578b&#xff1a;\u6ee1\u9012\u51cf\u6808&#xff08;FD&#xff09;<\/li>\n<li>2. \u538b\u6808\u4e0e\u5f39\u6808\u7684\u6267\u884c\u8fc7\u7a0b<\/li>\n<li>3. \u4ec0\u4e48\u65f6\u5019\u5fc5\u987b\u538b\u6808&#xff1f;<\/li>\n<li>4. \u8e29\u5751\u8bb0\u5f55&#xff1a;\u5b50\u51fd\u6570\u5bc4\u5b58\u5668\u8986\u76d6bug<\/li>\n<\/ul>\n<\/li>\n<li>\u4e94\u300112\u4f4d\u7acb\u5373\u6570\u7684\u5408\u6cd5\u6027\u5224\u65ad\n<ul>\n<li>1. \u4ec0\u4e48\u662f\u7acb\u5373\u6570<\/li>\n<li>2. \u5408\u6cd5\u6027\u5224\u65ad\u89c4\u5219<\/li>\n<li>3. \u793a\u4f8b<\/li>\n<\/ul>\n<\/li>\n<li>\u516d\u3001\u6c47\u7f16\u4e0eC\u8bed\u8a00\u4e92\u8c03\u57fa\u7840\n<ul>\n<li>1. \u53c2\u6570\u4e0e\u8fd4\u56de\u503c\u7ea6\u5b9a<\/li>\n<li>2. \u6c47\u7f16\u8c03\u7528C\u51fd\u6570<\/li>\n<li>3. C\u8c03\u7528\u6c47\u7f16\u51fd\u6570<\/li>\n<\/ul>\n<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<hr \/>\n<h2><\/h2>\n<h3>\u00a0\u524d\u8a00<\/h3>\n<p>\u7ee7\u7b2c\u4e00\u5929\u5b66\u4e60\u4e86ARM\u6c47\u7f16\u57fa\u7840\u6307\u4ee4\u3001\u6bb5\u4f2a\u64cd\u4f5c\u548c\u57fa\u672c\u6570\u636e\u5904\u7406\u540e&#xff0c;\u7b2c\u4e8c\u5929\u7684\u5b66\u4e60\u6838\u5fc3\u56f4\u7ed5 CPSR\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6761\u4ef6\u6307\u4ee4\u3001\u5faa\u73af\u5b9e\u73b0\u3001\u6808\u64cd\u4f5c\u3001\u51fd\u6570\u8c03\u7528\u89c4\u8303 \u5c55\u5f00&#xff0c;\u540c\u65f6\u8e29\u4e86\u5bc4\u5b58\u5668\u8986\u76d6\u7684\u7ecf\u5178\u5751&#xff0c;\u5f7b\u5e95\u641e\u61c2\u4e86\u6ee1\u9012\u51cf\u6808\u7684\u5de5\u4f5c\u903b\u8f91\u3002\u672c\u6587\u68b3\u7406\u5f53\u5929\u6240\u6709\u6838\u5fc3\u77e5\u8bc6\u70b9&#xff0c;\u7ed3\u5408\u4ee3\u7801\u5b9e\u4f8b\u548c\u8e29\u5751\u8bb0\u5f55&#xff0c;\u628aNZCV\u6807\u5fd7\u4f4d\u3001b\/bl\/bx\u533a\u522b\u3001\u6808\u7c7b\u578b\u3001\u51fd\u6570\u538b\u6808\u5f39\u6808\u8fd9\u4e9b\u91cd\u70b9\u4e00\u6b21\u6027\u8bb2\u900f\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001CPSR \u6761\u4ef6\u6807\u5fd7\u4f4d&#xff08;NZCV&#xff09;\u5f7b\u5e95\u641e\u61c2<\/h3>\n<p>CPSR&#xff08;\u7a0b\u5e8f\u72b6\u6001\u5bc4\u5b58\u5668&#xff09;\u4e2d\u76844\u4e2a\u6761\u4ef6\u6807\u5fd7\u4f4d&#xff0c;\u662f\u6240\u6709\u6761\u4ef6\u5206\u652f\u3001\u6761\u4ef6\u6307\u4ee4\u7684\u5e95\u5c42\u4f9d\u636e&#xff0c;\u7531\u5e26S\u540e\u7f00\u7684\u8fd0\u7b97\u6307\u4ee4\u3001cmp\u6bd4\u8f83\u6307\u4ee4\u81ea\u52a8\u66f4\u65b0&#xff0c;\u666e\u901a\u6307\u4ee4\u4e0d\u4f1a\u4fee\u6539\u3002<\/p>\n<h4>1. \u56db\u4e2a\u6807\u5fd7\u4f4d\u7684\u5b9a\u4e49<\/h4>\n<table>\n<tr>\u6807\u5fd7\u4f4d\u5168\u79f0\u7f6e1\u6761\u4ef6\u672c\u8d28\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>N<\/td>\n<td>Negative&#xff08;\u8d1f\u6807\u5fd7&#xff09;<\/td>\n<td>\u8fd0\u7b97\u7ed3\u679c\u7684\u6700\u9ad8\u4f4d&#xff08;bit31&#xff09;\u4e3a1<\/td>\n<td>\u7ed3\u679c\u7684\u7b26\u53f7\u4f4d&#xff0c;\u6709\u7b26\u53f7\u89c6\u89d2\u4e0b1\u4ee3\u8868\u8d1f<\/td>\n<\/tr>\n<tr>\n<td>Z<\/td>\n<td>Zero&#xff08;\u96f6\u6807\u5fd7&#xff09;<\/td>\n<td>\u8fd0\u7b97\u7ed3\u679c\u6240\u6709\u4f4d\u5168\u4e3a0<\/td>\n<td>\u4e24\u6570\u76f8\u7b49\u3001\u8ba1\u6570\u5f52\u96f6\u7684\u5224\u65ad\u4f9d\u636e<\/td>\n<\/tr>\n<tr>\n<td>C<\/td>\n<td>Carry&#xff08;\u8fdb\u4f4d\u6807\u5fd7&#xff09;<\/td>\n<td>\u65e0\u7b26\u53f7\u52a0\u6cd5\u4ea7\u751f\u7b2c33\u4f4d\u8fdb\u4f4d&#xff1b;\u65e0\u7b26\u53f7\u51cf\u6cd5\u591f\u51cf&#xff08;\u65e0\u501f\u4f4d&#xff09;<\/td>\n<td>\u670d\u52a1\u4e8e\u65e0\u7b26\u53f7\u6570&#xff0c;\u5224\u65ad\u662f\u5426\u8d85\u51fa32\u4f4d\u5bb9\u5668<\/td>\n<\/tr>\n<tr>\n<td>V<\/td>\n<td>Overflow&#xff08;\u6ea2\u51fa\u6807\u5fd7&#xff09;<\/td>\n<td>\u6709\u7b26\u53f7\u6b63\u6570\u52a0\u6b63\u6570\u53d8\u8d1f\u3001\u8d1f\u6570\u52a0\u8d1f\u6570\u53d8\u6b63<\/td>\n<td>\u670d\u52a1\u4e8e\u6709\u7b26\u53f7\u6570&#xff0c;\u5224\u65ad\u7b26\u53f7\u903b\u8f91\u662f\u5426\u6b63\u786e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2. \u91cd\u70b9\u8fa8\u6790&#xff1a;C\u4f4d \u548c V\u4f4d \u5b8c\u5168\u72ec\u7acb<\/h4>\n<p>\u8fd9\u662f\u6700\u5bb9\u6613\u6df7\u6dc6\u7684\u70b9&#xff0c;\u4e24\u8005\u670d\u52a1\u4e8e\u4e0d\u540c\u7684\u6570\u503c\u89e3\u8bfb\u89c6\u89d2&#xff0c;\u6ca1\u6709\u5fc5\u7136\u8054\u7cfb&#xff1a;<\/p>\n<ul>\n<li>C\u4f4d &#061; \u65e0\u7b26\u53f7\u89c6\u89d2\u7684\u6ea2\u51fa&#xff1a;\u53ea\u770b\u6709\u6ca1\u6709\u8fdb\u4f4d\u5230\u7b2c33\u4f4d&#xff0c;\u4e0d\u5173\u5fc3\u7b26\u53f7<\/li>\n<li>V\u4f4d &#061; \u6709\u7b26\u53f7\u89c6\u89d2\u7684\u6ea2\u51fa&#xff1a;\u53ea\u770b\u7b26\u53f7\u903b\u8f91\u5bf9\u4e0d\u5bf9&#xff0c;\u4e0d\u5173\u5fc3\u7b2c33\u4f4d<\/li>\n<\/ul>\n<p>\u7ecf\u5178\u5bf9\u6bd4\u6848\u4f8b&#xff1a;\u6267\u884c 0x7FFFFFFF &#043; 1<\/p>\n<ul>\n<li>\u65e0\u7b26\u53f7\u89c6\u89d2&#xff1a;\u7ed3\u679c\u4e3a0x80000000&#xff0c;\u4ecd\u572832\u4f4d\u5185&#xff0c;\u65e0\u8fdb\u4f4d \u2192 C&#061;0<\/li>\n<li>\u6709\u7b26\u53f7\u89c6\u89d2&#xff1a;\u6700\u5927\u6b63\u6570\u52a01\u53d8\u6210\u4e86\u8d1f\u6570&#xff0c;\u7b26\u53f7\u903b\u8f91\u9519\u8bef \u2192 V&#061;1<\/li>\n<\/ul>\n<h4>3. \u96be\u70b9\u7a81\u7834&#xff1a;N\u4e0eV\u7684\u7ec4\u5408\u903b\u8f91<\/h4>\n<p>\u4e3a\u4ec0\u4e48\u6709\u7b26\u53f7\u201c\u5927\u4e8e\u201d\u7684\u6761\u4ef6\u662f Z&#061;&#061;0 \u4e14 N&#061;&#061;V&#xff1f; \u6838\u5fc3\u539f\u56e0&#xff1a;\u5f53\u6709\u7b26\u53f7\u8fd0\u7b97\u6ea2\u51fa\u65f6&#xff0c;\u7ed3\u679c\u7684\u7b26\u53f7\u4f4dN\u4f1a\u53cd\u8f6c&#xff0c;\u5fc5\u987b\u7ed3\u5408V\u4f4d\u624d\u80fd\u8fd8\u539f\u771f\u5b9e\u6b63\u8d1f\u6027\u3002<\/p>\n<p>\u5206\u4e24\u79cd\u60c5\u51b5\u9a8c\u8bc1\u89c4\u5f8b&#xff1a;<\/p>\n<ul>\n<li>\u65e0\u6ea2\u51fa&#xff08;V&#061;0&#xff09;&#xff1a;N\u5c31\u662f\u771f\u5b9e\u7b26\u53f7\u3002\u7ed3\u679c\u4e3a\u6b63\u5219N&#061;0&#xff0c;\u6ee1\u8db3N&#061;&#061;V&#xff1b;\u7ed3\u679c\u4e3a\u8d1f\u5219N&#061;1&#xff0c;\u6ee1\u8db3N\u2260V<\/li>\n<li>\u6709\u6ea2\u51fa&#xff08;V&#061;1&#xff09;&#xff1a;N\u4e0e\u771f\u5b9e\u7b26\u53f7\u76f8\u53cd\u3002\u771f\u5b9e\u7ed3\u679c\u4e3a\u6b63\u5219N&#061;1&#xff0c;\u4ecd\u6ee1\u8db3N&#061;&#061;V&#xff1b;\u771f\u5b9e\u7ed3\u679c\u4e3a\u8d1f\u5219N&#061;0&#xff0c;\u4ecd\u6ee1\u8db3N\u2260V<\/li>\n<\/ul>\n<p>\u6700\u7ec8\u5f97\u51fa\u4e07\u80fd\u7ed3\u8bba&#xff1a; \u2705 N &#061;&#061; V \u2192 \u771f\u5b9e\u7ed3\u679c\u4e3a\u6b63 \u2192 \u524d\u8005\u5927\u4e8e\u540e\u8005 \u274c N !&#061; V \u2192 \u771f\u5b9e\u7ed3\u679c\u4e3a\u8d1f \u2192 \u524d\u8005\u5c0f\u4e8e\u540e\u8005<\/p>\n<h4>4. \u5e38\u7528\u6761\u4ef6\u7801\u5bf9\u5e94\u8868<\/h4>\n<table>\n<tr>\u6761\u4ef6\u7801\u542b\u4e49&#xff08;\u6709\u7b26\u53f7&#xff09;\u89e6\u53d1\u6761\u4ef6<\/tr>\n<tbody>\n<tr>\n<td>EQ<\/td>\n<td>\u7b49\u4e8e<\/td>\n<td>Z &#061;&#061; 1<\/td>\n<\/tr>\n<tr>\n<td>NE<\/td>\n<td>\u4e0d\u7b49\u4e8e<\/td>\n<td>Z &#061;&#061; 0<\/td>\n<\/tr>\n<tr>\n<td>GT<\/td>\n<td>\u5927\u4e8e<\/td>\n<td>Z&#061;&#061;0 \u4e14 N&#061;&#061;V<\/td>\n<\/tr>\n<tr>\n<td>LE<\/td>\n<td>\u5c0f\u4e8e\u7b49\u4e8e<\/td>\n<td>Z&#061;&#061;1 \u6216 N\u2260V<\/td>\n<\/tr>\n<tr>\n<td>GE<\/td>\n<td>\u5927\u4e8e\u7b49\u4e8e<\/td>\n<td>N &#061;&#061; V<\/td>\n<\/tr>\n<tr>\n<td>LT<\/td>\n<td>\u5c0f\u4e8e<\/td>\n<td>N !&#061; V<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u4e8c\u3001\u6761\u4ef6\u6307\u4ee4\u4e0e\u5faa\u73af\u7ed3\u6784\u5b9e\u73b0<\/h3>\n<p>\u501f\u52a9\u6761\u4ef6\u6807\u5fd7\u4f4d\u548c\u6761\u4ef6\u8df3\u8f6c\u6307\u4ee4&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u5728\u6c47\u7f16\u4e2d\u5b9e\u73b0C\u8bed\u8a00\u7684\u5faa\u73af\u7ed3\u6784&#xff0c;\u6838\u5fc3\u662f\u628a\u63e1\u5faa\u73af\u4e09\u8981\u7d20&#xff1a;\u5faa\u73af\u4f53\u3001\u7ec8\u6b62\u6761\u4ef6\u3001\u8d8b\u5411\u7ec8\u7ed3\u7684\u8bed\u53e5\u3002<\/p>\n<h4>1. while \u5faa\u73af&#xff08;\u5148\u5224\u65ad\u540e\u6267\u884c&#xff09;<\/h4>\n<p>\u6838\u5fc3\u903b\u8f91&#xff1a;\u5faa\u73af\u5f00\u5934\u5148\u5224\u65ad\u6761\u4ef6&#xff0c;\u4e0d\u6ee1\u8db3\u5219\u76f4\u63a5\u8df3\u51fa&#xff0c;\u96f6\u6b21\u6216\u591a\u6b21\u6267\u884c\u3002<\/p>\n<p>; C\u8bed\u8a00\u903b\u8f91&#xff1a;while(i &lt;&#061; 100) { sum &#043;&#061; i; i&#043;&#043;; }<br \/>\nmov r0, #0      ; i &#061; 0<br \/>\nmov r1, #0      ; sum &#061; 0<\/p>\n<p>loop<br \/>\n    cmp r0, #100   ; \u5148\u5224\u65ad&#xff1a;i \u548c 100 \u6bd4\u8f83<br \/>\n    bgt finish     ; \u5927\u4e8e\u5219\u8df3\u51fa\u5faa\u73af<br \/>\n    add r1, r1, r0 ; \u5faa\u73af\u4f53&#xff1a;sum &#043;&#061; i<br \/>\n    add r0, r0, #1 ; i&#043;&#043;<br \/>\n    b loop         ; \u8df3\u56de\u5f00\u5934\u4e0b\u6b21\u5224\u65ad<\/p>\n<p>finish<br \/>\n    b finish<\/p>\n<h4>2. do-while \u5faa\u73af&#xff08;\u5148\u6267\u884c\u540e\u5224\u65ad&#xff09;<\/h4>\n<p>\u6838\u5fc3\u903b\u8f91&#xff1a;\u5148\u65e0\u6761\u4ef6\u6267\u884c\u4e00\u6b21\u5faa\u73af\u4f53&#xff0c;\u7ed3\u5c3e\u518d\u5224\u65ad\u6761\u4ef6&#xff0c;\u81f3\u5c11\u6267\u884c\u4e00\u6b21\u3002<\/p>\n<p>; C\u8bed\u8a00\u903b\u8f91&#xff1a;do { sum &#043;&#061; i; i&#043;&#043;; } while(i &lt;&#061; 100);<br \/>\nmov r0, #0<br \/>\nmov r1, #0<\/p>\n<p>loop<br \/>\n    add r1, r1, r0 ; \u5148\u6267\u884c\u5faa\u73af\u4f53<br \/>\n    add r0, r0, #1 ; i&#043;&#043;<br \/>\n    cmp r0, #100   ; \u540e\u5224\u65ad\u6761\u4ef6<br \/>\n    ble loop       ; \u6ee1\u8db3\u5219\u8df3\u56de\u5faa\u73af\u5f00\u5934<\/p>\n<p>finish<br \/>\n    b finish<\/p>\n<h4>3. \u4e24\u8005\u8f6c\u6362\u8981\u70b9<\/h4>\n<p>\u628awhile\u6539\u6210do-while&#xff0c;\u53ea\u9700\u8981\u4e24\u6b65&#xff1a;<\/p>\n<li>\u5220\u9664\u5faa\u73af\u5f00\u5934\u7684\u5224\u65ad\u548c\u8df3\u51fa\u8bed\u53e5<\/li>\n<li>\u628a\u5224\u65ad&#043;\u6761\u4ef6\u8df3\u8f6c\u79fb\u5230\u5faa\u73af\u4f53\u672b\u5c3e&#xff0c;\u8df3\u8f6c\u76ee\u6807\u4e3a\u5faa\u73af\u5f00\u5934<\/li>\n<hr \/>\n<h3>\u4e09\u3001\u8df3\u8f6c\u6307\u4ee4\u4e09\u5144\u5f1f&#xff1a;b\u3001bl\u3001bx \u533a\u522b<\/h3>\n<p>\u4e09\u8005\u90fd\u80fd\u4fee\u6539PC\u5b9e\u73b0\u7a0b\u5e8f\u8df3\u8f6c&#xff0c;\u4f46\u786c\u4ef6\u884c\u4e3a\u548c\u4f7f\u7528\u573a\u666f\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<table>\n<tr>\u6307\u4ee4\u5168\u79f0\u6838\u5fc3\u786c\u4ef6\u884c\u4e3a\u4fdd\u5b58\u8fd4\u56de\u5730\u5740\u5207\u6362\u6307\u4ee4\u96c6\u5178\u578b\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>b<\/td>\n<td>Branch<\/td>\n<td>\u76f4\u63a5\u4fee\u6539PC\u8df3\u8f6c\u5230\u6807\u7b7e<\/td>\n<td>\u274c \u4e0d\u4fdd\u5b58<\/td>\n<td>\u274c \u4e0d\u5207\u6362<\/td>\n<td>\u5faa\u73af\u3001\u5206\u652f\u8df3\u8f6c\u3001\u6b7b\u5faa\u73af<\/td>\n<\/tr>\n<tr>\n<td>bl<\/td>\n<td>Branch with Link<\/td>\n<td>\u5148\u628a\u4e0b\u4e00\u6761\u6307\u4ee4\u5730\u5740\u5b58\u5165LR&#xff0c;\u518d\u8df3\u8f6c<\/td>\n<td>\u2705 \u81ea\u52a8\u5b58\u5165LR<\/td>\n<td>\u274c \u4e0d\u5207\u6362<\/td>\n<td>\u51fd\u6570\u8c03\u7528<\/td>\n<\/tr>\n<tr>\n<td>bx<\/td>\n<td>Branch and Exchange<\/td>\n<td>\u8df3\u8f6c\u5230\u5bc4\u5b58\u5668\u5b58\u7684\u5730\u5740&#xff0c;\u6839\u636e\u6700\u4f4e\u4f4d\u5207\u6362ARM\/Thumb\u72b6\u6001<\/td>\n<td>\u274c \u4e0d\u4fdd\u5b58<\/td>\n<td>\u2705 \u53ef\u5207\u6362<\/td>\n<td>\u51fd\u6570\u8fd4\u56de&#xff08;bx lr&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5173\u952e&#xff1a;LR\u7684\u8fd4\u56de\u5730\u5740\u4ece\u54ea\u6765&#xff1f;<\/h4>\n<p>\u5b8c\u5168\u662fbl\u6307\u4ee4\u7684\u786c\u4ef6\u81ea\u52a8\u884c\u4e3a&#xff0c;\u65e0\u9700\u8f6f\u4ef6\u8d4b\u503c&#xff1a;<\/p>\n<li>\u6267\u884cbl \u51fd\u6570\u540d\u65f6&#xff0c;CPU\u5148\u628abl\u4e0b\u4e00\u6761\u6307\u4ee4\u7684\u5730\u5740\u81ea\u52a8\u5199\u5165LR\u5bc4\u5b58\u5668<\/li>\n<li>\u518d\u8df3\u8f6c\u5230\u76ee\u6807\u51fd\u6570\u6267\u884c<\/li>\n<li>\u51fd\u6570\u7ed3\u5c3e\u6267\u884cbx lr&#xff0c;\u628aLR\u7684\u503c\u5199\u56dePC&#xff0c;\u7a0b\u5e8f\u5c31\u56de\u5230\u4e86\u8c03\u7528\u5904\u7ee7\u7eed\u6267\u884c<\/li>\n<hr \/>\n<h3>\u56db\u3001ARM\u6808\u673a\u5236\u4e0e\u51fd\u6570\u73b0\u573a\u4fdd\u62a4<\/h3>\n<h4>1. ARM\u9ed8\u8ba4\u6808\u7c7b\u578b&#xff1a;\u6ee1\u9012\u51cf\u6808&#xff08;FD&#xff09;<\/h4>\n<p>ARM\u67b6\u6784\u9075\u5faaATPCS\u89c4\u8303&#xff0c;\u9ed8\u8ba4\u91c7\u7528 \u6ee1\u9012\u51cf\u6808&#xff08;Full Descending&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u6ee1\u6808&#xff1a;SP\u6c38\u8fdc\u6307\u5411\u6808\u4e2d\u6700\u540e\u4e00\u4e2a\u5df2\u5b58\u5165\u7684\u6709\u6548\u6570\u636e<\/li>\n<li>\u9012\u51cf&#xff1a;\u6808\u5411\u4f4e\u5730\u5740\u65b9\u5411\u589e\u957f&#xff0c;\u538b\u6808\u65f6SP\u6570\u503c\u51cf\u5c0f<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u7b80\u5355\u8bb0\u5fc6&#xff1a;\u6808\u5e95\u5728\u9ad8\u5730\u5740&#xff0c;\u6808\u9876\u5411\u4f4e\u5730\u5740\u201c\u5411\u4e0b\u957f\u201d&#xff0c;SP\u6c38\u8fdc\u6307\u7740\u6808\u9876\u7684\u6709\u6548\u6570\u636e\u3002<\/p>\n<h4>2. \u538b\u6808\u4e0e\u5f39\u6808\u7684\u6267\u884c\u8fc7\u7a0b<\/h4>\n<p>\u4ee5 STMFD sp!, {r0, r1, lr} \u538b\u6808\u4e3a\u4f8b&#xff1a;<\/p>\n<li>SP\u4e00\u6b21\u6027\u51cf\u53bb\u603b\u5b57\u8282\u6570&#xff08;3\u4e2a\u5bc4\u5b58\u5668\u517112\u5b57\u8282&#xff09;<\/li>\n<li>\u6309\u5bc4\u5b58\u5668\u7f16\u53f7\u4ece\u5927\u5230\u5c0f&#xff0c;\u4f9d\u6b21\u5b58\u5165\u4ece\u9ad8\u5730\u5740\u5230\u4f4e\u5730\u5740\u7684\u5185\u5b58<\/li>\n<li>SP\u6700\u7ec8\u6307\u5411\u6700\u4f4e\u5730\u5740\u7684\u6709\u6548\u6570\u636e&#xff08;\u6808\u9876&#xff09;<\/li>\n<p>\u4ee5 LDMFD sp!, {r0, r1, lr} \u5f39\u6808\u4e3a\u4f8b&#xff1a;<\/p>\n<li>\u4eceSP\u6307\u5411\u7684\u4f4e\u5730\u5740&#xff08;\u6808\u9876&#xff09;\u5f00\u59cb&#xff0c;\u4f9d\u6b21\u5411\u9ad8\u5730\u5740\u8bfb\u53d6\u6570\u636e<\/li>\n<li>\u6309\u7f16\u53f7\u4ece\u5c0f\u5230\u5927\u5bf9\u5e94\u8d4b\u503c\u7ed9\u5bc4\u5b58\u5668\u5217\u8868<\/li>\n<li>\u8bfb\u5b8c\u540eSP\u4e00\u6b21\u6027\u52a0\u4e0a\u603b\u5b57\u8282\u6570&#xff0c;\u56de\u5230\u538b\u6808\u524d\u7684\u4f4d\u7f6e<\/li>\n<h4>3. \u4ec0\u4e48\u65f6\u5019\u5fc5\u987b\u538b\u6808&#xff1f;<\/h4>\n<p>\u6838\u5fc3\u539f\u5219&#xff1a;\u53ea\u8981\u51fd\u6570\u5185\u90e8\u4f1a\u4fee\u6539LR&#xff08;\u8c03\u7528\u4e86\u5176\u4ed6\u51fd\u6570&#xff09;&#xff0c;\u5c31\u5fc5\u987b\u538b\u6808\u4fdd\u5b58LR\u3002<\/p>\n<ul>\n<li>\u53f6\u5b50\u51fd\u6570&#xff08;\u5185\u90e8\u4e0d\u8c03\u7528\u5176\u4ed6\u51fd\u6570&#xff09;&#xff1a;\u4e0d\u4f1a\u4fee\u6539LR&#xff0c;\u65e0\u9700\u538b\u6808&#xff0c;\u76f4\u63a5bx lr\u8fd4\u56de<\/li>\n<li>\u5d4c\u5957\u8c03\u7528\u51fd\u6570&#xff1a;\u5185\u90e8\u6709bl\u6307\u4ee4&#xff0c;\u4f1a\u8986\u76d6LR\u7684\u503c&#xff0c;\u5fc5\u987b\u5165\u53e3\u538b\u6808\u3001\u51fa\u53e3\u5f39\u6808<\/li>\n<\/ul>\n<h4>4. \u8e29\u5751\u8bb0\u5f55&#xff1a;\u5b50\u51fd\u6570\u5bc4\u5b58\u5668\u8986\u76d6bug<\/h4>\n<h5>\u95ee\u9898\u73b0\u8c61<\/h5>\n<p>\u4e09\u6570\u6c42\u6700\u5927\u503c\u7a0b\u5e8f&#xff0c;\u6700\u7ec8\u7ed3\u679c\u4e3a0xC8&#xff08;200&#xff09;&#xff0c;\u800c\u975e\u9884\u671f\u7684300\u3002<\/p>\n<h5>\u6839\u672c\u539f\u56e0<\/h5>\n<p>\u4e24\u6570\u6c42\u6700\u5927\u503c\u51fd\u6570\u5185\u90e8&#xff0c;\u7528r2\u5f53\u4e34\u65f6\u53d8\u91cf\u5b58\u7ed3\u679c&#xff0c;\u76f4\u63a5\u8986\u76d6\u4e86\u4e3b\u51fd\u6570\u5b58\u5728r2\u91cc\u7684\u7b2c\u4e09\u4e2a\u6570300&#xff0c;\u5bfc\u81f4\u7b2c\u4e8c\u6b21\u6bd4\u8f83\u65f6\u7528200\u548c200\u6bd4\u3002<\/p>\n<p>; \u9519\u8bef\u5199\u6cd5&#xff1a;\u7528r2\u5f53\u4e34\u65f6\u53d8\u91cf&#xff0c;\u7834\u574f\u4e86\u5916\u90e8\u53c2\u6570<br \/>\nasm_twoNumMax<br \/>\n    cmp r0, r1<br \/>\n    movgt r2, r0<br \/>\n    movle r2, r1<br \/>\n    mov r0, r2<br \/>\n    bx lr<\/p>\n<h5>\u4fee\u6b63\u65b9\u6848&#xff08;\u4fdd\u7559MOVGT&#043;MOVLE&#xff09;<\/h5>\n<p>\u6539\u7528\u7a7a\u95f2\u7684r3\u5f53\u4e34\u65f6\u53d8\u91cf&#xff0c;\u5168\u7a0b\u4e0d\u78b0\u53c2\u6570\u5bc4\u5b58\u5668r2&#xff1a;<\/p>\n<p>; \u6b63\u786e\u5199\u6cd5&#xff1a;\u7528r3\u505a\u4e34\u65f6\u53d8\u91cf&#xff0c;\u4e0d\u7834\u574f\u5916\u90e8\u53c2\u6570<br \/>\nasm_twoNumMax<br \/>\n    cmp     r0, r1<br \/>\n    movgt   r3, r0          ; r0&gt;r1\u5219\u5b58r0<br \/>\n    movle   r3, r1          ; r0\u2264r1\u5219\u5b58r1<br \/>\n    mov     r0, r3          ; \u7ed3\u679c\u653e\u5165r0\u8fd4\u56de<br \/>\n    bx      lr              <\/p>\n<h5>\u5b8c\u6574\u4e09\u6570\u6c42\u6700\u5927\u503c\u4ee3\u7801<\/h5>\n<p>asm_threeNumMax<br \/>\n    stmfd   sp!, {lr}       ; \u5165\u53e3\u538b\u6808\u4fdd\u5b58\u8fd4\u56de\u5730\u5740<\/p>\n<p>    bl      asm_twoNumMax   ; \u6c42\u524d\u4e24\u4e2a\u6570\u6700\u5927\u503c&#xff0c;r2\u4fdd\u6301300\u4e0d\u53d8<br \/>\n    mov     r1, r2          ; \u7b2c\u4e09\u4e2a\u6570\u653e\u5165r1<br \/>\n    bl      asm_twoNumMax   ; \u6c42\u6700\u7ec8\u6700\u5927\u503c<\/p>\n<p>    ldmfd   sp!, {lr}       ; \u51fa\u53e3\u5f39\u6808\u6062\u590d\u8fd4\u56de\u5730\u5740<br \/>\n    bx      lr              <\/p>\n<hr \/>\n<h3>\u4e94\u300112\u4f4d\u7acb\u5373\u6570\u7684\u5408\u6cd5\u6027\u5224\u65ad<\/h3>\n<h4>1. \u4ec0\u4e48\u662f\u7acb\u5373\u6570<\/h4>\n<p>\u76f4\u63a5\u7f16\u7801\u5728\u6307\u4ee4\u4e2d\u7684\u5e38\u91cf&#xff0c;\u6267\u884c\u65f6\u76f4\u63a5\u4ece\u6307\u4ee4\u7801\u8bfb\u53d6&#xff0c;\u65e0\u9700\u8bbf\u95ee\u5bc4\u5b58\u5668\/\u5185\u5b58&#xff0c;\u6c47\u7f16\u4e2d\u4ee5#\u5f00\u5934\u3002\u4f18\u70b9\u662f\u901f\u5ea6\u5feb&#xff0c;\u7f3a\u70b9\u662f\u53d7\u6307\u4ee4\u957f\u5ea6\u9650\u5236&#xff0c;\u4e0d\u80fd\u8868\u793a\u4efb\u610f32\u4f4d\u6570\u3002<\/p>\n<h4>2. \u5408\u6cd5\u6027\u5224\u65ad\u89c4\u5219<\/h4>\n<p>ARM\u6570\u636e\u5904\u7406\u6307\u4ee4\u7684\u7acb\u5373\u6570\u4e3a12\u4f4d\u7f16\u7801&#xff0c;\u89c4\u5219&#xff1a;\u7531\u4e00\u4e2a8\u4f4d\u57fa\u6570&#xff0c;\u5faa\u73af\u53f3\u79fb\u5076\u6570\u4f4d&#xff08;0\/2\/4&#8230;30\u4f4d&#xff09;\u5f97\u5230\u3002 \u6362\u53e5\u8bdd\u8bf4&#xff1a;\u628a\u6570\u503c\u5c55\u5f00\u6210\u4e8c\u8fdb\u5236&#xff0c;\u4e00\u5b9a\u5b58\u5728\u4e00\u79cd\u5076\u6570\u4f4d\u7684\u5faa\u73af\u53f3\u79fb&#xff0c;\u4f7f\u5f97\u9ad824\u4f4d\u5168\u4e3a0&#xff0c;\u4f4e8\u4f4d\u662f\u6709\u6548\u57fa\u6570\u3002<\/p>\n<h4>3. \u793a\u4f8b<\/h4>\n<ul>\n<li>\u2705 \u5408\u6cd5&#xff1a;#0xFF\u3001#0xFF000000\u3001#0x0000FF00<\/li>\n<li>\u274c \u975e\u6cd5&#xff1a;#0xFFFFFFFF\u3001#0x12345678\u3001#0x101<\/li>\n<\/ul>\n<p>\u8d85\u8fc7\u5408\u6cd5\u8303\u56f4\u7684\u5927\u6570&#xff0c;\u9700\u8981\u7528ldr \u5bc4\u5b58\u5668, &#061;\u6570\u503c\u4f2a\u6307\u4ee4\u52a0\u8f7d&#xff0c;\u6c47\u7f16\u5668\u4f1a\u81ea\u52a8\u5b58\u5165\u5e38\u91cf\u6c60&#xff0c;\u901a\u8fc7\u8bbf\u5b58\u8bfb\u53d6\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u6c47\u7f16\u4e0eC\u8bed\u8a00\u4e92\u8c03\u57fa\u7840<\/h3>\n<h4>1. \u53c2\u6570\u4e0e\u8fd4\u56de\u503c\u7ea6\u5b9a<\/h4>\n<ul>\n<li>\u524d4\u4e2a\u53c2\u6570&#xff1a;\u4f9d\u6b21\u901a\u8fc7r0\u3001r1\u3001r2\u3001r3\u4f20\u9012<\/li>\n<li>\u8d85\u8fc74\u4e2a\u7684\u53c2\u6570&#xff1a;\u901a\u8fc7\u6808\u4f20\u9012<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;\u7edf\u4e00\u5b58\u653e\u5728r0\u4e2d<\/li>\n<\/ul>\n<h4>2. \u6c47\u7f16\u8c03\u7528C\u51fd\u6570<\/h4>\n<li>\u6c47\u7f16\u4e2d\u7528import \u51fd\u6570\u540d\u58f0\u660e\u5916\u90e8C\u51fd\u6570<\/li>\n<li>\u6309\u7ea6\u5b9a\u5728r0~r3\u653e\u597d\u53c2\u6570<\/li>\n<li>\u6267\u884cbl \u51fd\u6570\u540d\u8c03\u7528<\/li>\n<li>\u6ce8\u610f\u4fdd\u6301\u68088\u5b57\u8282\u5bf9\u9f50&#xff0c;\u53ef\u6dfb\u52a0preserve8\u4f2a\u6307\u4ee4\u89e3\u51b3\u5bf9\u9f50\u62a5\u9519<\/li>\n<h4>3. C\u8c03\u7528\u6c47\u7f16\u51fd\u6570<\/h4>\n<li>\u6c47\u7f16\u4e2d\u7528export \u51fd\u6570\u540d\u5bfc\u51fa\u51fd\u6570<\/li>\n<li>C\u8bed\u8a00\u4e2d\u7528extern\u58f0\u660e\u51fd\u6570\u539f\u578b<\/li>\n<li>\u76f4\u63a5\u50cf\u666e\u901aC\u51fd\u6570\u4e00\u6837\u8c03\u7528&#xff0c;\u53c2\u6570\u548c\u8fd4\u56de\u503c\u81ea\u52a8\u6309\u7ea6\u5b9a\u5339\u914d<\/li>\n<hr \/>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u7b2c\u4e8c\u5929\u7684\u5185\u5bb9\u662f\u4ece\u201c\u5355\u6761\u6307\u4ee4\u201d\u8d70\u5411\u201c\u7ed3\u6784\u5316\u7a0b\u5e8f\u201d\u7684\u5173\u952e&#xff1a;<\/p>\n<ul>\n<li>NZCV\u6807\u5fd7\u4f4d\u662f\u6240\u6709\u6761\u4ef6\u5224\u65ad\u7684\u5e95\u5c42\u786c\u4ef6\u57fa\u7840&#xff0c;\u7406\u89e3N\u548cV\u7684\u7ec4\u5408\u903b\u8f91&#xff0c;\u5c31\u80fd\u901a\u5403\u6240\u6709\u6709\u7b26\u53f7\u6761\u4ef6\u6307\u4ee4<\/li>\n<li>\u6ee1\u9012\u51cf\u6808\u662f\u51fd\u6570\u8c03\u7528\u7684\u6839\u57fa&#xff0c;\u538b\u6808\u5f39\u6808\u7684\u672c\u8d28\u662f\u4fdd\u5b58\u73b0\u573a\u3001\u9632\u6b62\u5bc4\u5b58\u5668\u88ab\u8986\u76d6<\/li>\n<li>bl&#043;lr&#043;\u6808 \u4e09\u8005\u914d\u5408&#xff0c;\u5b9e\u73b0\u4e86\u51fd\u6570\u7684\u5d4c\u5957\u8c03\u7528\u4e0e\u6b63\u786e\u8fd4\u56de<\/li>\n<\/ul>\n<p>\u638c\u63e1\u8fd9\u4e9b\u5185\u5bb9\u540e&#xff0c;\u5c31\u5177\u5907\u4e86\u9605\u8bfbARM\u542f\u52a8\u4ee3\u7801\u7684\u6838\u5fc3\u57fa\u7840&#xff0c;\u4e0b\u4e00\u7bc7\u5c06\u5b66\u4e60\u5f02\u5e38\u5411\u91cf\u8868\u3001\u5de5\u4f5c\u6a21\u5f0f\u5207\u6362\u7b49\u542f\u52a8\u4ee3\u7801\u7684\u6838\u5fc3\u6a21\u5757\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u76ee\u5f55 \u524d\u8a00\u4e00\u3001CPSR \u6761\u4ef6\u6807\u5fd7\u4f4d&#xff08;NZCV&#xff09;\u5f7b\u5e95\u641e\u61c2 1. \u56db\u4e2a\u6807\u5fd7\u4f4d\u7684\u5b9a\u4e492. \u91cd\u70b9\u8fa8\u6790&#xff1a;C\u4f4d \u548c V\u4f4d \u5b8c\u5168\u72ec\u7acb3. \u96be\u70b9\u7a81\u7834&#xff1a;N\u4e0eV\u7684\u7ec4\u5408\u903b\u8f914. \u5e38\u7528\u6761\u4ef6\u7801\u5bf9\u5e94\u8868 \u4e8c\u3001\u6761\u4ef6\u6307\u4ee4\u4e0e\u5faa\u73af\u7ed3\u6784\u5b9e\u73b0 1. while \u5faa\u73af&#xff08;\u5148\u5224\u65ad\u540e\u6267\u884c&#xff09;2. do-while \u5faa\u73af&#xff08;\u5148\u6267\u884c\u540e\u5224\u65ad&#xff09;3. \u4e24\u8005\u8f6c\u6362\u8981\u70b9 \u4e09\u3001\u8df3\u8f6c\u6307\u4ee4\u4e09\u5144\u5f1f&#xff1a;b\u3001bl\u3001bx \u533a\u522b \u5173\u952e<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11653,751,371,1917,4908,305],"topic":[],"class_list":["post-106207","post","type-post","status-publish","format-standard","hentry","category-server","tag-11653","tag-arm","tag-371","tag-1917","tag-4908","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/106207.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u76ee\u5f55 \u524d\u8a00\u4e00\u3001CPSR \u6761\u4ef6\u6807\u5fd7\u4f4d&#xff08;NZCV&#xff09;\u5f7b\u5e95\u641e\u61c2 1. \u56db\u4e2a\u6807\u5fd7\u4f4d\u7684\u5b9a\u4e492. \u91cd\u70b9\u8fa8\u6790&#xff1a;C\u4f4d \u548c V\u4f4d \u5b8c\u5168\u72ec\u7acb3. \u96be\u70b9\u7a81\u7834&#xff1a;N\u4e0eV\u7684\u7ec4\u5408\u903b\u8f914. \u5e38\u7528\u6761\u4ef6\u7801\u5bf9\u5e94\u8868 \u4e8c\u3001\u6761\u4ef6\u6307\u4ee4\u4e0e\u5faa\u73af\u7ed3\u6784\u5b9e\u73b0 1. while \u5faa\u73af&#xff08;\u5148\u5224\u65ad\u540e\u6267\u884c&#xff09;2. do-while \u5faa\u73af&#xff08;\u5148\u6267\u884c\u540e\u5224\u65ad&#xff09;3. \u4e24\u8005\u8f6c\u6362\u8981\u70b9 \u4e09\u3001\u8df3\u8f6c\u6307\u4ee4\u4e09\u5144\u5f1f&#xff1a;b\u3001bl\u3001bx \u533a\u522b \u5173\u952e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/106207.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-16T13:48:33+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/106207.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/106207.html\",\"name\":\"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-16T13:48:33+00:00\",\"dateModified\":\"2026-09-16T13:48:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/106207.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/106207.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/106207.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/106207.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u76ee\u5f55 \u524d\u8a00\u4e00\u3001CPSR \u6761\u4ef6\u6807\u5fd7\u4f4d&#xff08;NZCV&#xff09;\u5f7b\u5e95\u641e\u61c2 1. \u56db\u4e2a\u6807\u5fd7\u4f4d\u7684\u5b9a\u4e492. \u91cd\u70b9\u8fa8\u6790&#xff1a;C\u4f4d \u548c V\u4f4d \u5b8c\u5168\u72ec\u7acb3. \u96be\u70b9\u7a81\u7834&#xff1a;N\u4e0eV\u7684\u7ec4\u5408\u903b\u8f914. \u5e38\u7528\u6761\u4ef6\u7801\u5bf9\u5e94\u8868 \u4e8c\u3001\u6761\u4ef6\u6307\u4ee4\u4e0e\u5faa\u73af\u7ed3\u6784\u5b9e\u73b0 1. while \u5faa\u73af&#xff08;\u5148\u5224\u65ad\u540e\u6267\u884c&#xff09;2. do-while \u5faa\u73af&#xff08;\u5148\u6267\u884c\u540e\u5224\u65ad&#xff09;3. \u4e24\u8005\u8f6c\u6362\u8981\u70b9 \u4e09\u3001\u8df3\u8f6c\u6307\u4ee4\u4e09\u5144\u5f1f&#xff1a;b\u3001bl\u3001bx \u533a\u522b \u5173\u952e","og_url":"https:\/\/www.wsisp.com\/helps\/106207.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-16T13:48:33+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/106207.html","url":"https:\/\/www.wsisp.com\/helps\/106207.html","name":"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-16T13:48:33+00:00","dateModified":"2026-09-16T13:48:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/106207.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/106207.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/106207.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010ARM\u6c47\u7f16\u5b66\u4e60\u7b14\u8bb002\u3011\u6761\u4ef6\u6807\u5fd7\u4f4d\u3001\u6808\u673a\u5236\u4e0e\u51fd\u6570\u8c03\u7528\u5168\u89e3\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/106207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=106207"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/106207\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=106207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=106207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=106207"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=106207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}