| 数据搜索系统,热门电子元器件搜索 |
|
ST20-C1 数据表(PDF) 51 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 数据表(HTML) 51 Page - STMicroelectronics |
|
51 / 205 page ![]() 51/205 4 Using ST20-C1 instructions ® A C function is used for purposes of illustration. For simplicity, it is assumed that the single result can be returned in the evaluation stack: ajw -local_variables-1; P; E; ldl local_variables; ajw local_variables+1; jab; One of the loading sequences described earlier may be required if the expressions returned in the registers contain evaluations. 4.10.4 Calling a function The first three par ameters should be loaded into the evaluation stack before the fcall instruction. These parameters can be stored as local variables after the workspace pointer has been moved down, to make the best use of the work space cache. The remainder of the parameters passed should be loaded into the work space before fcall is executed. When the function returns, the results whose addresses were passed will already have been stored so all that remains is to store up to 2 results returned in the evalua- tion stack. For example the function call V = F(E1, .. ., En) could be compiled by E3; stl 0; . . . ; En; stl (n-3); E2;E1; static_link; fcall F; stl V; The compiler must have already allocated sufficient workspace for the parameters that are stacked explicitly. Single result functions In most programming languages, a function that returns a single result can be used in an expression as well as in an assignment. A common form of function returns a single value contained in a word — the mechanism described above will return this in Areg. When compiling expressions, (using the algorithm described in section C.3 in Appendix C) the depth of such a function call should be taken as being infinite — i.e. deeper than any other form of expression. This is because the function call will always lose any other information in the registers. By giving it infinite depth the expression compilation algorithm will never call a function while another expression result is being held in a register. |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |