akirilov-arm commented on issue #3082:
@alexcrichton The question is not a problem at all; I am afraid that you have not been reading the best documentation on the subject, though that is not your fault. The proper reference for individual instructions (other than the Arm Architecture Reference Manual or Arm ARM, as people tend to call it) can be found on Arm's developer Web site - just click the "Architectures" drop-down menu, then "CPU Architecture", followed by the drop-down menu "A-Profile" in the middle of the page, and finally, probably the most counter-intuitive step, "Exploration tools" (or just use this direct link). This page links both to HTML and to XML renditions of the instruction descriptions (ad the system register descriptions like the
FPCR
that is relevant here), each of which contains the pseudo-code that specifies how instructions behave, including the conditions that cause exceptions. So, browsing through the documentation I think that you are right - since the inputs are 32-bit numbers, there is no danger of getting exceptions. However, there is another subtlety - an architecture implementation (that is, a processor core) is not required to support any of the relevant exceptions; indeed, that is the case for a couple of Arm cores like Cortex-A76. That's why I think that operating systems usually keep them disabled (which is confirmed by a quick check on the machine I have access to); in the worst case, the Wasm runtime can ensure it.BTW the
SCVTF
instruction has several variants and you have been looking at the wrong one - "(vector, fixed-point)" instead of "(vector, integer)".
akirilov-arm edited a comment on issue #3082:
@alexcrichton The question is not a problem at all; I am afraid that you have not been reading the best documentation on the subject, though that is not your fault. The proper reference for individual instructions (other than the Arm Architecture Reference Manual or Arm ARM, as people tend to call it) can be found on Arm's developer Web site - just click the "Architectures" drop-down menu, then "CPU Architecture", followed by the drop-down menu "A-Profile" in the middle of the page, and finally, probably the most counter-intuitive step, "Exploration tools" (or just use this direct link). This page links both to HTML and to XML renditions of the instruction descriptions (and the system register descriptions like the
FPCR
that is relevant here), each of which contains the pseudo-code that specifies how instructions behave, including the conditions that cause exceptions. So, browsing through the documentation I think that you are right - since the inputs are 32-bit numbers, there is no danger of getting exceptions. However, there is another subtlety - an architecture implementation (that is, a processor core) is not required to support any of the relevant exceptions; indeed, that is the case for a couple of Arm cores like Cortex-A76. That's why I think that operating systems usually keep them disabled (which is confirmed by a quick check on the machine I have access to); in the worst case, the Wasm runtime can ensure it.BTW the
SCVTF
instruction has several variants and you have been looking at the wrong one - "(vector, fixed-point)" instead of "(vector, integer)".
alexcrichton commented on issue #3082:
Ah ok that all definitely makes sense, thanks for the background info! In that case this definitely seems ok to me!
Last updated: Nov 22 2024 at 16:03 UTC