<div dir="ltr">Oops, sorry for the missing endif, I messed up with file merging.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-05 20:11 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@squeakvm.org" target="_blank">commits@squeakvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Revision: 3668<br>
Author: nice<br>
Date: 2016-04-05 11:11:36 -0700 (Tue, 05 Apr 2016)<br>
Log Message:<br>
-----------<br>
Provide macros for conditionnally byte-swapping depending on VM endianness<br>
<br>
Modified Paths:<br>
--------------<br>
branches/Cog/platforms/Cross/vm/sqMemoryAccess.h<br>
<br>
Modified: branches/Cog/platforms/Cross/vm/sqMemoryAccess.h<br>
===================================================================<br>
--- branches/Cog/platforms/Cross/vm/sqMemoryAccess.h 2016-04-02 21:58:22 UTC (rev 3667)<br>
+++ branches/Cog/platforms/Cross/vm/sqMemoryAccess.h 2016-04-05 18:11:36 UTC (rev 3668)<br>
@@ -233,7 +233,16 @@<br>
( (unsigned long long)(x) >> 56))<br>
#endif<br>
<br>
+/* Since Large Integers are Bytes Oops allways stored as little endian,<br>
+ the following macros are handy to retrieve 4 or 8 byte limbs */<br>
+#if VMBIGENDIAN<br>
+# define SQ_SWAP_4_BYTES_IF_BIGENDIAN(x) SQ_SWAP_4_BYTES(x)<br>
+# define SQ_SWAP_8_BYTES_IF_BIGENDIAN(x) SQ_SWAP_8_BYTES(x)<br>
+#else<br>
+# define SQ_SWAP_4_BYTES_IF_BIGENDIAN(x) (x)<br>
+# define SQ_SWAP_8_BYTES_IF_BIGENDIAN(x) (x)<br>
<br>
+<br>
/* This doesn't belong here, but neither do 'self flag: ...'s belong in the<br>
image. We use a macro, not an inline function; we need no trace of flag.<br>
*/<br>
<br>
</blockquote></div><br></div>