This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Signed into overflow behavior in the security context


Gabriel Paubert wrote:

For all architectures I use, it is rather "if used as an operand of an arithmetic instruction", but the values can be copied around without ever generating a trap. Even negating or taking the absolute value never traps since those are not considered "arithmetic" instructions.

On some architectures the load causes a trap, and that means for example that you cannot use fpt load/store to move non-fpt stuff. But yes, of course the description is approximate, since the behavior of signalling nan's is unspecifed by the standard!

And even then you have to explicitly enable the trap for invalid
operation (on systems using IEEE754), otherwise it is simply propagated as a QNaN.

That's not guaranteed



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]