[Tack-devel] SBS instruction question
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: Carl E. C. <cec...@ya...> - 2019-06-23 16:43:54
|
Greetings, Another interesting question on the SBS EM instruction. It seems that both em.p and the EM interpreter do overflow checking on the SBS (subtract pointer from pointer) instruction only when the word size is 16-bits. Should this be documented, and i guess if technically possible this should be the same for 32-bit pointers, right? Another simple question, is there a practical use-case where SBS is used where ptr1 - ptr2 where ptr2 is at higher address than ptr1? This gives a negative number and according to me should not be possible, right, but maybe i am missing something here... I am just curious to see if this is a valid use case. Thanks in advance, Carl |